Author: Antonio Cuni <[email protected]>
Branch: autoreds
Changeset: r58841:fdcb763f8f4f
Date: 2012-11-12 18:16 +0100
http://bitbucket.org/pypy/pypy/changeset/fdcb763f8f4f/

Log:    don't crash if we use jitdrivers with explicit reds

diff --git a/pypy/jit/metainterp/test/test_ajit.py 
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -154,7 +154,6 @@
         assert res == expected
         self.check_resops(int_sub=2, int_mul=0, int_add=18, float_add=8)
 
-
     def test_loop_variant_mul1(self):
         myjitdriver = JitDriver(greens = [], reds = ['y', 'res', 'x'])
         def f(x, y):
diff --git a/pypy/jit/metainterp/warmspot.py b/pypy/jit/metainterp/warmspot.py
--- a/pypy/jit/metainterp/warmspot.py
+++ b/pypy/jit/metainterp/warmspot.py
@@ -257,13 +257,14 @@
         for block, op in graph.iterblockops():
             if op.opname == 'jit_marker':
                 jitdriver = op.args[1].value
+                if not jitdriver.autoreds:
+                    continue
                 greens_v = op.args[2:]
                 alive_v = set(block.inputargs) # XXX: there might be more
                                                # alive vars?
                 reds_v = alive_v - set(greens_v)
                 reds_v = support.sort_vars(reds_v)
                 op.args.extend(reds_v)
-                assert jitdriver.autoreds
                 if jitdriver.numreds is None:
                     jitdriver.numreds = len(reds_v)
                 else:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to