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

Log:    add a sanity check

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
@@ -264,8 +264,11 @@
                 reds_v = support.sort_vars(reds_v)
                 op.args.extend(reds_v)
                 assert jitdriver.autoreds
-                #assert jitdriver.numreds is None, 
'autodetect_jit_markers_redvars called twice?!?'
-                jitdriver.numreds = len(reds_v)
+                if jitdriver.numreds is None:
+                    jitdriver.numreds = len(reds_v)
+                else:
+                    assert jitdriver.numreds == len(reds_v), 'inconsistent 
number of reds_v'
+
 
     def split_graph_and_record_jitdriver(self, graph, block, pos):
         op = block.operations[pos]
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to