[pypy-dev] Re: Base Object library (was: stdobjspace status)
tismer at tismer.com
Fri Feb 28 06:19:06 CET 2003
holger krekel wrote:
>>I don't think that RPython has anything to do
>>with Python constants and Python code objects,
>>and of course I think that creating code objects
>>should happen in user space. Then, the problem vanishes.
> Agreed. Creating code objects at application-level needs
> some tweaks, though (see my other post, same thread).
Saw that post -- sure, I do think the same.
> Marshaled (pypy-) code objects would need to serialize
> objectspace dependent types.
No, I don't think so.
Why should they serialize objectspace dependant
types? Al the ncessary types are available
through userspace, however they are implemented
in objectspace. So they should serialize their
userspace equivalent, nothing else.
exactly that can recreated from userspace,
however the objectspace looks like.
> 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).
The common external interface is how objects are
pickles/marshalled. This is certainly independant
from the implementation, and also the reason why
I took it as an example to clarify matters.
> 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 .
If we want to borrow code objects and run them in our
interpreter, as stated from the beginning, we have
to be able to swallow them. This is an absolute
Requiring compatibility with our objectspace is an
absolute mustnot. We need to read the sored structure
and create our equivalent object, whatever that is.
> 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.
lease have a look at the code object from the implementation's
view. There is nothing specific which should not be in
our implementation. If we have problems to marshal our
code objects, since they are object space depandent,
then we have very wrong concept about object space.
"Object space" is an implementation detail, IMHO.
Python's code serialization does not have this problem.
Why should we?
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