1. Pypy
  2. Untitled project
  3. pypy

Commits

Maciej Fijalkowski  committed 8088bbf

reset the virtualizable token if we just forced it by hand

  • Participants
  • Parent commits 42a5028
  • Branches kill-gen-store-back-in

Comments (0)

Files changed (2)

File rpython/jit/metainterp/pyjitpl.py

View file
                     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)

File rpython/jit/metainterp/test/test_virtualizable.py

View file
             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