[pypy-dev] Concerning bounded number of classes created

Alexander Golec alexgolecmailinglists at gmail.com
Sat Dec 10 02:21:27 CET 2011


So at no point reachable from the entry_point (or is it run?) of the program can you create classes and functions? 

Alex


On Dec 9, 2011, at 8:18 PM, Benjamin Peterson wrote:

> 2011/12/9 Alexander Golec <alexgolecmailinglists at gmail.com>:
>> Hey all,
>> 
>> Sorry to keep asking questions on the mailing list, but I've been doing my
>> semester research project on PyPy, and my deadline is beginning to loom...
>> 
>> I have a question concerning what I think is a conflict between the RPython
>> coding guide and the 2005 EU paper. The paper states:
>> 
>> Our approach goes further and analyses live programs in memory: the program
>> is allowed to contain fully dynamic sections, as long as these sections are
>> entered a bounded num- ber of times. For example, the source code of the
>> PyPy interpreter, which is itself written in this bounded-dynamism style,
>> makes extensive use of the fact that it is possible to build new classes at
>> any point in time -- not just during an initialisation phase -- as long as
>> the number of new classes is bounded. For example, interpreter/gateway.py
>> builds a custom wrapper class corresponding to each function that a
>> particular variable can reference. There is a finite num- ber of functions
>> in total, so this can only create a finite number of extra wrapper classes.
> 
> I'm not actually sure what this is referring to; it may have changed since 2005.
> 
>> 
>> While the coding guide says:
>> 
>> 
>> definitions
>> 
>> run-time definition of classes or functions is not allowed.
> 
> This is the truest statement currently.
> 
> 
> -- 
> Regards,
> Benjamin



More information about the pypy-dev mailing list