[pypy-svn] r70770 - pypy/branch/direct-assembler-call/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Fri Jan 22 13:22:42 CET 2010


Author: fijal
Date: Fri Jan 22 13:22:41 2010
New Revision: 70770

Modified:
   pypy/branch/direct-assembler-call/pypy/jit/metainterp/pyjitpl.py
Log:
argh. doing stuff on history when blackholing is not the smartes idea ever.
Test pending


Modified: pypy/branch/direct-assembler-call/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/direct-assembler-call/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/direct-assembler-call/pypy/jit/metainterp/pyjitpl.py	Fri Jan 22 13:22:41 2010
@@ -675,17 +675,17 @@
         if token is not None:
             call_position = len(self.metainterp.history.operations)
         res = self.do_residual_call(varargs, descr=calldescr, exc=True)
-        # XXX fix the call position, <UGLY!>
-        found = False
-        while True:
-            op = self.metainterp.history.operations[call_position]
-            if op.opnum == rop.CALL or op.opnum == rop.CALL_MAY_FORCE:
-                found = True
-                break
-            call_position += 1
-        assert found
-        # </UGLY!>
         if token is not None:
+            # XXX fix the call position, <UGLY!>
+            found = False
+            while True:
+                op = self.metainterp.history.operations[call_position]
+                if op.opnum == rop.CALL or op.opnum == rop.CALL_MAY_FORCE:
+                    found = True
+                    break
+                call_position += 1
+            assert found
+            # </UGLY!>
             # this will substitute the residual call with assembler call
             self.metainterp.direct_assembler_call(varargs, token, call_position)
         return res



More information about the Pypy-commit mailing list