There is a small-to-medium demo showing the translator and the annotator::
- ../rpython/translator/goal/translate.py --view --annotate bpnn.py
+ python bin/rpython --view --annotate translator/goal/bpnn.py
This causes ``bpnn.py`` to display itself as a call graph and class
hierarchy. Clicking on functions shows the flow graph of the particular
To turn this example to C code (compiled to the executable ``bpnn-c``),
../rpython /translator/goal/ translate.py bpnn.py
Translating Full Programs
``rpython/translator/goal``. Examples for this are a slightly changed version of
- cd rpython/translator/goal
- python translate.py targetrpystonedalone
+ python bin/rpython translator/goal/targetrpystonedalone
This will produce the executable "targetrpystonedalone-c".
interpreter`_. There is also an FAQ about how to set up this process for `your
+There are several environment variables you can find useful while playing with the RPython:
+ RPython uses temporary session directories to store files that are generated during the
+ translation process(e.g., translated C files). ``PYPY_USESSION_DIR`` serves as a base directory for these session
+ dirs. The default value for this variable is the systems temporary dir.
+ By default RPython keeps only last ``PYPY_USESSION_KEEP`` (defaults to 3) session dirs inside ``PYPY_USESSION_DIR``.
+ Increase this value if you want your C files to preserve (useful when producing lots of lldebug builds)
.. _`your own interpreters`: faq.html#how-do-i-compile-my-own-interpreters
.. _`start reading sources`: