[pypy-svn] r61874 - pypy/branch/pyjitpl5/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Sat Feb 14 12:51:23 CET 2009


Author: fijal
Date: Sat Feb 14 12:51:20 2009
New Revision: 61874

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
Log:
A proper fix about guard_value


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	Sat Feb 14 12:51:20 2009
@@ -516,8 +516,8 @@
                         continue
                     exception_might_have_happened = False
                 if opname == 'guard_value':
-                    if (self.nodes[op.args[0]].const and
-                        self.nodes[op.args[1]].const):
+                    if (isinstance(self.nodes[op.args[0]].source, Const) and
+                        isinstance(self.nodes[op.args[1]].source, Const)):
                         continue
                 op = self.optimize_guard(op)
                 newoperations.append(op)



More information about the Pypy-commit mailing list