[pypy-svn] r74877 - in pypy/branch/blackhole-improvement/pypy/jit: backend backend/llgraph backend/test backend/x86 backend/x86/test metainterp metainterp/test

arigo at codespeak.net arigo at codespeak.net
Fri May 28 22:33:52 CEST 2010


Author: arigo
Date: Fri May 28 22:33:50 2010
New Revision: 74877

Modified:
   pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/llimpl.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/runner.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/model.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/test/runner_test.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/test/test_random.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/assembler.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/regalloc.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/ri386.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/runner.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_basic.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py
   pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc2.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/compile.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/optimizeopt.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/resume.py
   pypy/branch/blackhole-improvement/pypy/jit/metainterp/test/test_virtualref.py
Log:
In-progress.


Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/llimpl.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/llimpl.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/llimpl.py	Fri May 28 22:33:50 2010
@@ -1080,8 +1080,9 @@
     frame = _from_opaque(frame)
     return len(frame.fail_args)
 
-def frame_clear_latest_values(frame):
+def frame_clear_latest_values(frame, count):
     frame = _from_opaque(frame)
+    assert count == len(frame.fail_args)
     del frame.fail_args
 
 _last_exception = None

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/runner.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/llgraph/runner.py	Fri May 28 22:33:50 2010
@@ -247,8 +247,8 @@
         token = llimpl.get_frame_forced_token(self.latest_frame)
         return llmemory.cast_adr_to_int(token)
 
-    def clear_latest_values(self):
-        llimpl.frame_clear_latest_values(self.latest_frame)
+    def clear_latest_values(self, count):
+        llimpl.frame_clear_latest_values(self.latest_frame, count)
 
     # ----------
 

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/model.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/model.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/model.py	Fri May 28 22:33:50 2010
@@ -87,7 +87,8 @@
 
     def get_latest_value_count(self):
         """Return how many values are ready to be returned by
-        get_latest_value_xxx()."""
+        get_latest_value_xxx().  Only after a guard failure; not
+        necessarily correct after a FINISH."""
         raise NotImplementedError
 
     def get_latest_force_token(self):
@@ -95,9 +96,10 @@
         same FORCE_TOKEN result as the one in the just-failed loop."""
         raise NotImplementedError
 
-    def clear_latest_values(self):
-        """Clear the latest values (at least the ref ones, so that
-        they no longer keep objects alive)."""
+    def clear_latest_values(self, count):
+        """Clear the latest values (at least the ref ones), so that
+        they no longer keep objects alive.  'count' is the number of
+        values -- normally get_latest_value_count()."""
         raise NotImplementedError
 
     def grab_exc_value(self):

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/test/runner_test.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/test/runner_test.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/test/runner_test.py	Fri May 28 22:33:50 2010
@@ -265,7 +265,7 @@
         assert count == 3
         assert self.cpu.get_latest_value_int(1) == 10
         assert self.cpu.get_latest_value_int(1) == 10   # multiple reads ok
-        self.cpu.clear_latest_values()
+        self.cpu.clear_latest_values(3)
 
     def test_finish(self):
         i0 = BoxInt()

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/test/test_random.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/test/test_random.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/test/test_random.py	Fri May 28 22:33:50 2010
@@ -413,7 +413,7 @@
     OPERATIONS.append(UnaryOperation(_op))
 
 OPERATIONS.append(UnaryOperation(rop.INT_IS_TRUE, boolres=True))
-OPERATIONS.append(BooleanUnaryOperation(rop.BOOL_NOT, boolres=True))
+OPERATIONS.append(UnaryOperation(rop.INT_IS_ZERO, boolres=True))
 OPERATIONS.append(ConstUnaryOperation(rop.SAME_AS, boolres='sometimes'))
 
 for _op in [rop.INT_ADD_OVF,
@@ -434,8 +434,6 @@
             ]:
     OPERATIONS.append(UnaryFloatOperation(_op))
 
