1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 3b88de1

Fix tests.

  • Participants
  • Parent commits 51bbe48
  • Branches remove-globals-in-jit

Comments (0)

Files changed (2)

File pypy/jit/metainterp/history.py

View file
             if is_valid_int(value):
                 value = int(value)    # bool -> int
             else:
-                assert isinstance(value, Symbolic)
+                assert lltype.typeOf(value) == lltype.Signed
         self.value = value
 
     def forget_value(self):

File pypy/jit/metainterp/test/test_virtualref.py

View file
         # try reloading from blackhole.py's point of view
         from pypy.jit.metainterp.resume import ResumeDataDirectReader
         cpu = self.metainterp.cpu
-        cpu.get_latest_value_count = lambda : len(guard_op.getfailargs())
-        cpu.get_latest_value_int = lambda i:guard_op.getfailargs()[i].getint()
-        cpu.get_latest_value_ref = lambda i:guard_op.getfailargs()[i].getref_base()
+        cpu.get_latest_value_count = lambda df: len(guard_op.getfailargs())
+        cpu.get_latest_value_int = lambda df,i:guard_op.getfailargs()[i].getint()
+        cpu.get_latest_value_ref = lambda df,i:guard_op.getfailargs()[i].getref_base()
         cpu.clear_latest_values = lambda count: None
         class FakeMetaInterpSd:
             callinfocollection = None
         FakeMetaInterpSd.cpu = cpu
         resumereader = ResumeDataDirectReader(FakeMetaInterpSd(),
-                                              guard_op.getdescr())
+                                              guard_op.getdescr(),
+                                              "deadframe")
         vrefinfo = self.metainterp.staticdata.virtualref_info
         lst = []
         vrefinfo.continue_tracing = lambda vref, virtual: \
                                lst[0][0])  # assert correct type
         #
         # try reloading from pyjitpl's point of view
-        self.metainterp.rebuild_state_after_failure(guard_op.getdescr())
+        self.metainterp.rebuild_state_after_failure(guard_op.getdescr(),
+                                                    "deadframe")
         assert len(self.metainterp.framestack) == 1
         assert len(self.metainterp.virtualref_boxes) == 2
         assert self.metainterp.virtualref_boxes[0].value == bxs1[0].value