[pypy-svn] r79766 - pypy/branch/out-of-line-guards/pypy/jit/metainterp/optimizeopt

fijal at codespeak.net fijal at codespeak.net
Fri Dec 3 07:49:23 CET 2010


Author: fijal
Date: Fri Dec  3 07:49:20 2010
New Revision: 79766

Modified:
   pypy/branch/out-of-line-guards/pypy/jit/metainterp/optimizeopt/rewrite.py
Log:
rpythonize


Modified: pypy/branch/out-of-line-guards/pypy/jit/metainterp/optimizeopt/rewrite.py
==============================================================================
--- pypy/branch/out-of-line-guards/pypy/jit/metainterp/optimizeopt/rewrite.py	(original)
+++ pypy/branch/out-of-line-guards/pypy/jit/metainterp/optimizeopt/rewrite.py	Fri Dec  3 07:49:20 2010
@@ -197,9 +197,8 @@
 
     def optimize_GUARD_TRUE(self, op):
         value = self.getvalue(op.getarg(0))
-        v = self.optimizer.int_to_bool_nullity.get(value, None)
-        if v:
-            v, int_is_true = v
+        if value in self.optimizer.int_to_bool_nullity:
+            v, int_is_true = self.optimizer.int_to_bool_nullity[value]
             if int_is_true:
                 if not v.is_nonnull():
                     v.make_nonnull(len(self.optimizer.newoperations) - 1)
@@ -209,9 +208,8 @@
 
     def optimize_GUARD_FALSE(self, op):
         value = self.getvalue(op.getarg(0))
-        v = self.optimizer.int_to_bool_nullity.get(value, None)
-        if v:
-            v, int_is_true = v
+        if value in self.optimizer.int_to_bool_nullity:
+            v, int_is_true = self.optimizer.int_to_bool_nullity[value]
             if int_is_true:
                 v.make_constant(ConstInt(0))
             elif not v.is_nonnull():



More information about the Pypy-commit mailing list