-OPERATIONS.append(UnaryFloatOperation(rop.FLOAT_IS_TRUE, boolres=True))
-
 OPERATIONS.append(CastFloatToIntOperation(rop.CAST_FLOAT_TO_INT))
 OPERATIONS.append(CastIntToFloatOperation(rop.CAST_INT_TO_FLOAT))
 

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/assembler.py	Fri May 28 22:33:50 2010
@@ -639,8 +639,8 @@
     genop_int_ne = _cmpop("NE", "NE")
     genop_int_gt = _cmpop("G", "L")
     genop_int_ge = _cmpop("GE", "LE")
-    genop_oois = genop_int_eq
-    genop_ooisnot = genop_int_ne
+    genop_ptr_eq = genop_int_eq
+    genop_ptr_ne = genop_int_ne
 
     genop_float_lt = _cmpop_float('B')
     genop_float_le = _cmpop_float('BE')
@@ -660,8 +660,8 @@
     genop_guard_int_ne = _cmpop_guard("NE", "NE", "E", "E")
     genop_guard_int_gt = _cmpop_guard("G", "L", "LE", "GE")
     genop_guard_int_ge = _cmpop_guard("GE", "LE", "L", "G")
-    genop_guard_oois = genop_guard_int_eq
-    genop_guard_ooisnot = genop_guard_int_ne
+    genop_guard_ptr_eq = genop_guard_int_eq
+    genop_guard_ptr_ne = genop_guard_int_ne
 
     genop_guard_uint_gt = _cmpop_guard("A", "B", "BE", "AE")
     genop_guard_uint_lt = _cmpop_guard("B", "A", "AE", "BE")
@@ -733,7 +733,7 @@
         self.mc.SETNE(rl)
         self.mc.MOVZX(resloc, rl)
 
-    def genop_guard_bool_not(self, op, guard_op, addr, arglocs, resloc):
+    def genop_guard_int_is_zero(self, op, guard_op, addr, arglocs, resloc):
         guard_opnum = guard_op.opnum
         self.mc.CMP(arglocs[0], imm8(0))
         if guard_opnum == rop.GUARD_TRUE:
@@ -741,8 +741,11 @@
         else:
             return self.implement_guard(addr, self.mc.JZ)
 
-    def genop_bool_not(self, op, arglocs, resloc):
-        self.mc.XOR(arglocs[0], imm8(1))
+    def genop_int_is_zero(self, op, arglocs, resloc):
+        self.mc.CMP(arglocs[0], imm8(0))
+        rl = resloc.lowest8bits()
+        self.mc.SETE(rl)
+        self.mc.MOVZX(resloc, rl)
 
     def genop_same_as(self, op, arglocs, resloc):
         self.mov(arglocs[0], resloc)
@@ -1125,39 +1128,6 @@
             arglocs.append(loc)
         return arglocs[:]
 
