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

Christian Tismer tismer at tismer.com
Sat Mar 1 21:21:36 CET 2003


holger krekel wrote:
...

> Marshaled (pypy-) code objects would need to serialize 
> objectspace dependent types.  Maybe we should require all 
> objectspaces to implement interoperable serialization.  
> This would also provide a means to transfer objects from 
> one objectspace to another (and to CPython). 

I think this makes very much sense, as far as we
stick with the opcodes as well. It is possible to
change that later, or there are situations where
we compile away and don't have such a thing like
code objects.
But for now having them compatible is essential.

> However, I am a bit uneasy about tying pypy too deep to 
> CPython's codeobject layout.  We are likely to want to 
> extend/modify it the future anyway.  So maybe we shouldn't
> take CPython-comptability down to the code object .

There is one simple interface: The fields of the
code object that get marshalled. This is not necesssarily
related to the internal layout of this object.
Think of how Corba marshals objects, and you transfer
them between, say, C and Java.

> It's the "heart of gold", produced by the compiler and 
> driving the interpreter.  These are areas where we want 
> maximum flexibility and thus shouldn't think too much 
> from CPython's code object which really is more of
> an implementation detail than anything else. 

I think it is worthwhile to be able to run a .pyc
file like in CPython, at least until we can compile
everything alone. I agree that we might do lots of
extensions, later, but why should it be a problem
to produce a compatible one for the moment?
I don't see that we loose something.
As said, code objects are like bytecode, they have
a given implementation and a defined external
representation. How we transform them
internally is a completely different story.

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