[pypy-svn] r23099 - pypy/dist/pypy/translator/goal

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Feb 7 12:41:33 CET 2006


Author: cfbolz
Date: Tue Feb  7 12:41:30 2006
New Revision: 23099

Modified:
   pypy/dist/pypy/translator/goal/target22c3.py
Log:
add a __main__ thingy to view all the steps of translation


Modified: pypy/dist/pypy/translator/goal/target22c3.py
==============================================================================
--- pypy/dist/pypy/translator/goal/target22c3.py	(original)
+++ pypy/dist/pypy/translator/goal/target22c3.py	Tue Feb  7 12:41:30 2006
@@ -26,7 +26,23 @@
     debug(str(result))
     return 0
 
+
 # _____ Define and setup target ___
 
 def target(*args):
     return entry_point, None
+
+if __name__ == '__main__':
+    from pypy.translator.interactive import Translation
+
+    t = Translation(entry_point)
+    t.view()
+    t.annotate([str])
+    t.view()
+    t.rtype(backend="c")
+    t.view()
+    t.backendopt()
+    t.view()
+    f = t.compile_c()
+    f("")
+



More information about the Pypy-commit mailing list