pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_super
self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x000001bd1b70ed78>
def test_super(self):
def main():
class A(object):
def m(self, x):
return x + 1
class B(A):
def m(self, x):
return super(B, self).m(x)
i = 0
while i < 300:
i = B().m(i)
return i
log = self.run(main, [])
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i78 = int_lt(i72, 300)
guard_true(i78, descr=...)
guard_not_invalidated(descr=...)
i79 = force_token()
i80 = force_token()
i81 = int_add(i72, 1)
--TICK--
jump(..., descr=...)
""")
pypy\module\pypyjit\test_pypy_c\test_instance.py:247:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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 0x000001bd201b6870>
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=<Guard0x15e43e820b0>)
i52 = int_lt(i44, 300)
guard_true(i52, descr=<Guard0x15e43e79610>)
p53 = force_token()
p56 = force_token()
i60 = int_add(i44, 1)
i64 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i66 = int_lt(i64, 0)
guard_false(i66, descr=<Guard0x15e43e79670>)
jump(p0, p1, p8, i60, p12, p20, p31, descr=TargetToken(1504377599584))
Expected:
i78 = int_lt(i72, 300)
guard_true(i78, descr=...)
guard_not_invalidated(descr=...)
i79 = force_token()
i80 = force_token()
i81 = int_add(i72, 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-win-x86-64 build #2538+
test: pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_super