[pypy-svn] r63495 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Wed Apr 1 16:47:47 CEST 2009


Author: arigo
Date: Wed Apr  1 16:47:45 2009
New Revision: 63495

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/compile.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
Log:
Translation fixes.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/compile.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/compile.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/compile.py	Wed Apr  1 16:47:45 2009
@@ -189,7 +189,7 @@
         guard_op = ResOperation(rop.GUARD_TRUE, guard_op.args, None)
     else:
         # XXX other guards have no inverse so far
-        raise InverseTheOtherGuardsPlease(op)
+        raise InverseTheOtherGuardsPlease(guard_op)
     #
     guard_op.suboperations = suboperations
     return guard_op

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py	Wed Apr  1 16:47:45 2009
@@ -413,6 +413,7 @@
         self.guard_op = guard_op
         self.counter = 0
         self.history = history
+        assert history_guard_index >= 0
         self.history_guard_index = history_guard_index
 
 # ____________________________________________________________

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	Wed Apr  1 16:47:45 2009
@@ -1007,9 +1007,11 @@
             if guard_op.optimized is not None:     # should never be None
                 guard_op = guard_op.optimized
             suboperations = guard_op.suboperations
-            self.extra_rebuild_operations = len(suboperations) - 1
-            for i in range(self.extra_rebuild_operations):
+            extra = len(suboperations) - 1
+            assert extra >= 0
+            for i in range(extra):
                 self.history.operations.append(suboperations[i])
+            self.extra_rebuild_operations = extra
         else:
             self.history = history.BlackHole(self.cpu)
             # the BlackHole is invalid because it doesn't start with



More information about the Pypy-commit mailing list