Author: Hakan Ardo <[email protected]>
Branch: jit-targets
Changeset: r49484:1b27d145ac64
Date: 2011-11-17 07:52 +0100
http://bitbucket.org/pypy/pypy/changeset/1b27d145ac64/

Log:    dont use invalidated loops

diff --git a/pypy/jit/metainterp/test/test_quasiimmut.py 
b/pypy/jit/metainterp/test/test_quasiimmut.py
--- a/pypy/jit/metainterp/test/test_quasiimmut.py
+++ b/pypy/jit/metainterp/test/test_quasiimmut.py
@@ -294,7 +294,8 @@
             return total
 
         res = self.meta_interp(main, [])
-        self.check_tree_loop_count(6)
+        self.check_trace_count(6)
+        self.check_jitcell_token_count(3)
         assert res == main()
 
     def test_change_during_running(self):
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -177,7 +177,9 @@
             from pypy.rlib import rgc
             rgc.collect();
         if self.wref_procedure_token is not None:
-            return self.wref_procedure_token()
+            token = self.wref_procedure_token()
+            if token and not token.invalidated:
+                return token
         return None
 
     def set_procedure_token(self, token):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to