Newbie: "compiling" scrips (?)

holger krekel pyth at devel.trillke.net
Mon Jun 30 09:57:21 EDT 2003


Alan Kennedy wrote:
> There are many pieces to what the PyPy people are trying to do, and they have a
> lot of work to do building the separate pieces, with nothing to show until it's
> all ready to fit nicely together. But I think their overall model looks
> promising. So hopefully, with the description above, you'll be in a better
> position to understand the content of these links.
> 
> http://codespeak.net/moin/pypy/moin.cgi/PyPythonCore
> http://codespeak.net/moin/pypy/moin.cgi/ObjectModel
> http://codespeak.net/moin/pypy/moin.cgi/BytecodeCompiler
> http://codespeak.net/moin/pypy/moin.cgi/BytecodeInterpreter
> 
> For a look at the kinds of tricks that optimising interpreters can use, in the
> java world, take a look over this link
> 
> http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.1/Java_HSpot_WP_v1.4.1_1002_1.html
> 
> Looking at the PyPy object model, I can't help but wonder how they're going to
> deal with continuations? (If full integration of stackless is the intention).

Hi Alan, 

The current idea is to implement "stackless" (or continuations) at the 
code-generation level.  The idea is that instead of causing "interpreter-recursion" 
when calling a function in python we setup a data structure and issue a "goto" 
to the main-loop which then dispatches the next runnable frame. Doing
this manually at the C-level (or Python-level for that matter) is
tedious and error-prone. That's why we will try to get our
code-generator to do this for us. Ergo you can't see it in our
PyPy object model because it's not there yet :-)

The current plan is to head for a first code-generator on the next
PyPy-Sprint probably in Berlin end of September. 

cheers,

    holger





More information about the Python-list mailing list