[pypy-svn] r12014 - pypy/dist/goal

tismer at codespeak.net tismer at codespeak.net
Fri May 6 14:09:13 CEST 2005


Author: tismer
Date: Fri May  6 14:09:13 2005
New Revision: 12014

Added:
   pypy/dist/goal/targetrpystone.py   (contents, props changed)
Log:
rpystone translates nicely and runs about
3+ times faster than under CPython

Added: pypy/dist/goal/targetrpystone.py
==============================================================================
--- (empty file)
+++ pypy/dist/goal/targetrpystone.py	Fri May  6 14:09:13 2005
@@ -0,0 +1,35 @@
+import buildcache2
+from pypy.objspace.std.objspace import StdObjSpace
+from pypy.translator.test import rpystone
+
+# __________  Entry point  __________
+
+LOOPS = 150000
+
+def entry_point():
+    rpystone.entrypoint(LOOPS)
+    
+# _____ Define and setup target _____
+def target():
+    global space, mmentrypoints
+    # disable translation of the whole of classobjinterp.py
+    #StdObjSpace.setup_old_style_classes = lambda self: None
+    space = StdObjSpace()
+    # call cache filling code
+    #buildcache2.buildcache(space)
+
+    # ------------------------------------------------------------
+
+    return entry_point, []
+
+# _____ Run translated _____
+
+def run(c_entry_point):
+    res_w = c_entry_point()
+    print res_w
+
+if __name__ == "__main__":
+    # just run it without translation
+    target()
+    run(entry_point)
+    
\ No newline at end of file



More information about the Pypy-commit mailing list