[pypy-dev] Re: Base Object library (was: stdobjspace status)

Christian Tismer tismer at tismer.com
Wed Feb 26 16:34:57 CET 2003


Stephan Diehl wrote:
...

> This boils down to:
> 1. define the most basic building blocks like bit fields + corresponding 
> memory management.
> 2. define numbers, lists, strings, dicts, etc. on top of 1.

This is actually my plan. It just takes more time.

> Please note that these objects have nothing to do with the objspace we are 
> defining, but are used as the building blocks and are never exposed outside 
> the objspace.
> 
> Does this make sense?

Yes, makes sense.
For the time being, my r_int objects for instance
are derived from true integers, but they are *meant*
to denote simple, internal integers. Their
behavior is modelled this way, and a compiler is
supposed to recognize r_int and generate the primitive
code instead of object calls. In that sense, I'm
already using primitive types.

Well, the nice thing is, that these primitive types
can be used both in objectspace and outside of
it. Sure, they have to be not intermixed, and the meaning
of r_int in objectspace is clearly that we want
these objects to be replaced by primitives.
Nevertheless, r_int can be imported from application
space, becoming an application object, now. This
is another level, "other world", but still the
r_int objects make sense, since a compiler on
application space (like Psyco) can now drive
concluions of the usage of r_int, too.

So the meaning of the primitive types is always
to provide a way down to the really implementable
layers, regardless in which level of world you
just happen to be. It even makes sense if you run
PyPy on PyPy which is run on CPython, etc.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



More information about the Pypy-dev mailing list