1. Pypy
  2. Untitled project
  3. pypy

Source

pypy / pypy / jit / backend / test / test_random.py

The branch 'remove-globals-in-jit' does not exist.
Diff from to

File pypy/jit/backend/test/test_random.py

  • Ignore whitespace
     def run_loop(self):
         cpu = self.builder.cpu
         self.clear_state()
-        exc = cpu.grab_exc_value()
-        assert not exc
+        # disable check for now
+	# exc = cpu.grab_exc_value()
+	# assert not exc
 
         arguments = [box.value for box in self.loop.inputargs]
-        fail = cpu.execute_token(self.runjitcelltoken(), *arguments)
+        deadframe = cpu.execute_token(self.runjitcelltoken(), *arguments)
+        fail = cpu.get_latest_descr(deadframe)
         do_assert(fail is self.should_fail_by.getdescr(),
                   "Got %r, expected %r" % (fail,
                                            self.should_fail_by.getdescr()))
         for i, v in enumerate(self.get_fail_args()):
             if isinstance(v, (BoxFloat, ConstFloat)):
-                value = cpu.get_latest_value_float(i)
+                value = cpu.get_latest_value_float(deadframe, i)
             else:
-                value = cpu.get_latest_value_int(i)
+                value = cpu.get_latest_value_int(deadframe, i)
             do_assert(value == self.expected[v],
                 "Got %r, expected %r for value #%d" % (value,
                                                        self.expected[v],
                                                        i)
                 )
-        exc = cpu.grab_exc_value()
+        exc = cpu.grab_exc_value(deadframe)
         if (self.guard_op is not None and
             self.guard_op.is_guard_exception()):
             if self.guard_op.getopnum() == rop.GUARD_NO_EXCEPTION: