Author: Alex Gaynor <[email protected]>
Branch: python-loop-unroll
Changeset: r64654:b0325fcc2553
Date: 2013-05-28 16:52 -0700
http://bitbucket.org/pypy/pypy/changeset/b0325fcc2553/

Log:    make sure order of operations is correct

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -880,7 +880,7 @@
         from pypy.module.__pypy__.interp_unroll import W_LoopUnroller
         w_iterable = self.popvalue()
         length_hint = self.space.length_hint(w_iterable, sys.maxint)
-        if isinstance(w_iterable, W_LoopUnroller) or 
jit.isconstant(length_hint) and length_hint < 20:
+        if (jit.isconstant(length_hint) and length_hint < 20) or 
isinstance(w_iterable, W_LoopUnroller):
             lastblock = self.lastblock
             # This is the case for comprehensions, which don't add a frame
             # block, annoying (for now ignore the problem).
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to