Armin Rigo avatar Armin Rigo committed 0ec90b3

Fix test.

Comments (0)

Files changed (1)

pypy/jit/backend/x86/test/test_runner.py

                     ops[-2].setfailargs([i1])
                     looptoken = JitCellToken()
                     self.cpu.compile_loop([b], ops, looptoken)
-                    self.cpu.execute_token(looptoken, b.value)
-                    result = self.cpu.get_latest_value_int(0)
+                    deadframe = self.cpu.execute_token(looptoken, b.value)
+                    result = self.cpu.get_latest_value_int(deadframe, 0)
                     if guard == rop.GUARD_FALSE:
                         assert result == execute(self.cpu, None,
                                                  op, None, b).value
                     looptoken = JitCellToken()
                     self.cpu.compile_loop(inputargs, ops, looptoken)
                     inputvalues = [box.value for box in inputargs]
-                    self.cpu.execute_token(looptoken, *inputvalues)
-                    result = self.cpu.get_latest_value_int(0)
+                    deadframe = self.cpu.execute_token(looptoken, *inputvalues)
+                    result = self.cpu.get_latest_value_int(deadframe, 0)
                     expected = execute(self.cpu, None, op, None, a, b).value
                     if guard == rop.GUARD_FALSE:
                         assert result == expected
         assert address >= loopaddress + loopsize
         assert size >= 10 # randomish number
 
-        fail = self.cpu.execute_token(looptoken, 2)
+        deadframe = self.cpu.execute_token(looptoken, 2)
+        fail = self.cpu.get_latest_descr(deadframe)
         assert fail.identifier == 2
-        res = self.cpu.get_latest_value_int(0)
+        res = self.cpu.get_latest_value_int(deadframe, 0)
         assert res == 20
 
     def test_ops_offset(self):
             looptoken = JitCellToken()
             self.cpu.compile_loop([i1, i2], ops, looptoken)
 
-            fail = self.cpu.execute_token(looptoken, 123450, 123408)
+            deadframe = self.cpu.execute_token(looptoken, 123450, 123408)
+            fail = self.cpu.get_latest_descr(deadframe)
             assert fail.identifier == 0
-            assert self.cpu.get_latest_value_int(0) == 42
-            assert self.cpu.get_latest_value_int(1) == 42
-            assert self.cpu.get_latest_value_int(2) == 42
-            assert self.cpu.get_latest_value_int(3) == 42
+            assert self.cpu.get_latest_value_int(deadframe, 0) == 42
+            assert self.cpu.get_latest_value_int(deadframe, 1) == 42
+            assert self.cpu.get_latest_value_int(deadframe, 2) == 42
+            assert self.cpu.get_latest_value_int(deadframe, 3) == 42
 
 
 class TestDebuggingAssembler(object):
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.