-    def make_boxes_from_latest_values(self, bytecode):
-        bytecode = rffi.cast(rffi.UCHARP, bytecode)
-        boxes = []
-        while 1:
-            # decode the next instruction from the bytecode
-            code = rffi.cast(lltype.Signed, bytecode[0])
-            bytecode = rffi.ptradd(bytecode, 1)
-            kind = code & 3
-            while code > 0x7F:
-                code = rffi.cast(lltype.Signed, bytecode[0])
-                bytecode = rffi.ptradd(bytecode, 1)
-            index = len(boxes)
-            if kind == self.DESCR_INT:
-                box = BoxInt(self.fail_boxes_int.getitem(index))
-            elif kind == self.DESCR_REF:
-                box = BoxPtr(self.fail_boxes_ptr.getitem(index))
-                # clear after reading (xxx duplicates
-                # get_latest_value_ref())
-                self.fail_boxes_ptr.setitem(index, lltype.nullptr(
-                    llmemory.GCREF.TO))
-            elif kind == self.DESCR_FLOAT:
-                box = BoxFloat(self.fail_boxes_float.getitem(index))
-            else:
-                assert kind == self.DESCR_SPECIAL
-                if code == self.CODE_STOP:
-                    break
-                elif code == self.CODE_HOLE:
-                    box = None
-                else:
-                    assert 0, "bad code"
-            boxes.append(box)
-        return boxes
-
     @rgc.no_collect
     def grab_frame_values(self, bytecode, frame_addr, allregisters):
         # no malloc allowed here!!

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/regalloc.py	Fri May 28 22:33:50 2010
@@ -3,7 +3,7 @@
 """
 
 from pypy.jit.metainterp.history import (Box, Const, ConstInt, ConstPtr,
-                                         ResOperation, ConstAddr, BoxPtr,
+                                         ResOperation, BoxPtr,
                                          LoopToken, INT, REF, FLOAT)
 from pypy.jit.backend.x86.ri386 import *
 from pypy.rpython.lltypesystem import lltype, ll2ctypes, rffi, rstr
@@ -11,6 +11,7 @@
 from pypy.rlib import rgc
 from pypy.jit.backend.llsupport import symbolic
 from pypy.jit.backend.x86.jump import remap_frame_layout
+from pypy.jit.codewriter import heaptracker
 from pypy.jit.metainterp.resoperation import rop
 from pypy.jit.backend.llsupport.descr import BaseFieldDescr, BaseArrayDescr
 from pypy.jit.backend.llsupport.descr import BaseCallDescr, BaseSizeDescr
@@ -45,8 +46,6 @@
                 print "convert_to_imm: ConstPtr needs special care"
                 raise AssertionError
             return imm(rffi.cast(lltype.Signed, c.value))
-        elif isinstance(c, ConstAddr):
-            return imm(ll2ctypes.cast_adr_to_int(c.value))
         else:
             print "convert_to_imm: got a %s" % c
             raise AssertionError
@@ -540,8 +539,8 @@
     consider_uint_lt = _consider_compop
     consider_uint_le = _consider_compop
     consider_uint_ge = _consider_compop
-    consider_oois = _consider_compop
-    consider_ooisnot = _consider_compop
+    consider_ptr_eq = _consider_compop
+    consider_ptr_ne = _consider_compop
 
     def _consider_float_op(self, op):
         loc1 = self.xrm.loc(op.args[1])
@@ -583,20 +582,6 @@
         self.Perform(op, [loc0], loc0)
         self.xrm.possibly_free_var(op.args[0])
 
-    def consider_float_is_true(self, op, guard_op):
-        # doesn't need arg to be in a register
-        tmpbox0 = TempBox()
-        loc0 = self.xrm.force_allocate_reg(tmpbox0)
-        loc1 = self.xrm.loc(op.args[0])
-        arglocs = [loc0, loc1]
-        self.xrm.possibly_free_var(op.args[0])
-        self.xrm.possibly_free_var(tmpbox0)
-        if guard_op is not None:
-            self.perform_with_guard(op, guard_op, arglocs, None)
-        else:
-            loc2 = self.rm.force_allocate_reg(op.result, need_lower_byte=True)
-            self.Perform(op, arglocs, loc2)
-
     def consider_cast_float_to_int(self, op):
         loc0 = self.xrm.make_sure_var_in_reg(op.args[0], imm_fine=False)
         loc1 = self.rm.force_allocate_reg(op.result)
@@ -715,7 +700,7 @@
 
     def consider_new_with_vtable(self, op):
         classint = op.args[0].getint()
-        descrsize = self.assembler.cpu.class_sizes[classint]
+        descrsize = heaptracker.vtable2descr(self.assembler.cpu, classint)
         if self.assembler.cpu.gc_ll_descr.can_inline_malloc(descrsize):
             self._fastpath_malloc(op, descrsize)
             self.assembler.set_vtable(eax, imm(classint))
@@ -879,14 +864,7 @@
             resloc = self.rm.force_allocate_reg(op.result, need_lower_byte=True)
             self.Perform(op, [argloc], resloc)
 
-    def consider_bool_not(self, op, guard_op):
-        if guard_op is not None:
-            # doesn't need arg to be in a register
-            argloc = self.loc(op.args[0])
-            self.rm.possibly_free_var(op.args[0])
-            self.perform_with_guard(op, guard_op, [argloc], None)
-        else:
-            self.consider_int_neg(op)
+    consider_int_is_zero = consider_int_is_true
 
     def consider_same_as(self, op):
         argloc = self.loc(op.args[0])

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/ri386.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/ri386.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/ri386.py	Fri May 28 22:33:50 2010
@@ -1,6 +1,7 @@
 from pypy.rlib.rarithmetic import intmask
 from pypy.rlib.objectmodel import ComputedIntSymbolic, we_are_translated
 from pypy.rlib.debug import make_sure_not_resized
+from pypy.rpython.lltypesystem import llmemory
 
 class OPERAND(object):
     _attrs_ = []
@@ -289,8 +290,7 @@
 def imm(value):
     if isinstance(value, ComputedIntSymbolic):
         value = value.compute_fn()
-    if not we_are_translated():
-        assert type(value) is int
+    value = llmemory.get_inthash_from_int(value)
     if single_byte(value):
         return imm8(value)
     else:

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/runner.py	Fri May 28 22:33:50 2010
@@ -70,19 +70,20 @@
         return self.assembler.fail_boxes_float.getitem(index)
 
     def get_latest_value_ref(self, index):
-        ptrvalue = self.assembler.fail_boxes_ptr.getitem(index)
-        # clear after reading
-        self.assembler.fail_boxes_ptr.setitem(index, lltype.nullptr(
-            llmemory.GCREF.TO))
-        return ptrvalue
+        return self.assembler.fail_boxes_ptr.getitem(index)
+
+    def get_latest_value_count(self):
+        XXX
+
+    def clear_latest_values(self, count):
+        setitem = self.assembler.fail_boxes_ptr.setitem
+        null = lltype.nullptr(llmemory.GCREF.TO)
+        for index in range(count):
+            setitem(index, null)
 
     def get_latest_force_token(self):
         return self.assembler.fail_ebp + FORCE_INDEX_OFS
 
-    def make_boxes_from_latest_values(self, faildescr):
-        return self.assembler.make_boxes_from_latest_values(
-            faildescr._x86_failure_recovery_bytecode)
-
     def execute_token(self, executable_token):
         addr = executable_token._x86_bootstrap_code
         func = rffi.cast(lltype.Ptr(self.BOOTSTRAP_TP), addr)
@@ -139,9 +140,6 @@
 
 CPU = CPU386
 
-import pypy.jit.metainterp.executor
-pypy.jit.metainterp.executor.make_execute_list(CPU)
-
 # silence warnings
 
 history.LoopToken._x86_param_depth = 0

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_basic.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_basic.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_basic.py	Fri May 28 22:33:50 2010
@@ -2,7 +2,7 @@
 from pypy.jit.backend.x86.runner import CPU386
 from pypy.jit.metainterp.warmspot import ll_meta_interp
 from pypy.jit.metainterp.test import test_basic
-from pypy.jit.metainterp.policy import StopAtXPolicy
+from pypy.jit.codewriter.policy import StopAtXPolicy
 from pypy.rlib.jit import JitDriver, OPTIMIZER_SIMPLE
 
 class Jit386Mixin(test_basic.LLJitMixin):

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc.py	Fri May 28 22:33:50 2010
@@ -522,18 +522,20 @@
         assert self.getint(0) == 0
 
     def test_bug_float_is_true_stack(self):
+        # NB. float_is_true no longer exists.  Unsure if keeping this test
+        # makes sense any more.
         ops = '''
         [f0, f1, f2, f3, f4, f5, f6, f7, f8, f9]
-        i0 = float_is_true(f0)
-        i1 = float_is_true(f1)
-        i2 = float_is_true(f2)
-        i3 = float_is_true(f3)
-        i4 = float_is_true(f4)
-        i5 = float_is_true(f5)
-        i6 = float_is_true(f6)
-        i7 = float_is_true(f7)
-        i8 = float_is_true(f8)
-        i9 = float_is_true(f9)
+        i0 = float_ne(f0, ConstFloat(0.0))
+        i1 = float_ne(f1, ConstFloat(0.0))
+        i2 = float_ne(f2, ConstFloat(0.0))
+        i3 = float_ne(f3, ConstFloat(0.0))
+        i4 = float_ne(f4, ConstFloat(0.0))
+        i5 = float_ne(f5, ConstFloat(0.0))
+        i6 = float_ne(f6, ConstFloat(0.0))
+        i7 = float_ne(f7, ConstFloat(0.0))
+        i8 = float_ne(f8, ConstFloat(0.0))
+        i9 = float_ne(f9, ConstFloat(0.0))
         finish(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9)
         '''
         loop = self.interpret(ops, [0.0, .1, .2, .3, .4, .5, .6, .7, .8, .9])

Modified: pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc2.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc2.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/backend/x86/test/test_regalloc2.py	Fri May 28 22:33:50 2010
@@ -35,7 +35,7 @@
         ResOperation(rop.INT_MUL, [v1, v1], v2),
         ResOperation(rop.INT_MUL, [v2, v1], v3),
         ResOperation(rop.INT_IS_TRUE, [v2], tmp5),
-        ResOperation(rop.BOOL_NOT, [tmp5], v4),
+        ResOperation(rop.INT_IS_ZERO, [tmp5], v4),
         ResOperation(rop.FINISH, [v4, v3, tmp5], None, descr=BasicFailDescr()),
             ]
     cpu = CPU(None, None)

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/blackhole.py	Fri May 28 22:33:50 2010
@@ -550,9 +550,6 @@
     @arguments("f", returns="f")
     def bhimpl_float_abs(a):
         return abs(a)
-    @arguments("f", returns="i")
-    def bhimpl_float_is_true(a):
-        return bool(a)
 
     @arguments("f", "f", returns="f")
     def bhimpl_float_add(a, b):

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/compile.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/compile.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/compile.py	Fri May 28 22:33:50 2010
@@ -156,6 +156,7 @@
         assert metainterp_sd.result_type == 'ref'
         cpu = metainterp_sd.cpu
         result = cpu.get_latest_value_ref(0)
+        cpu.clear_latest_values(1)
         raise metainterp_sd.DoneWithThisFrameRef(cpu, result)
 
 class DoneWithThisFrameDescrFloat(_DoneWithThisFrameDescr):
@@ -168,6 +169,7 @@
     def handle_fail(self, metainterp_sd):
         cpu = metainterp_sd.cpu
         value = cpu.get_latest_value_ref(0)
+        cpu.clear_latest_values(1)
         raise metainterp_sd.ExitFrameWithExceptionRef(cpu, value)
 
 

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/optimizeopt.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/optimizeopt.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/optimizeopt.py	Fri May 28 22:33:50 2010
@@ -757,6 +757,9 @@
     def optimize_INT_IS_TRUE(self, op):
         self._optimize_nullness(op, op.args[0], True)
 
+    def optimize_INT_IS_ZERO(self, op):
+        self._optimize_nullness(op, op.args[0], False)
+
     def _optimize_oois_ooisnot(self, op, expect_isnot):
         value0 = self.getvalue(op.args[0])
         value1 = self.getvalue(op.args[1])

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/resume.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/resume.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/resume.py	Fri May 28 22:33:50 2010
@@ -548,7 +548,7 @@
         self.write_a_float(register_index, value)
 
     def done(self):
-        self.cpu.clear_latest_values()
+        self.cpu.clear_latest_values(self.cpu.get_latest_value_count())
 
 # ---------- when resuming for pyjitpl.py, make boxes ----------
 

Modified: pypy/branch/blackhole-improvement/pypy/jit/metainterp/test/test_virtualref.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/metainterp/test/test_virtualref.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/metainterp/test/test_virtualref.py	Fri May 28 22:33:50 2010
@@ -87,7 +87,7 @@
         cpu.get_latest_value_count = lambda : len(guard_op.fail_args)
         cpu.get_latest_value_int = lambda i:guard_op.fail_args[i].getint()
         cpu.get_latest_value_ref = lambda i:guard_op.fail_args[i].getref_base()
-        cpu.clear_latest_values = lambda : None
+        cpu.clear_latest_values = lambda count: None
         resumereader = ResumeDataDirectReader(cpu, guard_op.descr)
         vrefinfo = self.metainterp.staticdata.virtualref_info
         lst = []



More information about the Pypy-commit mailing list