Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r89563:99a37d78d644
Date: 2017-01-14 17:27 +0100
http://bitbucket.org/pypy/pypy/changeset/99a37d78d644/

Log:    Hack to "fix" test_issue2465

diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py 
b/rpython/jit/metainterp/optimizeopt/unroll.py
--- a/rpython/jit/metainterp/optimizeopt/unroll.py
+++ b/rpython/jit/metainterp/optimizeopt/unroll.py
@@ -350,6 +350,14 @@
             self.send_extra_operation(jump_op.copy_and_change(rop.JUMP,
                                       args=args + extra,
                                       descr=target_token))
+
+            # XXX see test_issue2465 for a case where the following occurs
+            # XXX (it would be better to really understand the problem
+            # XXX and fix it, but I am failing so far)
+            if label_op is not None and len(args + extra) != 
label_op.numargs():
+                del self.optimizer._newoperations[-1]    # remove the JUMP
+                raise InvalidLoop
+
             return None # explicit because the return can be non-None
         return virtual_state
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to