pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_methodcall_kwargs_regression
self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x000000001062be88>
def test_methodcall_kwargs_regression(self):
log = self.run("""
class A:
def f(self, x, y, z):
return x + y + z
def main():
a = A()
res = 0
for i in range(10000):
a.f(x=i, y=i+1, z=i*2) # ID: meth
res += i
""", [])
loop, = log.loops_by_id('meth')
> assert loop.match_by_id("meth", """
setfield_gc(p15, i65, descr=...)
guard_not_invalidated(descr=...)
i68 = int_mul_ovf(i62, 2)
guard_no_overflow(descr=...)
p69 = force_token()
""")
pypy/module/pypyjit/test_pypy_c/test_call.py:682:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy/module/pypyjit/test_pypy_c/model.py:182: in match_by_id
return matcher.match(expected_src, ignore_ops=ignore_ops)
pypy/module/pypyjit/test_pypy_c/model.py:524: in match
self.match_loop(expected_ops, ignore_ops)
pypy/module/pypyjit/test_pypy_c/model.py:500: in match_loop
self.match_op(op, exp_op)
pypy/module/pypyjit/test_pypy_c/model.py:409: in match_op
self._assert(op.name == exp_opname, "operation mismatch")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x00000000106a7e50>
cond = False, message = 'operation mismatch'
def _assert(self, cond, message):
if not cond:
> raise InvalidMatch(message, frame=sys._getframe(1))
E InvalidMatch: operation mismatch
pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch
---------- Captured stdout call ----------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = 'meth'
('operation mismatch',)
<could not determine information>
Ignore ops: []
Got:
setfield_gc(p14, i64, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>)
===== HERE =====
i66 = int_mul_ovf(i61, 2)
guard_no_overflow(descr=<Guard0x7f0236aab970>)
p68 = force_token()
Expected:
setfield_gc(p15, i65, descr=...)
guard_not_invalidated(descr=...)
i68 = int_mul_ovf(i62, 2)
guard_no_overflow(descr=...)
p69 = force_token()
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_methodcall_kwargs_regression