[pypy-dev] Questions

Richard Emslie rxe at ukshells.co.uk
Tue Dec 9 17:04:35 CET 2003


Hi,

I've been reading through the source code and the docs, and getting some
jist of what is going on.  I guess what I was expecting to see something
more like the CPython code but in python (like why do we have different
object spaces, although I see the errors of my ways now :-) ) and was
failing to understand the big picture.

So reading between the lines, does this sound anything quite like what we
are trying to achieve...

The abstraction of the object spaces are so we can perform abstract
interpretation with one set, a working interpreter with another, a minimal
interpreter with another, and goodness knows what else ;-)  So to create
our initial interpreter, we take the interpreter code, multi-method
dispatcher and the standard object space and we can abstractly interpret
with the interpreter/flow object space/annotation.  That stage involves
building up a set of basic blocks, building a flow graph, type inference
and then translating (sorry I get a bit lost here with what happens where,
ie when does the flow object space stop and annotation start, but the
answer to that one is to read more code ;-) ) to pyrex/CL/other low level
code.

Does that sound about right so far?   Then do either of these make sense
(purely speculation... and most likely nonsense)

Also if we write the flow object space and annotation in RPython we can
pipe that through itself, to generate low level code too.  Now my main
question is - how do we combine the two object spaces such that we do
abstract intepretation and annotation in a running interpreter (also I
guess we would either need some very low level translation, ie machine
code or some LLVM like architecture to do this?)

OR

Once we have broken the interpeter - standard object space into a finite -
into a set of blocks and graph, and translate those blocks into low level
code - we could view any python bytecode operating on this as a traversal
over the blocks.  Therefore we could create a new flow graph from this
traversal, and feed it into some LLVM like architecture which does the low
level translation and optimisation phase for us??


Thanks for any feedback... :-)

Cheers,
Richard


More information about the Pypy-dev mailing list