[Python-Dev] Python VM (original) (raw)

Thomas Lee tom at vector-seven.com
Tue Jul 22 02:28:08 CEST 2008


Martin v. Löwis wrote:

Jakob,

This looks fairly correct. A few comments below.

Control Flow ============ The calling sequence is: main() (in python.c) -> PyMain() (main.c) -> PyRunFooFlags() (pythonrun.c) -> runbar() (pythonrun.c) -> PyEvalEvalCode() (ceval.c) -> PyEvalEvalCodeEx() (ceval.c) -> PyEvalEvalFrameEx() (ceval.c). What this misses is the compiler stuff, i.e. PyParserASTFromFoo and PyASTCompile, which precedes the call to PyEval (atleast, no byte code file is available). Further, if I have my way with the AST optimization code, the symtable construction will be an explicit step in between these >:)

In any case, this is awesome work Jakob. It'd be great for this stuff to be documented in such detail -- I sure wish I had something like this to go by when I first started hacking on the source -- but the details seem to change quite often. Still, seeing the detail distilled once in a while is sort of nice, and great for anybody looking to get their teeth into the code.

Thanks for doing the hard yards. :)

Cheers, T



More information about the Python-Dev mailing list