Commits

Armin Rigo committed 3822db2

fixfix

Comments (0)

Files changed (2)

pypy/jit/backend/llgraph/runner.py

         call_op = self.lltrace.operations[self.current_index]
         guard_op = self.lltrace.operations[self.current_index + 1]
         assert guard_op.getopnum() == rop.GUARD_NOT_FORCED
-        XXX
-        self.latest_values = self._getfailargs(guard_op, skip=call_op)
         self.latest_descr = _getdescr(guard_op)
         res = self.execute_call(calldescr, func, *args)
         del self.latest_descr
-        del self.latest_values
         return res
     execute_call_may_force_i = execute_call_may_force
     execute_call_may_force_r = execute_call_may_force

pypy/jit/backend/test/runner_test.py

                 values.append(descr)
                 x = self.cpu.force(token)
                 assert x is None
-                values.append(self.cpu.get_latest_value_int(token, 0))
-                values.append(self.cpu.get_latest_value_int(token, 1))
+                values.append(self.get_frame_value(token, "i1"))
+                values.append(self.get_frame_value(token, "i0"))
                 values.append(token)
 
         FUNC = self.FuncType([self.cpu.JITFRAMEPTR, lltype.Signed], lltype.Void)
         def maybe_force(token, flag):
             if flag:
                self.cpu.force(token)
-               values.append(self.cpu.get_latest_value_int(token, 0))
-               values.append(self.cpu.get_latest_value_int(token, 2))
+               values.append(self.get_frame_value(token, "i1"))
+               values.append(self.get_frame_value(token, "i0"))
                values.append(token)
             return 42
 
         [i0, i1]
         ptok = jit_frame()
         i2 = call_may_force_i(ConstClass(func_ptr), ptok, i1, descr=calldescr)
-        guard_not_forced(descr=faildescr) [i1, i2, i0]
+        guard_not_forced(descr=faildescr)
         finish(i2, descr=faildescr0)
         """, locals())
         self.cpu.compile_loop(inputargs, ops, looptoken)
 
         frame = self.cpu.execute_token(looptoken, 10, 1)
         assert self.cpu.get_latest_descr(frame).identifier == 1
-        assert self.cpu.get_latest_value_int(frame, 0) == 1
-        assert self.cpu.get_latest_value_int(frame, 1) == 42
-        assert self.cpu.get_latest_value_int(frame, 2) == 10
+        assert self.get_frame_value(frame, "i1") == 1
+        assert self.get_frame_value(frame, "i2") == 42
+        assert self.get_frame_value(frame, "i0") == 10
         assert values == [1, 10, frame]
 
     def test_force_operations_returning_float(self):
         def maybe_force(token, flag):
             if flag:
                self.cpu.force(token)
-               values.append(self.cpu.get_latest_value_int(token, 0))
-               values.append(self.cpu.get_latest_value_int(token, 2))
+               values.append(self.get_frame_value(token, "i1"))
+               values.append(self.get_frame_value(token, "i0"))
                values.append(token)
             return 42.5
 
         inputargs, ops, looptoken = self.parse("""
         [i0, i1]
         ptok = jit_frame()
-        f0 = call_may_force_f(ConstClass(func_ptr), ptok, i1, descr=calldescr)
-        guard_not_forced(descr=faildescr) [i1, f0, i0]
-        finish(f0, descr=faildescr0) []
+        f2 = call_may_force_f(ConstClass(func_ptr), ptok, i1, descr=calldescr)
+        guard_not_forced(descr=faildescr)
+        finish(f2, descr=faildescr0)
         """, locals())
         self.cpu.compile_loop(inputargs, ops, looptoken)
         frame = self.cpu.execute_token(looptoken, 20, 0)
 
         frame = self.cpu.execute_token(looptoken, 10, 1)
         assert self.cpu.get_latest_descr(frame).identifier == 1
-        assert self.cpu.get_latest_value_int(frame, 0) == 1
-        x = self.cpu.get_latest_value_float(frame, 1)
-        assert longlong.getrealfloat(x) == 42.5
-        assert self.cpu.get_latest_value_int(frame, 2) == 10
+        assert self.get_frame_value(frame, "i1") == 1
+        assert longlong.getrealfloat(self.get_frame_value(frame, "f2")) == 42.5
+        assert self.get_frame_value(frame, "i0") == 10
         assert values == [1, 10, frame]
 
     def test_force_from_finish(self):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.