[pypy-dev] with rpython is there a way to not write out the "c" files ?

Armin Rigo armin.rigo at gmail.com
Mon Dec 5 14:39:48 EST 2016


Hi again,

On 5 December 2016 at 20:06, Shubha Ramani via pypy-dev
<pypy-dev at python.org> wrote:
> I'm trying to step through code and understand the interpreter. It turns out
> that --no-source is useless. I do need it because I need byte-code
> generation.

Same answer, but I'll detail a bit more.  If you want to understand an
interpreter, run it on top of Python as usual; it's (also) a Python
program, so debug it like a Python program.  If instead you want to
understand the JIT and step through that, then see how the tests in
jit/metainterp/test/test_*.py are written---basically they translate
the interpreter (each test is its own 10-lines "interpreter") to an
in-memory format, and then run the untranslated JIT on that, so you
can step through the JIT.  There are also other ways other tests
elsewhere run, but the general idea is that *either* you debug, *or*
you translate, for every part that you're interested in (so for the
JIT, the tests translate the interpreter and then run the JIT
untranslated).  The GC works the same way, for example.


A bientôt,

Armin.


More information about the pypy-dev mailing list