[pypy-dev] Low level operations and ootypesystem

Samuele Pedroni pedronis at strakt.com
Wed Mar 29 23:42:02 CEST 2006


Antonio Cuni wrote:

> 
> Finally, the last question is ootypesystem-specific: I've noticed that 
> the rtyper sets the 'meta' field of every instance just after it has 
> been created: what does it contain? It seems to me that it contains the 
> class the object belongs to: am I correct? If so I could safely ignore 
> that operations, because the CLI automatically tracks the type of each 
> object, couldn't I?

this meta field can contain instances that have further fields beyond 
class_. class_ contains something of type ootype.Class, what is expected
to be the runtime representation of a class in the backend type system,
The extra fields are used to implement dynamically looked up class 
attributes, unless the CLI has direct support for such things, which are 
_not_ static class attributes, the simplest thing is to follow what
the rtyper is asking for.

It is true that in the future we may have the rtyper introduce
the meta field only as stricly necessary.

> Just a curiosity: why the name 'meta' instead of 'class' or 'type'?

to avoid simply thinking that is the type/class in Java/JVM etc sense.
This is more similar to smalltalk metaclass.



More information about the Pypy-dev mailing list