Commits

Armin Rigo committed b6d464a

fixfixfix

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)
         #
         frame = self.cpu._execute_token(descr, *args)
                 return None
         #
         del self.latest_descr
-        del self.latest_values
         return support.cast_result(lltype.typeOf(result), result)
     execute_call_assembler_i = execute_call_assembler
     execute_call_assembler_r = execute_call_assembler

pypy/jit/backend/test/runner_test.py

         ops = '''
         [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
         i10 = int_add_ovf(i0, i1)
-        guard_no_overflow(descr=faildescr2) []
+        guard_no_overflow(descr=faildescr2)
         i11 = int_add(i10, i2)
         i12 = int_add(i11, i3)
         i13 = int_add(i12, i4)
         i16 = int_add(i15, i7)
         i17 = int_add(i16, i8)
         i18 = int_add(i17, i9)
-        finish(i18, descr=faildescr1) []'''
+        finish(i18, descr=faildescr1)'''
         inputargs, operations, looptoken = self.parse(
             ops, namespace={'faildescr1': BasicFailDescr(1)})
         operations[-1].getdescr().fast_path_done = True
         [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9]
         i10 = int_add(i0, 42)
         i11 = call_assembler_i(i10, i1, i2, i3, i4, i5, i6, i7, i8, i9, descr=looptoken)
-        guard_not_forced(descr=faildescr1)[]
-        finish(i11, descr=faildescr2) []
+        guard_not_forced(descr=faildescr1)
+        finish(i11, descr=faildescr2)
         '''
         faildescr1 = BasicFailDescr(1)
         faildescr2 = BasicFailDescr(2)
         for _ in range(10):
             self.cpu.reserve_some_free_fail_descr_number()
         ops = '''
-        [f0, f1]
-        i0 = float_eq(f0, -1.0)
-        guard_false(i0, descr=faildescr3) []
-        f2 = float_add(f0, f1)
-        finish(f2, descr=faildescr) []'''
+        [f0, f4]
+        i6 = float_eq(f0, -1.0)
+        guard_false(i6, descr=faildescr3)
+        f2 = float_add(f0, f4)
+        finish(f2, descr=faildescr)'''
         inputargs, operations, looptoken = self.parse(
             ops, namespace={'faildescr': BasicFailDescr(1)})
         operations[-1].getdescr().fast_path_done = True
         x = self.cpu.get_finish_value_float(frame)
         assert longlong.getrealfloat(x) == 1.2 + 2.3
         ops = '''
-        [f4, f5]
-        f3 = call_assembler_f(f4, f5, descr=looptoken)
-        guard_not_forced(descr=faildescr1)[]
-        finish(f3, descr=faildescr2) []
+        [f4, f6]
+        f2 = call_assembler_f(f4, f6, descr=looptoken)
+        guard_not_forced(descr=faildescr1)
+        finish(f2, descr=faildescr2)
         '''
         faildescr1 = BasicFailDescr(1)
         faildescr2 = BasicFailDescr(2)
         ops = '''
         [p0]
         call_v(ConstClass(fptr2), p0, descr=calldescr2)
-        finish(p0, descr=faildescr1) []'''
+        finish(p0, descr=faildescr1)'''
         inputargs, operations, looptoken = self.parse(ops, namespace=locals())
         # not a fast_path finish!
         looptoken.outermost_jitdriver_sd = FakeJitDriverSD()
         []
         p0 = jit_frame()
         p1 = call_assembler_r(p0, descr=looptoken)
-        guard_not_forced(descr=foodescr) []
-        finish(descr=faildescr2) []
+        guard_not_forced(descr=foodescr)
+        finish(descr=faildescr2)
         '''
         inputargs, operations, othertoken = self.parse(ops, namespace=locals())
         self.cpu.compile_loop(inputargs, operations, othertoken)
             py.test.skip("requires floats")
         called = []
         def assembler_helper(jitframe):
-            faildescr =self.cpu.get_latest_descr(jitframe)
+            faildescr = self.cpu.get_latest_descr(jitframe)
             failindex = self.cpu.get_fail_descr_number(faildescr)
             called.append(failindex)
             return 13.5
         for _ in range(10):
             self.cpu.reserve_some_free_fail_descr_number()
         ops = '''
-        [f0, f1]
-        i0 = float_eq(f0, -1.0)
-        guard_false(i0, descr=faildescr2) []
-        f2 = float_add(f0, f1)
-        finish(f2, descr=faildescr1) []'''
+        [f0, f4]
+        i6 = float_eq(f0, -1.0)
+        guard_false(i6, descr=faildescr2)
+        f2 = float_add(f0, f4)
+        finish(f2, descr=faildescr1)'''
         inputargs, operations, looptoken = self.parse(
             ops, namespace={'faildescr1': BasicFailDescr(1)})
         operations[-1].getdescr().fast_path_done = True
         assert not called
 
         ops = '''
-        [f4, f5]
-        f3 = call_assembler_f(f4, f5, descr=looptoken)
-        guard_not_forced(descr=faildescr1)[]
-        finish(f3, descr=faildescr2) []
+        [f4, f6]
+        f2 = call_assembler_f(f4, f6, descr=looptoken)
+        guard_not_forced(descr=faildescr1)
+        finish(f2, descr=faildescr2)
         '''
         faildescr2 = BasicFailDescr(2)
         faildescr1 = BasicFailDescr(1)
 
         # compile a replacement
         ops2 = '''
-        [f0, f1]
-        i0 = float_eq(f0, -2.0)
-        guard_false(i0, descr=faildescr3) []
-        f2 = float_sub(f0, f1)
-        finish(f2, descr=faildescr) []'''
+        [f0, f2]
+        ieq = float_eq(f0, -2.0)
+        guard_false(ieq, descr=faildescr3)
+        f4 = float_sub(f0, f2)
+        finish(f4, descr=faildescr)'''
         inputargs2, operations2, looptoken2 = self.parse(
             ops2, namespace={'faildescr': BasicFailDescr(1)})
         operations2[-1].getdescr().fast_path_done = True