pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_func_defaults
self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x000000002f0cad40>
def test_func_defaults(self):
def main(n):
i = 1
while i < n:
i += len(range(i+1)) - i
return i
log = self.run(main, [10000])
assert log.result == 10000
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i10 = int_lt(i5, i6)
guard_true(i10, descr=...)
guard_not_invalidated(descr=...)
i120 = int_add(i5, 1)
--TICK--
jump(..., descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_call.py:414:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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 0x000000002d3d25d0>
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=<Guard0xffff8eca2ba8>)
i36 = int_lt(i29, i26)
guard_true(i36, descr=<Guard0xffff8ecc2260>)
i38 = int_add(i29, 1)
i40 = getfield_raw_i(281473158553288, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i42 = int_lt(i40, 0)
guard_false(i42, descr=<Guard0xffff8ecc22c0>)
jump(p0, p1, p8, i38, i26, descr=TargetToken(281473077346912))
Expected:
i10 = int_lt(i5, i6)
guard_true(i10, descr=...)
guard_not_invalidated(descr=...)
i120 = int_add(i5, 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-aarch64 build #3041+
test: pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_func_defaults