[pypy-svn] r66551 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler
benjamin at codespeak.net
benjamin at codespeak.net
Thu Jul 23 19:24:00 CEST 2009
Author: benjamin
Date: Thu Jul 23 19:23:59 2009
New Revision: 66551
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py
Log:
help the flow space with variables
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/optimize.py Thu Jul 23 19:23:59 2009
@@ -158,6 +158,9 @@
for op_kind, folder in unrolling_binary_folders:
if op_kind == op:
w_const = folder(self.space, left, right)
+ break
+ else:
+ raise AssertionError("unknown binary operation")
except OperationError:
pass
else:
@@ -179,6 +182,9 @@
for op_kind, folder in unrolling_unary_folders:
if op_kind == op:
w_const = folder(self.space, w_operand)
+ break
+ else:
+ raise AssertionError("unknown unary operation")
w_minint = self.space.wrap(-sys.maxint - 1)
# This makes sure the result is an integer.
if self.space.eq_w(w_minint, w_const):
More information about the Pypy-commit
mailing list