[pypy-svn] r70438 - in pypy/branch/jit-trace-hook/pypy/jit/metainterp: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Jan 7 19:08:27 CET 2010


Author: cfbolz
Date: Thu Jan  7 19:08:27 2010
New Revision: 70438

Modified:
   pypy/branch/jit-trace-hook/pypy/jit/metainterp/optimizeopt.py
   pypy/branch/jit-trace-hook/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
don't bypass optimize_default for int_is_true.


Modified: pypy/branch/jit-trace-hook/pypy/jit/metainterp/optimizeopt.py
==============================================================================
--- pypy/branch/jit-trace-hook/pypy/jit/metainterp/optimizeopt.py	(original)
+++ pypy/branch/jit-trace-hook/pypy/jit/metainterp/optimizeopt.py	Thu Jan  7 19:08:27 2010
@@ -721,7 +721,7 @@
         elif value.is_null():
             self.make_constant_int(op.result, not expect_nonnull)
         else:
-            self.emit_operation(op)
+            self.optimize_default(op)
 
     def optimize_INT_IS_TRUE(self, op):
         self._optimize_nullness(op, op.args[0], True)

Modified: pypy/branch/jit-trace-hook/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/jit-trace-hook/pypy/jit/metainterp/test/test_optimizeopt.py	(original)
+++ pypy/branch/jit-trace-hook/pypy/jit/metainterp/test/test_optimizeopt.py	Thu Jan  7 19:08:27 2010
@@ -1840,7 +1840,11 @@
         i1 = oois(p1, p2)
         i2 = oois(p1, p2)
         i3 = int_add(i1, 1)
+        i3b = int_is_true(i3)
+        guard_true(i3b) []
         i4 = int_add(i2, 1)
+        i4b = int_is_true(i4)
+        guard_true(i4b) []
         escape(i3)
         escape(i4)
         guard_true(i1) []
@@ -1851,6 +1855,8 @@
         [p1, p2]
         i1 = oois(p1, p2)
         i3 = int_add(i1, 1)
+        i3b = int_is_true(i3)
+        guard_true(i3b) []
         escape(i3)
         escape(i3)
         guard_true(i1) []



More information about the Pypy-commit mailing list