Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: kill-gen-store-back-in
Changeset: r65354:8088bbf5b524
Date: 2013-07-11 22:17 +0200
http://bitbucket.org/pypy/pypy/changeset/8088bbf5b524/

Log:    reset the virtualizable token if we just forced it by hand

diff --git a/rpython/jit/metainterp/pyjitpl.py 
b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -2550,7 +2550,9 @@
                     self.execute_and_record(rop.SETARRAYITEM_GC, descr,
                                             abox, ConstInt(j), itembox)
             assert i + 1 == len(self.virtualizable_boxes)
-
+            # we're during tracing, so we should not execute it
+            self.history.record(rop.SETFIELD_GC, [vbox, 
self.cpu.ts.CONST_NULL],
+                                None, descr=vinfo.vable_token_descr)
 
     def replace_box(self, oldbox, newbox):
         assert isinstance(oldbox, Box)
diff --git a/rpython/jit/metainterp/test/test_virtualizable.py 
b/rpython/jit/metainterp/test/test_virtualizable.py
--- a/rpython/jit/metainterp/test/test_virtualizable.py
+++ b/rpython/jit/metainterp/test/test_virtualizable.py
@@ -1577,7 +1577,7 @@
             l = [op for op in
                  bridge.operations if op.getopnum() == rop.SETFIELD_GC]
             assert "'inst_x'" in str(l[0].getdescr().realdescrref())
-            assert len(l) == 1 # no vable token
+            assert len(l) == 2 # vable token set to null
             l = [op for op in bridge.operations if
                  op.getopnum() == rop.GUARD_NOT_FORCED_2]
             assert len(l) == 0
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to