[pypy-svn] r65929 - pypy/branch/pyjitpl5/pypy/jit/tl/spli
fijal at codespeak.net
fijal at codespeak.net
Wed Jun 24 20:50:45 CEST 2009
Author: fijal
Date: Wed Jun 24 20:50:45 2009
New Revision: 65929
Added:
pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py (contents, props changed)
Log:
add a target. explodes on annotation for obscure reasons
Added: pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py
==============================================================================
--- (empty file)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/spli/targetspli.py Wed Jun 24 20:50:45 2009
@@ -0,0 +1,26 @@
+
+""" usage: spli-c code_obj_file [i:int_arg s:s_arg ...]
+"""
+
+import sys, autopath, os
+from pypy.jit.tl.spli import objects, interpreter, serializer
+from pypy.rlib.streamio import open_file_as_stream
+
+space = objects.DumbObjSpace()
+
+def entry_point(argv):
+ if len(argv) < 2:
+ print __doc__
+ os._exit(1)
+ args = argv[2:]
+ stream = open_file_as_stream(argv[1])
+ co = serializer.deserialize(stream.readall(), space)
+ frame = interpreter.SPLIFrame(co)
+ res = frame.run()
+ print res.repr()
+
+def target(drver, args):
+ return entry_point, None
+
+if __name__ == '__main__':
+ entry_point(sys.argv)
More information about the Pypy-commit
mailing list