pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_virtual
self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x000000000eed7d70>
def test_kwargs_virtual(self):
def main(n):
def g(**kwargs):
return kwargs["x"] + 1
i = 0
while i < n:
i = g(x=i)
return i
log = self.run(main, [500])
assert log.result == 500
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated?
i3 = force_token()
i4 = int_add(i0, 1)
--TICK--
jump(..., descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_call.py:495:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy/module/pypyjit/test_pypy_c/model.py:177: in match
return matcher.match(expected_src, **kwds)
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 0x000000000f387050>
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 = None
('operation mismatch',)
<could not determine information>
Ignore ops: []
Got:
===== HERE =====
guard_not_invalidated(descr=<Guard0x7f1737de3920>)
i54 = int_lt(i48, i24)
guard_true(i54, descr=<Guard0x7f1737d13168>)
p55 = force_token()
i59 = int_add(i48, 1)
i62 = getfield_raw_i(139737696635552, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i64 = int_lt(i62, 0)
guard_false(i64, descr=<Guard0x7f1737d131d8>)
jump(p0, p1, p8, p10, i59, i24, p38, descr=TargetToken(139737697445984))
Expected:
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
guard_not_invalidated?
i3 = force_token()
i4 = int_add(i0, 1)
guard_not_invalidated?
ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>)
ticker_cond0 = int_lt(ticker0, 0)
guard_false(ticker_cond0, descr=...)
jump(..., descr=...)
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_virtual