[pypy-svn] r72859 - pypy/branch/kill-asm-call/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Thu Mar 25 22:59:34 CET 2010


Author: fijal
Date: Thu Mar 25 22:59:33 2010
New Revision: 72859

Modified:
   pypy/branch/kill-asm-call/pypy/jit/metainterp/support.py
Log:
Insert Nones for void args in case we're on llinterp


Modified: pypy/branch/kill-asm-call/pypy/jit/metainterp/support.py
==============================================================================
--- pypy/branch/kill-asm-call/pypy/jit/metainterp/support.py	(original)
+++ pypy/branch/kill-asm-call/pypy/jit/metainterp/support.py	Thu Mar 25 22:59:33 2010
@@ -80,7 +80,15 @@
     if hasattr(funcobj, 'graph'):
         llinterp = LLInterpreter(rtyper)  #, exc_data_ptr=exc_data_ptr)
         def on_top_of_llinterp(*args):
-            return llinterp.eval_graph(funcobj.graph, list(args))
+            real_args = []
+            i = 0
+            for arg in funcobj.graph.startblock.inputargs:
+                if arg.concretetype is lltype.Void:
+                    real_args.append(None)
+                else:
+                    real_args.append(args[i])
+                    i += 1
+            return llinterp.eval_graph(funcobj.graph, real_args)
     else:
         assert hasattr(funcobj, '_callable')
         def on_top_of_llinterp(*args):



More information about the Pypy-commit mailing list