[pypy-dev] Flow graphs, backends and JIT
benjamin at python.org
Sun Sep 16 21:41:10 CEST 2012
2012/9/16 haael <haael at interia.pl>:
> OK, I read almost all the documentation I found on the web page. But I still
> don't understand few things.
> There are 3 layers in the whole picture. The user application written in
> Python, the Python interpreter written in RPython and the RPython
> interpreter itself.
> 1. Where do flow graphs are generated from? Is it the representation of the
> user application, or the interpreter?
> 2. Where does the JIT fit here? I read it traces the execution of the
> iterpreter and indirectly the user application. Does it operate on the flow
> graphs or something else?
It operates on a serialized version of the flowgraphs.
> 3. Which component actually does the JIT? Is it just a tweak on the code
> generator or are the flow graphs generated differently?
The flow graphs are taken from the translator and modified by the JIT generator.
> 4. Is there some documentation how to write a backend (code generator)? The
> source code is poorly documented and the topic is not mentioned on the web
> page. What exactly do I need to implement to have a backend?
You mean a JIT backend or a RPython backend?
You might find this useful: http://www.aosabook.org/en/pypy.html
More information about the pypy-dev