python testrunner/pypyjit_tests.py in dir /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: FPATH=/opt/homebrew/share/zsh/site-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.9/functions HOME=/Users/matti HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_REPOSITORY=/opt/homebrew INFOPATH=/opt/homebrew/share/info: LANG=en_US.UTF-8 LC_ADDRESS=en_AU.UTF-8 LC_IDENTIFICATION=en_AU.UTF-8 LC_MEASUREMENT=en_AU.UTF-8 LC_MONETARY=en_AU.UTF-8 LC_NAME=en_AU.UTF-8 LC_NUMERIC=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_TELEPHONE=en_AU.UTF-8 LC_TIME=en_AU.UTF-8 LOGNAME=matti OLDPWD=/Users/matti PATH=/Users/matti/oss/pypy-arm64-buildbot/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin PKG_CONFIG_PATH=/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/pkgconfig PWD=/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build PYPY_USESSION_DIR=/tmp/buildbot-arm64 SHELL=/bin/zsh SHLVL=2 SSH_CLIENT=10.0.0.17 53538 22 SSH_CONNECTION=10.0.0.17 53538 10.0.0.16 22 SSH_TTY=/dev/ttys000 TERM=xterm-256color TMPDIR=/tmp/buildbot-arm64/pytest USER=matti _=/Users/matti/oss/pypy-arm64-buildbot/bin/buildslave using PTY: False /Users/matti/oss/pypy-arm64-buildbot/site-packages/hypothesis/extra/pytestplugin.py:61: HypothesisWarning: You are using Pytest version 2.9.2. Hypothesis tests work with any test runner, but our Pytest plugin requires Pytest 4.3 or newer. Note that the Pytest developers no longer support this version either! Disabling the Hypothesis pytest plugin... warnings.warn(PYTEST_TOO_OLD_MESSAGE % (pytest.__version__,), HypothesisWarning) ============================= test session starts ============================== platform darwin -- Python 2.7.18[pypy-7.3.17-final], pytest-2.9.2, py-1.4.29, pluggy-0.3.1 pytest-2.9.2 from /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/pytest.pyc rootdir: /Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build, inifile: pytest.ini plugins: hypothesis-4.57.1 collected 1195 items / 1 skipped pypy/module/pypyjit/test_pypy_c/test_00_model.py .................FF.FF.. pypy/module/pypyjit/test_pypy_c/test_alloc.py ................................................... pypy/module/pypyjit/test_pypy_c/test_array.py F.F.s... pypy/module/pypyjit/test_pypy_c/test_boolrewrite.py ...................................................................................................................................................................................................................................................................................................................................... pypy/module/pypyjit/test_pypy_c/test_buffers.py FF pypy/module/pypyjit/test_pypy_c/test_bug.py s pypy/module/pypyjit/test_pypy_c/test_call.py ..FFF.F.....FFFFF.F.....Fs. pypy/module/pypyjit/test_pypy_c/test_capture_locals.py . pypy/module/pypyjit/test_pypy_c/test_cprofile.py . pypy/module/pypyjit/test_pypy_c/test_exception.py .F.FF pypy/module/pypyjit/test_pypy_c/test_ffi.py s..s.....F pypy/module/pypyjit/test_pypy_c/test_generators.py FF. pypy/module/pypyjit/test_pypy_c/test_getframe.py F. pypy/module/pypyjit/test_pypy_c/test_globals.py F pypy/module/pypyjit/test_pypy_c/test_import.py F..F pypy/module/pypyjit/test_pypy_c/test_instance.py FF.FFF.FFFFF... pypy/module/pypyjit/test_pypy_c/test_intbound.py .........................................................................................................................................................................................................................................................................FFFFFFF.F. pypy/module/pypyjit/test_pypy_c/test_itertools.py .. pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py s pypy/module/pypyjit/test_pypy_c/test_math.py FFsF. pypy/module/pypyjit/test_pypy_c/test_micronumpy.py ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss pypy/module/pypyjit/test_pypy_c/test_min_max.py F.. pypy/module/pypyjit/test_pypy_c/test_misc.py FFFFFF..F.........F..... pypy/module/pypyjit/test_pypy_c/test_shift.py ........................................................................................................................................................................................................................... pypy/module/pypyjit/test_pypy_c/test_string.py FFFF..xFF.F........ pypy/module/pypyjit/test_pypy_c/test_struct.py FFFFFF pypy/module/pypyjit/test_pypy_c/test_thread.py FFF pypy/module/pypyjit/test_pypy_c/test_weakref.py F =================================== FAILURES =================================== ________________________ TestRunPyPyC.test_loops_by_id _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_00_model.TestRunPyPyC object at 0x0000000141897328> def test_loops_by_id(self): def f(): i = 0 while i < 1003: i += 1 # ID: increment return i # log = self.run(f) loop, = log.loops_by_id('increment') assert loop.filename == self.filepath assert loop.code.name == 'f' # ops = loop.allops() assert log.opnames(ops) == [ # this is the actual loop 'int_lt', 'guard_true', 'int_add', # this is the signal checking stuff 'guard_not_invalidated', 'getfield_raw_i', 'int_lt', 'guard_false', > 'jump' ] E assert ['guard_not_i...'int_lt', ...] == ['int_lt', 'gu...'int_lt', ...] E At index 0 diff: 'guard_not_invalidated' != 'int_lt' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_00_model.py:487: AssertionError _________________________ TestRunPyPyC.test_ops_by_id __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_00_model.TestRunPyPyC object at 0x0000000130c1b1a0> def test_ops_by_id(self): def f(): i = 0 while i < 1003: # ID: cond i += 1 # ID: increment a = 0 # to make sure that JUMP_ABSOLUTE is not part of the ID return i # log = self.run(f) loop, = log.loops_by_id('increment') # ops = loop.ops_by_id('increment') assert log.opnames(ops) == ['int_add'] # ops = loop.ops_by_id('cond') # the 'jump' at the end is because the last opcode in the loop # coincides with the first, and so it thinks that 'jump' belongs to # the id > assert log.opnames(ops) == ['int_lt', 'guard_true', 'jump'] E assert ['guard_not_i...true', 'jump'] == ['int_lt', 'gu...true', 'jump'] E At index 0 diff: 'guard_not_invalidated' != 'int_lt' E Left contains more items, first extra item: 'jump' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_00_model.py:508: AssertionError ______________________ TestRunPyPyC.test_inlined_function ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_00_model.TestRunPyPyC object at 0x00000001249f6988> def test_inlined_function(self): def f(): def g(x): return x+1 # ID: add i = 0 while i < 1003: i = g(i) # ID: call a = 0 # to make sure that JUMP_ABSOLUTE is not part of the ID return i # log = self.run(f) loop, = log.loops_by_filename(self.filepath) call_ops = log.opnames(loop.ops_by_id('call')) > assert call_ops == ['guard_not_invalidated', 'force_token'] # it does not follow inlining E assert ['force_token'] == ['guard_not_invalidated', 'force_token'] E At index 0 diff: 'force_token' != 'guard_not_invalidated' E Right contains more items, first extra item: 'force_token' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_00_model.py:541: AssertionError _________________________ TestRunPyPyC.test_loop_match _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_00_model.TestRunPyPyC object at 0x0000000124c9e100> def test_loop_match(self): def f(): i = 0 while i < 1003: i += 1 # ID: increment return i # log = self.run(f) loop, = log.loops_by_id('increment') > assert loop.match(""" i6 = int_lt(i4, 1003) guard_true(i6, descr=...) i8 = int_add(i4, 1) # signal checking stuff guard_not_invalidated(descr=...) i10 = getfield_raw_i(..., descr=<.* pypysig_long_struct_inner.c_value .*>) i14 = int_lt(i10, 0) guard_false(i14, descr=...) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_00_model.py:565: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130c38e90> 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=<Guard0x1201710b8>) i26 = int_lt(i20, 1003) guard_true(i26, descr=<Guard0x11001fe20>) i28 = int_add(i20, 1) i30 = getfield_raw_i(4455340648, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i32 = int_lt(i30, 0) guard_false(i32, descr=<Guard0x11001fe80>) jump(p0, p1, i28, descr=TargetToken(4833481824)) Expected: i6 = int_lt(i4, 1003) guard_true(i6, descr=...) i8 = int_add(i4, 1) # signal checking stuff guard_not_invalidated(descr=...) i10 = getfield_raw_i(..., descr=<.* pypysig_long_struct_inner.c_value .*>) i14 = int_lt(i10, 0) guard_false(i14, descr=...) jump(..., descr=...) _____________________ TestArray.test_arraycopy_disappears ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_array.TestArray object at 0x0000000132784db0> def test_arraycopy_disappears(self): def main(n): i = 0 while i < n: t = (1, 2, 3, i + 1) t2 = t[:] del t i = t2[3] del t2 return i # log = self.run(main, [500]) assert log.result == 500 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i5, i6) guard_true(i7, descr=...) i9 = int_add(i5, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_array.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000141d66410> 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=<Guard0x128171658>) i38 = int_lt(i33, i30) guard_true(i38, descr=<Guard0x1281d5d60>) i40 = int_add(i33, 1) i42 = getfield_raw_i(4458453608, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x1281d5dc0>) jump(p0, p1, p8, i40, i30, descr=TargetToken(4968024992)) Expected: i7 = int_lt(i5, i6) guard_true(i7, descr=...) i9 = 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=...) _________________________ TestArray.test_array_intimg __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_array.TestArray object at 0x0000000132380250> def test_array_intimg(self): def main(): from array import array img = array('i', range(3)) * (350 * 480) intimg = array('i', (0,)) * (640 * 480) l, i = 0, 640 while i < 640 * 480: assert len(img) == 3*350*480 assert len(intimg) == 640*480 l = l + img[i] intimg[i] = (intimg[i-640] + l) i += 1 return intimg[i - 1] # log = self.run(main, []) assert log.result == 73574560 loop, = log.loops_by_filename(self.filepath) if sys.maxint == 2 ** 31 - 1: assert loop.match(""" i13 = int_lt(i8, 307200) guard_true(i13, descr=...) guard_not_invalidated(descr=...) # the bound check guard on img has been killed (thanks to the asserts) i14 = getarrayitem_raw_i(i10, i8, descr=<ArrayS .>) i15 = int_add_ovf(i9, i14) guard_no_overflow(descr=...) i17 = int_add(i8, -640) # the bound check guard on intimg has been killed (thanks to the asserts) i18 = getarrayitem_raw_i(i11, i17, descr=<ArrayS .>) i19 = int_add_ovf(i18, i15) guard_no_overflow(descr=...) setarrayitem_raw(i11, i8, _, descr=<ArrayS .>) i28 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) elif sys.maxint == 2 ** 63 - 1: > assert loop.match(""" i13 = int_lt(i8, 307200) guard_true(i13, descr=...) guard_not_invalidated(descr=...) # the bound check guard on img has been killed (thanks to the asserts) i14 = getarrayitem_raw_i(i10, i8, descr=<ArrayS .>) # advanced: the following int_add cannot overflow, because: # - i14 fits inside 32 bits # - i9 fits inside 33 bits, because: # - it comes from the previous iteration's i15 # - prev i19 = prev i18 + prev i15 # - prev i18 fits inside 32 bits # - prev i19 is guarded to fit inside 32 bits # - so as a consequence, prev i15 fits inside 33 bits # the new i15 thus fits inside "33.5" bits, which is enough to # guarantee that the next int_add(i18, i15) cannot overflow either... i15 = int_add(i9, i14) i17 = int_add(i8, -640) # the bound check guard on intimg has been killed (thanks to the asserts) i18 = getarrayitem_raw_i(i11, i17, descr=<ArrayS .>) i19 = int_add(i18, i15) # guard checking that i19 actually fits into 32bit i20 = int_signext(i19, 4) i65 = int_ne(i20, i19) guard_false(i65, descr=...) setarrayitem_raw(i11, i8, _, descr=<ArrayS .>) i28 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_array.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000132bff520> 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=<Guard0x1306e9808>) i67 = int_lt(i61, 307200) guard_true(i67, descr=<Guard0x13076cd10>) i68 = getarrayitem_raw_i(i46, i61, descr=<ArrayS 4>) i69 = int_add(i49, i68) i71 = int_add(i61, -640) i72 = getarrayitem_raw_i(i54, i71, descr=<ArrayS 4>) i73 = int_add(i72, i69) i75 = int_signext(i73, 4) i76 = int_ne(i75, i73) guard_false(i76, descr=<Guard0x13076cd70>) setarrayitem_raw(i54, i61, i75, descr=<ArrayS 4>) i78 = int_add(i61, 1) i80 = getfield_raw_i(4379875944, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i82 = int_lt(i80, 0) guard_false(i82, descr=<Guard0x1306e9850>) jump(p0, p1, p8, p10, p12, i78, i69, p24, i46, i54, descr=TargetToken(5107985184)) Expected: i13 = int_lt(i8, 307200) guard_true(i13, descr=...) guard_not_invalidated(descr=...) # the bound check guard on img has been killed (thanks to the asserts) i14 = getarrayitem_raw_i(i10, i8, descr=<ArrayS .>) # advanced: the following int_add cannot overflow, because: # - i14 fits inside 32 bits # - i9 fits inside 33 bits, because: # - it comes from the previous iteration's i15 # - prev i19 = prev i18 + prev i15 # - prev i18 fits inside 32 bits # - prev i19 is guarded to fit inside 32 bits # - so as a consequence, prev i15 fits inside 33 bits # the new i15 thus fits inside "33.5" bits, which is enough to # guarantee that the next int_add(i18, i15) cannot overflow either... i15 = int_add(i9, i14) i17 = int_add(i8, -640) # the bound check guard on intimg has been killed (thanks to the asserts) i18 = getarrayitem_raw_i(i11, i17, descr=<ArrayS .>) i19 = int_add(i18, i15) # guard checking that i19 actually fits into 32bit i20 = int_signext(i19, 4) i65 = int_ne(i20, i19) guard_false(i65, descr=...) setarrayitem_raw(i11, i8, _, descr=<ArrayS .>) i28 = int_add(i8, 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=...) __________________________ TestBuffers.test_re_match ___________________________ self = <pypy.module.pypyjit.test_pypy_c.test_buffers.TestBuffers object at 0x0000000130f638a0> def test_re_match(self): def main(n): import re import array p = re.compile(b'.+') a = array.array('B', b'test' * 1000) i = 0 while i < n: i += 1 p.match(a) # ID: match return i log = self.run(main, [1000]) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('match', """ guard_not_invalidated(descr=...) p71 = getfield_gc_r(p15, descr=...) # check that the pattern is not None and a W_BytesObject guard_nonnull_class(p71, ConstClass(W_BytesObject), descr=...) i74 = instance_ptr_eq(_, p71) guard_false(i74, descr=...) i65 = getfield_gc_i(p18, descr=...) i67 = int_gt(0, i65) guard_false(i67, descr=...) i69 = int_gt(#, i65) guard_true(i69, descr=...) --TICK-- """) pypy/module/pypyjit/test_pypy_c/test_buffers.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000113984e20> 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 = 'match' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== p73 = getfield_gc_r(p14, descr=<FieldP pypy.module._sre.interp_sre.W_SRE_Pattern.inst_w_pattern 56>) guard_nonnull_class(p73, ConstClass(W_BytesObject), descr=<Guard0x1288828d8>) i76 = instance_ptr_eq(ConstPtr(ptr75), p73) guard_false(i76, descr=<Guard0x1288c6710>) i77 = getfield_gc_i(p16, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst__exports 16>) i79 = int_add(i77, 1) i80 = getfield_gc_i(p16, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst_len 40>) i82 = int_gt(0, i80) guard_false(i82, descr=<Guard0x1288c6770>) i84 = int_gt(9223372036854775807, i80) guard_true(i84, descr=<Guard0x1288c67d0>) guard_not_invalidated(descr=<Guard0x1288c6890>) i99 = getfield_raw_i(4429585000, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i101 = int_lt(i99, 0) guard_false(i101, descr=<Guard0x1288c68f0>) Expected: guard_not_invalidated(descr=...) p71 = getfield_gc_r(p15, descr=...) # check that the pattern is not None and a W_BytesObject guard_nonnull_class(p71, ConstClass(W_BytesObject), descr=...) i74 = instance_ptr_eq(_, p71) guard_false(i74, descr=...) i65 = getfield_gc_i(p18, descr=...) i67 = int_gt(0, i65) guard_false(i67, descr=...) i69 = int_gt(#, i65) guard_true(i69, descr=...) 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=...) ________________________ TestBuffers.test_struct_unpack ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_buffers.TestBuffers object at 0x00000001322718a0> def test_struct_unpack(self): def main(n): import _struct as struct import array a = array.array('B', struct.pack('i', 42)) i = 0 while i < n: i += 1 struct.unpack('i', a) # ID: unpack return i log = self.run(main, [1000]) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('unpack', """ guard_not_invalidated(descr=...) i66 = raw_load_i(i53, 0, descr=<ArrayS 4>) --TICK-- """) pypy/module/pypyjit/test_pypy_c/test_buffers.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001311e6640> 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 = 'unpack' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== i66 = raw_load_i(i53, 0, descr=<ArrayS 4>) i68 = getfield_raw_i(4448508520, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x13804c530>) Expected: guard_not_invalidated(descr=...) i66 = raw_load_i(i53, 0, descr=<ArrayS 4>) 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=...) __________________________ TestCall.test_simple_call ___________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000001129299f0> def test_simple_call(self): src = """ OFFSET = 0 def f(i): return i + 1 + OFFSET # ID: add def main(n): i = 0 while i < n+OFFSET: # ID: cond i = f(f(i)) # ID: call a = 0 return i """ log = self.run(src, [1000]) assert log.result == 1000 # first, we test what is inside the entry bridge # ----------------------------------------------- entry_bridge, = log.loops_by_id('call', is_entry_bridge=True) # LOAD_GLOBAL of OFFSET ops = entry_bridge.ops_by_id('cond', opcode='LOAD_GLOBAL') assert log.opnames(ops) == ["guard_value", > "guard_not_invalidated"] E assert [] == ['guard_value', 'guard_not_invalidated'] E Right contains more items, first extra item: 'guard_value' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_call.py:75: AssertionError __________________________ TestCall.test_method_call ___________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000130b70bf0> def test_method_call(self): def fn(n): class A(object): def __init__(self, a): self.a = a def f(self, i): return self.a + i a = A("a") # stop field unboxing i = 0 a = A(1) while i < n: x = a.f(i) # ID: meth1 i = a.f(x) # ID: meth2 return i # log = self.run(fn, [1000]) assert log.result == 1000 # # first, we test the entry bridge # ------------------------------- entry_bridge, = log.loops_by_filename(self.filepath, is_entry_bridge=True) ops = entry_bridge.ops_by_id('meth1', opcode='LOAD_METHOD') assert log.opnames(ops) == ['guard_value', 'getfield_gc_r', 'guard_value', > 'guard_not_invalidated'] E assert ['getfield_gc...'guard_value'] == ['guard_value'..._invalidated'] E At index 0 diff: 'getfield_gc_r' != 'guard_value' E Right contains more items, first extra item: 'guard_value' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_call.py:136: AssertionError ____________________ TestCall.test_static_classmethod_call _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000001417189c0> def test_static_classmethod_call(self): def fn(n): class A(object): @classmethod def f(cls, i): return i + (cls is A) + 1 @staticmethod def g(i): return i - 1 # i = 0 a = A() while i < n: x = a.f(i) i = a.g(x) return i # log = self.run(fn, [1000]) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i14 = int_lt(i6, i9) guard_true(i14, descr=...) guard_not_invalidated(descr=...) i15 = force_token() i17 = int_add_ovf(i8, 1) guard_no_overflow(descr=...) i18 = force_token() --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_call.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000133c47f68> 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=<Guard0x148171808>) i60 = int_lt(i47, i30) guard_true(i60, descr=<Guard0x1481ef610>) p61 = force_token() i65 = int_add_ovf(i59, 1) guard_no_overflow(descr=<Guard0x1481ef640>) p67 = force_token() i72 = getfield_raw_i(4453735016, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x1481ef6a0>) jump(p0, p1, p8, i59, p12, i65, p16, p24, i30, p37, i65, descr=TargetToken(5504927968)) Expected: i14 = int_lt(i6, i9) guard_true(i14, descr=...) guard_not_invalidated(descr=...) i15 = force_token() i17 = int_add_ovf(i8, 1) guard_no_overflow(descr=...) i18 = force_token() 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=...) __________________________ TestCall.test_kwargs_empty __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000001325cc368> def test_kwargs_empty(self): def main(x): def g(**args): return len(args) + 1 # s = 0 d = {} i = 0 while i < x: s += g(**d) # ID: call i += 1 return s # log = self.run(main, [1000]) assert log.result == 1000 loop, = log.loops_by_id('call') ops = log.opnames(loop.ops_by_id('call')) guards = [ops for ops in ops if ops.startswith('guard')] > assert guards == ["guard_not_invalidated", "guard_no_overflow"] E assert ['guard_no_overflow'] == ['guard_not_invali...guard_no_overflow'] E At index 0 diff: 'guard_no_overflow' != 'guard_not_invalidated' E Right contains more items, first extra item: 'guard_no_overflow' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_call.py:227: AssertionError _________________________ TestCall.test_func_defaults __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000001349a85d0> 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 0x0000000113cff360> 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=<Guard0x118171730>) i36 = int_lt(i29, i26) guard_true(i36, descr=<Guard0x12862c140>) i38 = int_add(i29, 1) i40 = getfield_raw_i(4389018216, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i42 = int_lt(i40, 0) guard_false(i42, descr=<Guard0x12862c1a0>) jump(p0, p1, p8, i38, i26, descr=TargetToken(4972471840)) 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=...) _______________ TestCall.test_global_closure_has_constant_cells ________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000001140d51a0> def test_global_closure_has_constant_cells(self): log = self.run(""" def make_adder(n): def add(x): return x + n return add add5 = make_adder(5) def main(): i = 0 while i < 5000: i = add5(i) # ID: call """, []) loop, = log.loops_by_id('call', is_entry_bridge=True) > assert loop.match(""" guard_value(i4, 1, descr=...) guard_isnull(p5, descr=...) guard_nonnull_class(p12, ConstClass(W_IntObject), descr=...) guard_value(p2, ConstPtr(ptr21), descr=...) i22 = getfield_gc_i(p12, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) i24 = int_lt(i22, 5000) guard_true(i24, descr=...) dummy_get_utf8? guard_not_invalidated(descr=...) p29 = call_r(ConstClass(_ll_1_threadlocalref_get__Ptr_GcStruct_objectLlT_Signed), #, descr=<Callr . i EF=1 OS=5>) p30 = getfield_gc_r(p29, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref .*>) p31 = force_token() p32 = getfield_gc_r(p29, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc .*>) guard_value(p32, ConstPtr(ptr33), descr=...) i34 = getfield_gc_i(p29, descr=<FieldU pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc .*>) i35 = int_is_zero(i34) guard_true(i35, descr=...) i40 = int_add(i22, 5) --TICK-- """) pypy/module/pypyjit/test_pypy_c/test_call.py:436: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000124ecc2c0> 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: guard_value(i4, 1, descr=<Guard0x1386e9658>) ===== HERE ===== guard_value(p3, ConstPtr(ptr14), descr=<Guard0x13874b940>) guard_not_invalidated(descr=<Guard0x13874b910>) guard_isnull(p5, descr=<Guard0x13874b8e0>) guard_nonnull_class(p8, ConstClass(W_IntObject), descr=<Guard0x1386e96a0>) i16 = getfield_gc_i(p8, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) i18 = int_lt(i16, 5000) guard_true(i18, descr=<Guard0x13874b880>) p21 = call_r(ConstClass(_ll_1_threadlocalref_get__Ptr_GcStruct_objectLlT_Signed), 64, descr=<Callr 8 i EF=1 OS=5>) p22 = getfield_gc_r(p21, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 136>) p23 = force_token() p24 = getfield_gc_r(p21, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc 176 pure>) guard_value(p24, ConstPtr(null), descr=<Guard0x1386e9610>) i26 = getfield_gc_i(p21, descr=<FieldU pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 186 pure>) i27 = int_is_zero(i26) guard_true(i27, descr=<Guard0x13874b850>) i31 = int_add(i16, 5) i34 = getfield_raw_i(4390312552, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i36 = int_lt(i34, 0) guard_false(i36, descr=<Guard0x1387606e0>) Expected: guard_value(i4, 1, descr=...) guard_isnull(p5, descr=...) guard_nonnull_class(p12, ConstClass(W_IntObject), descr=...) guard_value(p2, ConstPtr(ptr21), descr=...) i22 = getfield_gc_i(p12, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) i24 = int_lt(i22, 5000) guard_true(i24, descr=...) dummy_get_utf8? guard_not_invalidated(descr=...) p29 = call_r(ConstClass(_ll_1_threadlocalref_get__Ptr_GcStruct_objectLlT_Signed), #, descr=<Callr . i EF=1 OS=5>) p30 = getfield_gc_r(p29, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref .*>) p31 = force_token() p32 = getfield_gc_r(p29, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_w_tracefunc .*>) guard_value(p32, ConstPtr(ptr33), descr=...) i34 = getfield_gc_i(p29, descr=<FieldU pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc .*>) i35 = int_is_zero(i34) guard_true(i35, descr=...) i40 = int_add(i22, 5) 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=...) ____________________ TestCall.test_local_closure_is_virtual ____________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000124d98640> def test_local_closure_is_virtual(self): log = self.run(""" def main(): i = 0 while i < 5000: def add(): return i + 1 i = add() # ID: call """, []) loop, = log.loops_by_id('call') > assert loop.match(""" i8 = getfield_gc_i(p6, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) i10 = int_lt(i8, 5000) guard_true(i10, descr=...) guard_not_invalidated? i11 = force_token() i13 = int_add(i8, 1) --TICK-- p22 = new_with_vtable(descr=<SizeDescr .*>) setfield_gc(p22, i13, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) setfield_gc(p4, p22, descr=<FieldP pypy.interpreter.nestedscope.Cell.inst_w_value .*>) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_call.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000125226db0> 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=<Guard0x1206e9778>) i44 = getfield_gc_i(p43, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) i46 = int_lt(i44, 5000) guard_true(i46, descr=<Guard0x120764b60>) p47 = force_token() i51 = int_add(i44, 1) i54 = getfield_raw_i(4413004392, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i56 = int_lt(i54, 0) guard_false(i56, descr=<Guard0x120764bc0>) p57 = new_with_vtable(descr=<SizeDescr 16>) setfield_gc(p57, i51, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) setfield_gc(p10, p57, descr=<FieldP pypy.interpreter.nestedscope.Cell.inst_w_value 16>) jump(p0, p1, p10, p57, p25, p37, descr=TargetToken(4839581024)) Expected: i8 = getfield_gc_i(p6, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) i10 = int_lt(i8, 5000) guard_true(i10, descr=...) guard_not_invalidated? i11 = force_token() i13 = int_add(i8, 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=...) p22 = new_with_vtable(descr=<SizeDescr .*>) setfield_gc(p22, i13, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval .*>) setfield_gc(p4, p22, descr=<FieldP pypy.interpreter.nestedscope.Cell.inst_w_value .*>) jump(..., descr=...) _________________________ TestCall.test_kwargs_virtual _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000125766f00> 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 0x00000001257e31d8> 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=<Guard0x1586e9778>) i54 = int_lt(i48, i24) guard_true(i54, descr=<Guard0x15876cb30>) p55 = force_token() i59 = int_add(i48, 1) i62 = getfield_raw_i(4417919592, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i64 = int_lt(i62, 0) guard_false(i64, descr=<Guard0x15876cb90>) jump(p0, p1, p8, p10, i59, i24, p38, descr=TargetToken(5779080736)) 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=...) ________________________ TestCall.test_kwargs_virtual2 _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000125beb440> def test_kwargs_virtual2(self): log = self.run(""" def f(*args, **kwargs): kwargs['a'] = kwargs['z'] * 0 return g(1, *args, **kwargs) def g(x, y, z=2, a=1): return x - y + z + a def main(stop): res = 0 i = 0 while i < stop: res = f(res, z=i) # ID: call i += 1 return res""", [1000]) assert log.result == 500 loop, = log.loops_by_id('call') > assert loop.match(""" i65 = int_lt(i58, i29) guard_true(i65, descr=...) guard_not_invalidated(..., descr=...) i66 = force_token() i67 = force_token() i69 = int_sub_ovf(1, i56) guard_no_overflow(..., descr=...) i70 = int_add_ovf(i69, i58) guard_no_overflow(..., descr=...) i71 = int_add(i58, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_call.py:523: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000134a80598> 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=<Guard0x1501717c0>) i55 = int_lt(i50, i26) guard_true(i55, descr=<Guard0x150200dd0>) p56 = force_token() p59 = force_token() i63 = int_sub_ovf(1, i46) guard_no_overflow(descr=<Guard0x150200e00>) i64 = int_add_ovf(i63, i50) guard_no_overflow(descr=<Guard0x150200e30>) i68 = int_add(i50, 1) i70 = getfield_raw_i(4416526952, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x150200e90>) jump(p0, p1, p8, i64, i68, i26, p31, descr=TargetToken(5639176864)) Expected: i65 = int_lt(i58, i29) guard_true(i65, descr=...) guard_not_invalidated(..., descr=...) i66 = force_token() i67 = force_token() i69 = int_sub_ovf(1, i56) guard_no_overflow(..., descr=...) i70 = int_add_ovf(i69, i58) guard_no_overflow(..., descr=...) i71 = int_add(i58, 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=...) _____________________ TestCall.test_kwargs_update_virtual1 _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000130c32330> def test_kwargs_update_virtual1(self): log = self.run(""" def f(**kwargs): return len(kwargs) def main(stop): i = 0 res = 0 while i < stop: d = {'a': 1, 'b': 2} # used to force the dict! res += f(c=2, **d) # ID: call i += 1 return res """, [1000]) loop, = log.loops_by_id('call') ops = loop.ops_by_id('call') assert log.opnames(ops) == ["guard_not_invalidated", "force_token", > "int_add_ovf", "guard_no_overflow"] E assert ['force_token..._no_overflow'] == ['guard_not_in..._no_overflow'] E At index 0 diff: 'force_token' != 'guard_not_invalidated' E Right contains more items, first extra item: 'guard_no_overflow' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_call.py:575: AssertionError __________________ TestCall.test_methodcall_kwargs_regression __________________ self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x0000000140db4bf0> 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 0x0000000111a57e88> 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=<Guard0x148171778>) 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() __________________ TestException.test_exception_inside_loop_1 __________________ self = <pypy.module.pypyjit.test_pypy_c.test_exception.TestException object at 0x0000000140c90f70> def test_exception_inside_loop_1(self): def main(n): while n: try: raise ValueError except ValueError: pass n -= 1 return n # log = self.run(main, [1000]) assert log.result == 0 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i5 = int_is_true(i3) guard_true(i5, descr=...) guard_not_invalidated(descr=...) --EXC-TICK-- i12 = int_sub_ovf(i3, 1) guard_no_overflow(descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_exception.py:37: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000141105248> 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=<Guard0x1381716a0>) i40 = int_is_true(i35) guard_true(i40, descr=<Guard0x1381f4590>) i42 = getfield_raw_i(4429683304, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x1381f45f0>) i46 = int_sub_ovf(i35, 1) guard_no_overflow(descr=<Guard0x1381f4620>) i48 = getfield_raw_i(4429683304, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i50 = int_lt(i48, 0) guard_false(i50, descr=<Guard0x1381f4680>) jump(p0, p1, i46, p16, p32, descr=TargetToken(5236491552)) Expected: i5 = int_is_true(i3) guard_true(i5, descr=...) guard_not_invalidated(descr=...) ticker2 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond1 = int_lt(ticker2, 0) guard_false(ticker_cond1, descr=...) i12 = int_sub_ovf(i3, 1) guard_no_overflow(descr=...) 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=...) __________________________ TestException.test_reraise __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_exception.TestException object at 0x0000000123f9e250> def test_reraise(self): def f(n): i = 0 while i < n: try: try: raise KeyError except KeyError: raise except KeyError: i += 1 return i log = self.run(f, [100000]) assert log.result == 100000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i4, i5) guard_true(i7, descr=...) guard_not_invalidated(descr=...) --EXC-TICK-- i14 = int_add(i4, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_exception.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001244e9e50> 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=<Guard0x1486e96e8>) i44 = int_lt(i39, i24) guard_true(i44, descr=<Guard0x14876c890>) i46 = getfield_raw_i(4389706344, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x14876c8f0>) i50 = int_add(i39, 1) i52 = getfield_raw_i(4389706344, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x14876c950>) jump(p0, p1, p8, i50, i24, p36, descr=TargetToken(5510645920)) Expected: i7 = int_lt(i4, i5) guard_true(i7, descr=...) guard_not_invalidated(descr=...) ticker2 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond1 = int_lt(ticker2, 0) guard_false(ticker_cond1, descr=...) i14 = int_add(i4, 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=...) ____________________ TestException.test_continue_in_finally ____________________ self = <pypy.module.pypyjit.test_pypy_c.test_exception.TestException object at 0x0000000141690ec8> def test_continue_in_finally(self): # check that 'continue' inside a try:finally: block is correctly # detected as closing a loop def f(n): i = 0 while 1: try: if i < n: continue finally: i += 1 return i log = self.run(f, [2000]) assert log.result == 2001 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i3 = int_lt(i1, i2) guard_true(i3, descr=...) i4 = int_add(i1, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_exception.py:111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000112d55910> 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=<Guard0x128171100>) i32 = int_lt(i27, i24) guard_true(i32, descr=<Guard0x1281c7f10>) i34 = int_add(i27, 1) i36 = getfield_raw_i(4461386344, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x1281c7f70>) jump(p0, p1, p8, i34, p16, p18, i24, descr=TargetToken(4967699552)) Expected: i3 = int_lt(i1, i2) guard_true(i3, descr=...) i4 = int_add(i1, 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=...) __________________ Test__ffi.test_cffi_init_struct_with_list ___________________ self = <pypy.module.pypyjit.test_pypy_c.test_ffi.Test__ffi object at 0x0000000130c37440> def test_cffi_init_struct_with_list(self): def main(n): import sys try: import cffi except ImportError: sys.stderr.write('SKIP: cannot import cffi\n') return 0 ffi = cffi.FFI() ffi.cdef(""" struct s { short x; short y; short z; }; """) for i in range(n): ffi.new("struct s *", [i, i, i]) log = self.run(main, [300]) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i106 = getfield_gc_i(p20, descr=...) i161 = int_lt(i106, i43) guard_true(i161, descr=...) i162 = int_add(i106, 1) p110 = getfield_gc_r(p16, descr=...) setfield_gc(p20, i162, descr=...) guard_value(p110, ConstPtr(ptr111), descr=...) guard_not_invalidated(descr=...) p163 = force_token() p164 = force_token() p118 = getfield_gc_r(p16, descr=...) p120 = getarrayitem_gc_r(p118, 0, descr=...) guard_value(p120, ConstPtr(ptr121), descr=...) p122 = getfield_gc_r(p120, descr=...) guard_value(p122, ConstPtr(ptr123), descr=...) p125 = getfield_gc_r(p16, descr=...) guard_nonnull_class(p125, ..., descr=...) p999 = getfield_gc_r(p125, descr=...) guard_isnull(p999, descr=...) p127 = getfield_gc_r(p125, descr=...) guard_value(p127, ConstPtr(ptr128), descr=...) p129 = getfield_gc_r(p127, descr=...) guard_value(p129, ConstPtr(ptr130), descr=...) p132 = call_r(ConstClass(_ll_0_alloc_with_del___), descr=...) guard_no_exception(descr=...) p133 = force_token() p134 = new_with_vtable(descr=...) setfield_gc(p134, ..., descr=...) setfield_gc(p134, ConstPtr(null), descr=...) setfield_gc(p48, p134, descr=...) setfield_gc(p132, ..., descr=...) i138 = call_i(ConstClass(_ll_1_raw_malloc_varsize_zero__Signed), 6, descr=...) check_memory_error(i138) setfield_gc(p132, i138, descr=...) setfield_gc(p132, ConstPtr(ptr139), descr=...) setfield_gc(p132, -1, descr=...) setfield_gc(p132, 6, descr=...) setfield_gc(p0, p133, descr=...) call_may_force_n(ConstClass(_ll_2_gc_add_memory_pressure__Signed_pypy_module__cffi_backend_cdataobj_W_CDataNewStdPtr), 6, p132, descr=...) guard_not_forced(descr=...) guard_no_exception(descr=...) i146 = int_signext(i106, 2) i147 = int_ne(i106, i146) guard_false(i147, descr=...) setarrayitem_raw(i138, 0, i106, descr=...) i150 = int_add(i138, 2) setarrayitem_raw(i150, 0, i106, descr=...) i153 = int_add(i138, 4) setarrayitem_raw(i153, 0, i106, descr=...) p156 = getfield_gc_r(p48, descr=...) ... jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_ffi.py:377: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000132be8d40> 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=<Guard0x140ab2020>) i104 = getfield_gc_i(p18, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i105 = int_lt(i104, i35) guard_true(i105, descr=<Guard0x140aa0f50>) i107 = int_add(i104, 1) p108 = getfield_gc_r(p14, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst_map 48>) setfield_gc(p18, i107, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_value(p108, ConstPtr(ptr109), descr=<Guard0x1409ddec8>) p110 = force_token() p113 = force_token() p116 = getfield_gc_r(p14, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value4 40>) p118 = getarrayitem_gc_r(p116, 0, descr=<ArrayP 8>) guard_value(p118, ConstPtr(ptr119), descr=<Guard0x1409ddfa0>) p120 = getfield_gc_r(p118, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p120, ConstPtr(ptr121), descr=<Guard0x1409ddf58>) p123 = getfield_gc_r(p14, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull_class(p123, 4379782944, descr=<Guard0x1409ddf10>) p125 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_userclass 32 pure>) guard_isnull(p125, descr=<Guard0x140aa0f20>) p126 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_dict 16 pure>) guard_value(p126, ConstPtr(ptr127), descr=<Guard0x1409dde80>) p128 = getfield_gc_r(p126, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p128, ConstPtr(ptr129), descr=<Guard0x1409dde38>) p131 = call_r(ConstClass(_ll_0_alloc_with_del___), descr=<Callr 8 EF=5>) guard_no_exception(descr=<Guard0x1409dddf0>) p132 = force_token() p133 = new_with_vtable(descr=<SizeDescr 24>) setfield_gc(p133, p110, descr=<FieldP JitVirtualRef.virtual_token 8>) setfield_gc(p133, ConstPtr(null), descr=<FieldP JitVirtualRef.forced 16>) setfield_gc(p44, p133, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 136>) setfield_gc(p131, 0, descr=<FieldS pypy.module._cffi_backend.cdataobj.W_CData.special_memory_pressure 32>) i137 = call_i(ConstClass(_ll_1_raw_malloc_varsize_zero__Signed), 6, descr=<Calli 8 i EF=5 OS=110>) check_memory_error(i137) setfield_gc(p131, i137, descr=<FieldU pypy.module._cffi_backend.cdataobj.W_CData.inst__ptr 16 pure>) setfield_gc(p131, ConstPtr(ptr138), descr=<FieldP pypy.module._cffi_backend.cdataobj.W_CData.inst_ctype 24 pure>) setfield_gc(p131, -1, descr=<FieldS pypy.module._cffi_backend.cdataobj.W_CDataNewOwning.inst_allocated_length 40 pure>) setfield_gc(p131, 6, descr=<FieldS pypy.module._cffi_backend.cdataobj.W_CDataNewStd.inst_datasize 48>) setfield_gc(p0, p132, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) call_may_force_n(ConstClass(_ll_2_gc_add_memory_pressure__Signed_pypy_module__cffi_backend_cdataobj_W_CDataNewStdPtr), 6, p131, descr=<Callv 0 ir EF=7>) guard_not_forced(descr=<Guard0x140a7e2a0>) guard_no_exception(descr=<Guard0x140aa0ec0>) i144 = int_signext(i104, 2) i145 = int_ne(i104, i144) guard_false(i145, descr=<Guard0x140aa0e90>) setarrayitem_raw(i137, 0, i104, descr=<ArrayS 2>) i148 = int_add(i137, 2) setarrayitem_raw(i148, 0, i104, descr=<ArrayS 2>) i151 = int_add(i137, 4) setarrayitem_raw(i151, 0, i104, descr=<ArrayS 2>) p154 = getfield_gc_r(p44, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 136>) i156 = getfield_raw_i(4393376360, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i158 = int_add(i156, -14) setfield_raw(4393376360, i158, descr=<FieldS pypysig_long_struct_inner.c_value 0>) setfield_gc(p44, p45, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref 136>) setfield_gc(p133, ConstPtr(null), descr=<FieldP JitVirtualRef.virtual_token 8>) i161 = int_lt(i158, 0) guard_false(i161, descr=<Guard0x1409ddda8>) jump(p0, p1, p8, p10, p12, p14, i104, p18, i35, p44, p45, descr=TargetToken(5379658272)) Expected: i106 = getfield_gc_i(p20, descr=...) i161 = int_lt(i106, i43) guard_true(i161, descr=...) i162 = int_add(i106, 1) p110 = getfield_gc_r(p16, descr=...) setfield_gc(p20, i162, descr=...) guard_value(p110, ConstPtr(ptr111), descr=...) guard_not_invalidated(descr=...) p163 = force_token() p164 = force_token() p118 = getfield_gc_r(p16, descr=...) p120 = getarrayitem_gc_r(p118, 0, descr=...) guard_value(p120, ConstPtr(ptr121), descr=...) p122 = getfield_gc_r(p120, descr=...) guard_value(p122, ConstPtr(ptr123), descr=...) p125 = getfield_gc_r(p16, descr=...) guard_nonnull_class(p125, ..., descr=...) p999 = getfield_gc_r(p125, descr=...) guard_isnull(p999, descr=...) p127 = getfield_gc_r(p125, descr=...) guard_value(p127, ConstPtr(ptr128), descr=...) p129 = getfield_gc_r(p127, descr=...) guard_value(p129, ConstPtr(ptr130), descr=...) p132 = call_r(ConstClass(_ll_0_alloc_with_del___), descr=...) guard_no_exception(descr=...) p133 = force_token() p134 = new_with_vtable(descr=...) setfield_gc(p134, ..., descr=...) setfield_gc(p134, ConstPtr(null), descr=...) setfield_gc(p48, p134, descr=...) setfield_gc(p132, ..., descr=...) i138 = call_i(ConstClass(_ll_1_raw_malloc_varsize_zero__Signed), 6, descr=...) check_memory_error(i138) setfield_gc(p132, i138, descr=...) setfield_gc(p132, ConstPtr(ptr139), descr=...) setfield_gc(p132, -1, descr=...) setfield_gc(p132, 6, descr=...) setfield_gc(p0, p133, descr=...) call_may_force_n(ConstClass(_ll_2_gc_add_memory_pressure__Signed_pypy_module__cffi_backend_cdataobj_W_CDataNewStdPtr), 6, p132, descr=...) guard_not_forced(descr=...) guard_no_exception(descr=...) i146 = int_signext(i106, 2) i147 = int_ne(i106, i146) guard_false(i147, descr=...) setarrayitem_raw(i138, 0, i106, descr=...) i150 = int_add(i138, 2) setarrayitem_raw(i150, 0, i106, descr=...) i153 = int_add(i138, 4) setarrayitem_raw(i153, 0, i106, descr=...) p156 = getfield_gc_r(p48, descr=...) ... jump(..., descr=...) ____________________ TestGenerators.test_simple_generator1 _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_generators.TestGenerators object at 0x00000001247f0598> def test_simple_generator1(self): def main(n): def f(): for i in range(10000): i -= 1 i -= 42 # ID: subtract yield i def g(): for i in f(): # ID: generator pass g() log = self.run(main, [500]) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id("generator", """ cond_call(..., descr=...) i16 = force_token() setfield_gc(p32, p34, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_sys_exc_operror .*>) setfield_gc(p13, p33, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_saved_operr .*>) setfield_gc(p32, p13, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_current_gen_or_coroutine .*>) setfield_gc(p13, 1, descr=<FieldU pypy.interpreter.generator.GeneratorOrCoroutine.inst_running .*>) setfield_gc(p13, p35, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_previous_gen_or_coroutine .*>) setfield_gc(p20, p38, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_f_backref .*>) guard_not_invalidated(descr=...) p45 = new_with_vtable(descr=<.*>) ifoo = arraylen_gc(p8, descr=<ArrayP .*>) setfield_gc(p45, i29, descr=<FieldS .*>) setarrayitem_gc(p8, 0, p45, descr=<ArrayP .>) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_generators.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130c38aa0> 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 = 'generator' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== guard_not_invalidated(descr=<Guard0x1286e98e0>) cond_call(i25, 4397470596, p20, descr=<Callv 0 r EF=2 OS=121>) p98 = force_token() p125 = new_with_vtable(descr=<SizeDescr 16>) i126 = arraylen_gc(p49, descr=<ArrayP 8>) setfield_gc(p125, i115, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) setarrayitem_gc(p49, 0, p125, descr=<ArrayP 8>) jump(p0, p1, p125, p10, p12, p20, i25, p32, p49, p34, p33, p35, p38, p68, i109, i71, descr=TargetToken(4973790816)) Expected: cond_call(..., descr=...) i16 = force_token() setfield_gc(p32, p34, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_sys_exc_operror .*>) setfield_gc(p13, p33, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_saved_operr .*>) setfield_gc(p32, p13, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_current_gen_or_coroutine .*>) setfield_gc(p13, 1, descr=<FieldU pypy.interpreter.generator.GeneratorOrCoroutine.inst_running .*>) setfield_gc(p13, p35, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_previous_gen_or_coroutine .*>) setfield_gc(p20, p38, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_f_backref .*>) guard_not_invalidated(descr=...) p45 = new_with_vtable(descr=<.*>) ifoo = arraylen_gc(p8, descr=<ArrayP .*>) setfield_gc(p45, i29, descr=<FieldS .*>) setarrayitem_gc(p8, 0, p45, descr=<ArrayP .>) jump(..., descr=...) ____________________ TestGenerators.test_simple_generator2 _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_generators.TestGenerators object at 0x0000000125779210> def test_simple_generator2(self): def main(n): def f(): for i in range(1, 10000): i -= 1 i -= 42 # ID: subtract yield i def g(): for i in f(): # ID: generator pass g() log = self.run(main, [500]) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id("generator", """ cond_call(..., descr=...) i16 = force_token() setfield_gc(p32, p34, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_sys_exc_operror .*>) setfield_gc(p13, p33, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_saved_operr .*>) setfield_gc(p32, p13, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_current_gen_or_coroutine .*>) setfield_gc(p13, 1, descr=<FieldU pypy.interpreter.generator.GeneratorOrCoroutine.inst_running .*>) setfield_gc(p13, p35, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_previous_gen_or_coroutine .*>) setfield_gc(p20, p38, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_f_backref .*>) guard_not_invalidated(descr=...) p45 = new_with_vtable(descr=<.*>) i47 = arraylen_gc(p8, descr=<ArrayP .>) # Should be removed by backend setfield_gc(p45, i29, descr=<FieldS .*>) setarrayitem_gc(p8, 0, p45, descr=<ArrayP .>) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_generators.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000125cb2720> 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 = 'generator' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== guard_not_invalidated(descr=<Guard0x1286e9928>) cond_call(i25, 4396618628, p20, descr=<Callv 0 r EF=2 OS=121>) p98 = force_token() p125 = new_with_vtable(descr=<SizeDescr 16>) i126 = arraylen_gc(p49, descr=<ArrayP 8>) setfield_gc(p125, i115, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) setarrayitem_gc(p49, 0, p125, descr=<ArrayP 8>) jump(p0, p1, p125, p10, p12, p20, i25, p32, p49, p34, p33, p35, p38, p68, i109, i71, descr=TargetToken(4973790752)) Expected: cond_call(..., descr=...) i16 = force_token() setfield_gc(p32, p34, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_sys_exc_operror .*>) setfield_gc(p13, p33, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_saved_operr .*>) setfield_gc(p32, p13, descr=<FieldP pypy.interpreter.executioncontext.ExecutionContext.inst_current_gen_or_coroutine .*>) setfield_gc(p13, 1, descr=<FieldU pypy.interpreter.generator.GeneratorOrCoroutine.inst_running .*>) setfield_gc(p13, p35, descr=<FieldP pypy.interpreter.generator.GeneratorOrCoroutine.inst_previous_gen_or_coroutine .*>) setfield_gc(p20, p38, descr=<FieldP pypy.interpreter.pyframe.PyFrame.inst_f_backref .*>) guard_not_invalidated(descr=...) p45 = new_with_vtable(descr=<.*>) i47 = arraylen_gc(p8, descr=<ArrayP .>) # Should be removed by backend setfield_gc(p45, i29, descr=<FieldS .*>) setarrayitem_gc(p8, 0, p45, descr=<ArrayP .>) jump(..., descr=...) ________________________ TestGetFrame.test_getframe_one ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_getframe.TestGetFrame object at 0x000000012547b088> def test_getframe_one(self): def main(n): import sys i = 0 while i < n: assert sys._getframe(0).f_code.co_filename == __file__ i += 1 return i log = self.run(main, [300]) assert log.result == 300 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i54 = int_lt(i47, i28) guard_true(i54, descr=...) guard_not_invalidated(descr=...) i55 = int_add(i47, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_getframe.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000131a217c0> 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=<Guard0x1306e9850>) i47 = int_lt(i42, i24) guard_true(i47, descr=<Guard0x13076c230>) i49 = int_add(i42, 1) i51 = getfield_raw_i(4455045736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i53 = int_lt(i51, 0) guard_false(i53, descr=<Guard0x13076c290>) jump(p0, p1, p8, p10, i49, i24, p34, descr=TargetToken(5107994080)) Expected: i54 = int_lt(i47, i28) guard_true(i54, descr=...) guard_not_invalidated(descr=...) i55 = int_add(i47, 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=...) ________________________ TestGlobals.test_load_builtin _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_globals.TestGlobals object at 0x00000001323971a0> def test_load_builtin(self): def main(n): import pypyjit i = 0 while i < n: l = len # ID: loadglobal i += pypyjit.residual_call(l, "a") return i # log = self.run(main, [500]) assert log.result == 500 loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id("loadglobal", """ guard_not_invalidated(descr=...) """) pypy/module/pypyjit/test_pypy_c/test_globals.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:408: in match_op self._assert(op != '--end--', 'got less ops than expected') _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x0000000132041e50> cond = False, message = 'got less ops than expected' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: got less ops than expected pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = 'loadglobal' ('got less ops than expected',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== Expected: guard_not_invalidated(descr=...) ______________________ TestImport.test_import_in_function ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_import.TestImport object at 0x0000000113130218> def test_import_in_function(self): def main(n): i = 0 while i < n: from sys import version # ID: import i += 1 return i # log = self.run(main, [500]) assert log.result == 500 loop, = log.loops_by_id('import') > assert loop.match_by_id('import', """ guard_not_invalidated(descr=...) """) pypy/module/pypyjit/test_pypy_c/test_import.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:408: in match_op self._assert(op != '--end--', 'got less ops than expected') _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x00000001140dc640> cond = False, message = 'got less ops than expected' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: got less ops than expected pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = 'import' ('got less ops than expected',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== Expected: guard_not_invalidated(descr=...) ___________________ TestImport.test___import___has_fast_path ___________________ self = <pypy.module.pypyjit.test_pypy_c.test_import.TestImport object at 0x00000001329bd590> def test___import___has_fast_path(self): def main(n): i = 0 while i < n: __import__('sys') # ID: import i += 1 return i log = self.run(main, [500]) assert log.result == 500 loop, = log.loops_by_id('import') > assert loop.match_by_id('import', """ guard_not_invalidated(descr=...) """) pypy/module/pypyjit/test_pypy_c/test_import.py:76: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:408: in match_op self._assert(op != '--end--', 'got less ops than expected') _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x0000000125c17750> cond = False, message = 'got less ops than expected' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: got less ops than expected pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = 'import' ('got less ops than expected',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== Expected: guard_not_invalidated(descr=...) ______________________ TestInstance.test_virtual_instance ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x00000001259faa68> def test_virtual_instance(self): def main(n): class A(object): pass # i = 0 while i < n: a = A() assert isinstance(a, A) assert not isinstance(a, int) a.x = 2 i = i + a.x return i # log = self.run(main, [1000], threshold = 400) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i5, i6) guard_true(i7, descr=...) guard_not_invalidated(descr=...) i9 = int_add_ovf(i5, 2) guard_no_overflow(descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001259fafe0> 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=<Guard0x13818c608>) i37 = int_lt(i32, i28) guard_true(i37, descr=<Guard0x1381c0a70>) i39 = int_add_ovf(i32, 2) guard_no_overflow(descr=<Guard0x1381c0aa0>) i41 = getfield_raw_i(4428749416, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i41, 0) guard_false(i43, descr=<Guard0x1381c0b00>) jump(p0, p1, p8, i39, p22, i28, descr=TargetToken(5235906848)) Expected: i7 = int_lt(i5, i6) guard_true(i7, descr=...) guard_not_invalidated(descr=...) i9 = int_add_ovf(i5, 2) guard_no_overflow(descr=...) 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=...) _________________________ TestInstance.test_load_attr __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x0000000124f319f0> def test_load_attr(self): src = ''' class A(object): pass a = A() a.x = 1 def main(n): i = 0 while i < n: i = i + a.x return i ''' log = self.run(src, [1000]) assert log.result == 1000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i9 = int_lt(i5, i6) guard_true(i9, descr=...) guard_not_invalidated(descr=...) i10 = int_add(i5, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000134611b08> 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=<Guard0x1206e9538>) i31 = int_lt(i26, i20) guard_true(i31, descr=<Guard0x12074b460>) i33 = int_add(i26, 1) i35 = getfield_raw_i(4416821864, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i37 = int_lt(i35, 0) guard_false(i37, descr=<Guard0x12074b3d0>) jump(p0, p1, p8, i33, i20, descr=TargetToken(4839217952)) Expected: i9 = int_lt(i5, i6) guard_true(i9, descr=...) guard_not_invalidated(descr=...) i10 = 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=...) ______________________ TestInstance.test_mutate_class_int ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x000000013250cb48> def test_mutate_class_int(self): def fn(n): class A(object): count = 1 def __init__(self, a): self.a = a def f(self): return self.count i = 0 a = A(1) while i < n: A.count += 1 # ID: mutate i = a.f() # ID: meth1 return i # log = self.run(fn, [1000], threshold=10) assert log.result == 1000 # # first, we test the entry bridge # ------------------------------- entry_bridge, = log.loops_by_filename(self.filepath, is_entry_bridge=True) ops = entry_bridge.ops_by_id('mutate', opcode='LOAD_ATTR') assert log.opnames(ops) == ['guard_value', 'guard_not_invalidated', > 'getfield_gc_i'] E assert ['getfield_gc_i'] == ['guard_value', 'gua...ed', 'getfield_gc_i'] E At index 0 diff: 'getfield_gc_i' != 'guard_value' E Right contains more items, first extra item: 'guard_not_invalidated' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_instance.py:112: AssertionError ________________________ TestInstance.test_mutate_class ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x00000001332de170> def test_mutate_class(self): def fn(n): class LL(object): def __init__(self, n): self.n = n class A(object): count = None def __init__(self, a): self.a = a def f(self): return self.count i = 0 a = A(1) while i < n: A.count = LL(A.count) # ID: mutate a.f() # ID: meth1 i += 1 return i # log = self.run(fn, [1000], threshold=10) assert log.result == 1000 # # first, we test the entry bridge # ------------------------------- entry_bridge, = log.loops_by_filename(self.filepath, is_entry_bridge=True) ops = entry_bridge.ops_by_id('mutate', opcode='LOAD_ATTR') assert log.opnames(ops) == ['guard_value', 'guard_not_invalidated', 'getfield_gc_r', 'guard_nonnull_class', > 'getfield_gc_r', 'guard_value', # type check on the attribute ] E assert ['getfield_gc...'guard_value'] == ['guard_value'...'guard_value'] E At index 0 diff: 'getfield_gc_r' != 'guard_value' E Right contains more items, first extra item: 'getfield_gc_r' E Use -v to get the full diff pypy/module/pypyjit/test_pypy_c/test_instance.py:162: AssertionError ______________________ TestInstance.test_python_contains _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x0000000131c321e0> def test_python_contains(self): def main(): class A(object): def __contains__(self, v): return True i = 0 a = A() while i < 100: i += i in a # ID: contains b = 0 # to make sure that JUMP_ABSOLUTE is not part of the ID log = self.run(main, [], threshold=80) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id("contains", """ guard_not_invalidated(descr=...) i11 = force_token() i12 = int_add(i5, 1) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:208: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000132a446b0> 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 = 'contains' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== p52 = force_token() i57 = int_add(i45, 1) Expected: guard_not_invalidated(descr=...) i11 = force_token() i12 = int_add(i5, 1) ___________________________ TestInstance.test_super ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x0000000141919788> 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 0x0000000131846c60> 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=<Guard0x130171808>) i52 = int_lt(i44, 300) guard_true(i52, descr=<Guard0x1301ebf70>) p53 = force_token() p56 = force_token() i60 = int_add(i44, 1) i64 = getfield_raw_i(4426914408, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x1301ebfd0>) jump(p0, p1, p8, i60, p12, p20, p31, descr=TargetToken(5102298912)) 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=...) _______________________ TestInstance.test_super_no_args ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x000000011028c138> def test_super_no_args(self): def main(): class A(object): def m(self, x): return x + 1 class B(A): def m(self, x): return super().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=...) p1 = force_token() p65 = force_token() p3 = force_token() i81 = int_add(i72, 1) # can't use TICK here, because of the extra setfield_gc ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) setfield_gc(p0, p65, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token .>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:273: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000122f873d0> 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=<Guard0x1406e9898>) i56 = int_lt(i48, 300) guard_true(i56, descr=<Guard0x140776680>) p57 = force_token() p60 = force_token() p61 = force_token() i65 = int_add(i48, 1) i69 = getfield_raw_i(4461501032, descr=<FieldS pypysig_long_struct_inner.c_value 0>) setfield_gc(p0, p60, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i71 = int_lt(i69, 0) guard_false(i71, descr=<Guard0x1406e98e0>) jump(p0, p1, p8, i65, p20, p30, descr=TargetToken(5376500704)) Expected: i78 = int_lt(i72, 300) guard_true(i78, descr=...) guard_not_invalidated(descr=...) p1 = force_token() p65 = force_token() p3 = force_token() i81 = int_add(i72, 1) # can't use TICK here, because of the extra setfield_gc ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) setfield_gc(p0, p65, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token .>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) _________________ TestInstance.test_float_instance_field_read __________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x0000000111d1c0c8> def test_float_instance_field_read(self): def main(): class A(object): def __init__(self, x, y): self.x = float(x) self.y = float(y) l = [A(i, i * 5) for i in range(2000)] res = 0 for x in l: res += x.x + x.y # ID: get return res log = self.run(main, []) listcomp, loop, = log.loops_by_filename(self.filepath) if sys.maxint == 2**63 - 1: > loop.match_by_id('get', """ p67 = getfield_gc_r(p63, descr=...) # map guard_value(p67, ConstPtr(ptr68), descr=...) # promote map guard_not_invalidated(descr=...) p69 = getfield_gc_r(p63, descr=...) # value0 i71 = getarrayitem_gc_i(p69, 0, descr=...) # x f71 = convert_longlong_bytes_to_float(i71) i73 = getarrayitem_gc_i(p69, 1, descr=...) # y f73 = convert_longlong_bytes_to_float(i73) f74 = float_add(f71, f73) # add them f75 = float_add(f57, f74) --TICK-- """) pypy/module/pypyjit/test_pypy_c/test_instance.py:307: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000012103cb10> 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 = 'get' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: p60 = getfield_gc_r(p56, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst_map 48>) guard_value(p60, ConstPtr(ptr61), descr=<Guard0x138210bc0>) ===== HERE ===== p62 = getfield_gc_r(p56, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) i64 = getarrayitem_gc_i(p62, 0, descr=<ArrayS 8>) f65 = convert_longlong_bytes_to_float(i64) i67 = getarrayitem_gc_i(p62, 1, descr=<ArrayS 8>) f68 = convert_longlong_bytes_to_float(i67) f69 = float_add(f65, f68) f70 = float_add(f50, f69) i72 = getfield_raw_i(4383332968, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x138210c20>) Expected: p67 = getfield_gc_r(p63, descr=...) # map guard_value(p67, ConstPtr(ptr68), descr=...) # promote map guard_not_invalidated(descr=...) p69 = getfield_gc_r(p63, descr=...) # value0 i71 = getarrayitem_gc_i(p69, 0, descr=...) # x f71 = convert_longlong_bytes_to_float(i71) i73 = getarrayitem_gc_i(p69, 1, descr=...) # y f73 = convert_longlong_bytes_to_float(i73) f74 = float_add(f71, f73) # add them f75 = float_add(f57, f74) 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=...) _________________ TestInstance.test_float_instance_field_write _________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x0000000123880f70> def test_float_instance_field_write(self): def main(): class A(object): def __init__(self, x): self.x = float(x) l = [A(i) for i in range(2000)] for a in l: a.x += 3.4 # ID: set log = self.run(main, []) listcomp, loop, = log.loops_by_filename(self.filepath) if sys.maxint == 2**63 - 1: > loop.match_by_id('set', """ p60 = getfield_gc_r(p56, descr=...) # map guard_value(p60, ConstPtr(ptr61), descr=...) guard_not_invalidated(descr=...) p62 = getfield_gc_r(p56, descr=...) # value i64 = getarrayitem_gc_i(p62, 0, descr=...) # x f64 = convert_longlong_bytes_to_float(i64) f66 = float_add(f64, 3.400000) i66 = convert_float_bytes_to_longlong(f66) i68 = getfield_raw_i(..., descr=...) setarrayitem_gc(p62, 0, i66, descr=...) # store x i71 = int_lt(i68, 0) guard_false(i71, descr=...) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:348: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000014143e838> 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 = 'set' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: p55 = getfield_gc_r(p51, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst_map 48>) guard_value(p55, ConstPtr(ptr56), descr=<Guard0x130782020>) ===== HERE ===== p57 = getfield_gc_r(p51, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) i59 = getarrayitem_gc_i(p57, 0, descr=<ArrayS 8>) f60 = convert_longlong_bytes_to_float(i59) f62 = float_add(f60, 3.400000) i63 = convert_float_bytes_to_longlong(f62) i65 = getfield_raw_i(4382202472, descr=<FieldS pypysig_long_struct_inner.c_value 0>) setarrayitem_gc(p57, 0, i63, descr=<ArrayS 8>) i68 = int_lt(i65, 0) guard_false(i68, descr=<Guard0x1306e9ad8>) Expected: p60 = getfield_gc_r(p56, descr=...) # map guard_value(p60, ConstPtr(ptr61), descr=...) guard_not_invalidated(descr=...) p62 = getfield_gc_r(p56, descr=...) # value i64 = getarrayitem_gc_i(p62, 0, descr=...) # x f64 = convert_longlong_bytes_to_float(i64) f66 = float_add(f64, 3.400000) i66 = convert_float_bytes_to_longlong(f66) i68 = getfield_raw_i(..., descr=...) setarrayitem_gc(p62, 0, i66, descr=...) # store x i71 = int_lt(i68, 0) guard_false(i71, descr=...) __________________ TestInstance.test_namedtuple_construction ___________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x000000014165a3a0> def test_namedtuple_construction(self): def main(): from collections import namedtuple A = namedtuple("A", "x y") res = 0 i = 0 while i < 2000: res += A(i, 0).x i += 1 log = self.run(main, []) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i5, 2000) guard_true(i7, descr=...) guard_not_invalidated(descr=...) p1 = force_token() p2 = force_token() i20 = int_add_ovf(i19, i5) guard_no_overflow(descr=...) i9 = int_add(i5, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_instance.py:390: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000112e290c0> 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=<Guard0x1380e5b68>) i77 = int_lt(i71, 2000) guard_true(i77, descr=<Guard0x13819b700>) p78 = force_token() p81 = new_with_vtable(descr=<SizeDescr 32>) setfield_gc(p81, ConstPtr(ptr82), descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__utf8 24 pure>) i86 = call_i(ConstClass(ll_call_lookup_function_trampoline__v2077___simple_call__function_), p46, p81, -4473182057397587607, 0, descr=<Calli 8 rrii EF=5 OS=4>) setfield_gc(p81, ConstPtr(null), descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__index_storage 8>) setfield_gc(p81, 10, descr=<FieldS pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__length 16 pure>) guard_no_exception(descr=<Guard0x1380e5bb0>) i90 = int_lt(i86, 0) guard_false(i90, descr=<Guard0x13819b760>) p91 = getinteriorfield_gc_r(p57, i86, descr=<InteriorFieldDescr <FieldP odictentry.value 8>>) guard_value(p91, ConstPtr(ptr92), descr=<Guard0x1380e5bf8>) p94 = force_token() i98 = int_add_ovf(i69, i71) guard_no_overflow(descr=<Guard0x13819b790>) i100 = int_add(i71, 1) i102 = getfield_raw_i(4456651368, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i104 = int_lt(i102, 0) guard_false(i104, descr=<Guard0x13819b7f0>) jump(p0, p1, p8, i98, i100, p33, p46, p34, p57, descr=TargetToken(5236025696)) Expected: i7 = int_lt(i5, 2000) guard_true(i7, descr=...) guard_not_invalidated(descr=...) p1 = force_token() p2 = force_token() i20 = int_add_ovf(i19, i5) guard_no_overflow(descr=...) i9 = 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=...) ________________________ TestIntbound.test_intbound_gt _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x00000001236f79b8> def test_intbound_gt(self): def main(n): i, a, b = 0, 0, 0 while i < n: if i > -1: a += 1 if i > -2: b += 1 i += 1 return (a, b) # log = self.run(main, [300]) assert log.result == (300, 300) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i10 = int_lt(i8, i9) guard_true(i10, descr=...) i12 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i14 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i17 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000014138c720> 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=<Guard0x1486e9850>) i44 = int_lt(i39, i26) guard_true(i44, descr=<Guard0x148749ee0>) i46 = int_add_ovf(i33, 1) guard_no_overflow(descr=<Guard0x148749f10>) i48 = int_add_ovf(i37, 1) guard_no_overflow(descr=<Guard0x148749f40>) i50 = int_add(i39, 1) i52 = getfield_raw_i(4415281768, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x148749fa0>) jump(p0, p1, p8, i48, i46, i50, p20, i26, descr=TargetToken(5510639712)) Expected: i10 = int_lt(i8, i9) guard_true(i10, descr=...) i12 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i14 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i17 = int_add(i8, 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=...) ______________________ TestIntbound.test_intbound_sub_lt _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000123d5f280> def test_intbound_sub_lt(self): def main(): i, a = 0, 0 while i < 300: if i - 10 < 295: a += 1 i += 1 return a # log = self.run(main, []) assert log.result == 300 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i5, 300) guard_true(i7, descr=...) i9 = int_sub_ovf(i5, 10) guard_no_overflow(descr=...) i11 = int_add_ovf(i4, 1) guard_no_overflow(descr=...) i13 = int_add(i5, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001300c41a8> 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=<Guard0x1306e94f0>) i34 = int_lt(i28, 300) guard_true(i34, descr=<Guard0x13074b3a0>) i36 = int_sub_ovf(i28, 10) guard_no_overflow(descr=<Guard0x13074b340>) i38 = int_add_ovf(i26, 1) guard_no_overflow(descr=<Guard0x13074b2e0>) i40 = int_add(i28, 1) i42 = getfield_raw_i(4428094056, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x13074b250>) jump(p0, p1, i38, i40, descr=TargetToken(5107653664)) Expected: i7 = int_lt(i5, 300) guard_true(i7, descr=...) i9 = int_sub_ovf(i5, 10) guard_no_overflow(descr=...) i11 = int_add_ovf(i4, 1) guard_no_overflow(descr=...) i13 = 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=...) _____________________ TestIntbound.test_intbound_addsub_ge _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x00000001249a61a8> def test_intbound_addsub_ge(self): def main(n): i, a, b = 0, 0, 0 while i < n: if i + 5 >= 5: a += 1 if i - 1 >= -1: b += 1 i += 1 return (a, b) # log = self.run(main, [300]) assert log.result == (300, 300) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i10 = int_lt(i8, i9) guard_true(i10, descr=...) i12 = int_add_ovf(i8, 5) guard_no_overflow(descr=...) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16s = int_add(i8, -1) i16 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i19 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:141: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001321b98d8> 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=<Guard0x1306e9898>) i48 = int_lt(i43, i26) guard_true(i48, descr=<Guard0x13076c0b0>) i50 = int_add_ovf(i43, 5) guard_no_overflow(descr=<Guard0x13076c0e0>) i52 = int_add_ovf(i35, 1) guard_no_overflow(descr=<Guard0x13076c110>) i54 = int_add(i43, -1) i56 = int_add_ovf(i41, 1) guard_no_overflow(descr=<Guard0x13076c140>) i58 = int_add(i43, 1) i60 = getfield_raw_i(4463893096, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x13076c1a0>) jump(p0, p1, p8, i56, i52, i58, p20, i26, descr=TargetToken(5108001312)) Expected: i10 = int_lt(i8, i9) guard_true(i10, descr=...) i12 = int_add_ovf(i8, 5) guard_no_overflow(descr=...) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16s = int_add(i8, -1) i16 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i19 = int_add(i8, 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=...) _____________________ TestIntbound.test_intbound_addmul_ge _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000112751520> def test_intbound_addmul_ge(self): def main(n): i, a, b = 0, 0, 0 while i < 300: if i + 5 >= 5: a += 1 if 2 * i >= 0: b += 1 i += 1 return (a, b) # log = self.run(main, [300]) assert log.result == (300, 300) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i10 = int_lt(i8, 300) guard_true(i10, descr=...) i12 = int_add(i8, 5) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16 = int_lshift(i8, 1) i18 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i21 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000131195830> 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=<Guard0x138171850>) i48 = int_lt(i42, 300) guard_true(i48, descr=<Guard0x1381f4020>) i50 = int_add(i42, 5) i52 = int_add_ovf(i34, 1) guard_no_overflow(descr=<Guard0x1381f4050>) i54 = int_lshift(i42, 1) i56 = int_add_ovf(i40, 1) guard_no_overflow(descr=<Guard0x1381f4080>) i58 = int_add(i42, 1) i60 = getfield_raw_i(4429716072, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x1381f40e0>) jump(p0, p1, p8, i56, i52, i58, p20, descr=TargetToken(5236484896)) Expected: i10 = int_lt(i8, 300) guard_true(i10, descr=...) i12 = int_add(i8, 5) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16 = int_lshift(i8, 1) i18 = int_add_ovf(i6, 1) guard_no_overflow(descr=...) i21 = int_add(i8, 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=...) ________________________ TestIntbound.test_intbound_eq _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x00000001325cc4b8> def test_intbound_eq(self): def main(a, n): i, s = 0, 0 while i < 300: if a == 7: s += a + 1 elif i == 10: s += i else: s += 1 i += 1 return s # log = self.run(main, [7, 300]) assert log.result == main(7, 300) log = self.run(main, [10, 300]) assert log.result == main(10, 300) log = self.run(main, [42, 300]) assert log.result == main(42, 300) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i10 = int_lt(i8, 300) guard_true(i10, descr=...) i12 = int_eq(i8, 10) guard_false(i12, descr=...) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16 = int_add(i8, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001140d5e50> 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=<Guard0x1401717c0>) i44 = int_lt(i38, 300) guard_true(i44, descr=<Guard0x1401d1ee0>) i46 = int_eq(i38, 10) guard_false(i46, descr=<Guard0x1401d1f40>) i48 = int_add_ovf(i36, 1) guard_no_overflow(descr=<Guard0x1401d1f70>) i50 = int_add(i38, 1) i52 = getfield_raw_i(4453505640, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x1401d1fd0>) jump(p0, p1, p8, p10, i48, i50, p20, descr=TargetToken(5370678880)) Expected: i10 = int_lt(i8, 300) guard_true(i10, descr=...) i12 = int_eq(i8, 10) guard_false(i12, descr=...) i14 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i16 = int_add(i8, 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=...) ________________________ TestIntbound.test_intbound_mul ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000131b626b0> def test_intbound_mul(self): def main(a): i, s = 0, 0 while i < 300: assert i >= 0 if 2 * i < 30000: s += 1 else: s += a i += 1 return s # log = self.run(main, [7]) assert log.result == 300 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i8 = int_lt(i6, 300) guard_true(i8, descr=...) guard_not_invalidated? i10 = int_lshift(i6, 1) i12 = int_add_ovf(i5, 1) guard_no_overflow(descr=...) i14 = int_add(i6, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:231: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001139743a0> 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=<Guard0x1406e96a0>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x14074bd90>) i40 = int_lshift(i32, 1) i42 = int_add_ovf(i30, 1) guard_no_overflow(descr=<Guard0x14074bdc0>) i44 = int_add(i32, 1) i46 = getfield_raw_i(4378270312, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x14074be20>) jump(p0, p1, p8, i42, i44, descr=TargetToken(5376421856)) Expected: i8 = int_lt(i6, 300) guard_true(i8, descr=...) guard_not_invalidated? i10 = int_lshift(i6, 1) i12 = int_add_ovf(i5, 1) guard_no_overflow(descr=...) i14 = int_add(i6, 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=...) ___________________________ TestIntbound.test_assert ___________________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000124f31168> def test_assert(self): def main(a): i, s = 0, 0 while i < 300: assert a == 7 s += a + 1 i += 1 return s log = self.run(main, [7]) assert log.result == 300*8 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i8 = int_lt(i6, 300) guard_true(i8, descr=...) guard_not_invalidated? i10 = int_add_ovf(i5, 8) guard_no_overflow(descr=...) i12 = int_add(i6, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_intbound.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000134bff328> 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=<Guard0x138171658>) i40 = int_lt(i34, 300) guard_true(i40, descr=<Guard0x1381d3490>) i42 = int_add_ovf(i32, 8) guard_no_overflow(descr=<Guard0x1381d3460>) i44 = int_add(i34, 1) i46 = getfield_raw_i(4393556584, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x1381d3430>) jump(p0, p1, p8, i42, i44, descr=TargetToken(5236143136)) Expected: i8 = int_lt(i6, 300) guard_true(i8, descr=...) guard_not_invalidated? i10 = int_add_ovf(i5, 8) guard_no_overflow(descr=...) i12 = int_add(i6, 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=...) ______________________ TestIntbound.test_abs_branch_free _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000131fe83d8> def test_abs_branch_free(self): import sys def main(start, stop): res = 0 for i in range(start, stop): res += abs(i) # ID: abs return res log = self.run(main, [-10000, 10000]) loop, = log.loops_by_filename(self.filepath) assert loop.match_by_id('abs', """ setfield_gc(p18, i60, descr=...) guard_not_invalidated(descr=...) i63 = int_eq(i58, ...) # check whether it's MININT guard_false(i63, descr=...) i65 = int_rshift(i58, %s) i66 = int_xor(i58, i65) i67 = int_sub(i66, i65) i68 = int_add_ovf(i51, i67) guard_no_overflow(descr=...) --TICK-- > """ % sys.maxsize.bit_length()) pypy/module/pypyjit/test_pypy_c/test_intbound.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001235d2e20> 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 = 'abs' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: setfield_gc(p16, i47, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) ===== HERE ===== i49 = int_eq(i44, -9223372036854775808) guard_false(i49, descr=<Guard0x1101714f0>) i52 = int_rshift(i44, 63) i53 = int_xor(i44, i52) i54 = int_sub(i53, i52) i55 = int_add_ovf(i39, i54) guard_no_overflow(descr=<Guard0x1101d34c0>) i57 = getfield_raw_i(4382612072, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x1101d3460>) Expected: setfield_gc(p18, i60, descr=...) guard_not_invalidated(descr=...) i63 = int_eq(i58, ...) # check whether it's MININT guard_false(i63, descr=...) i65 = int_rshift(i58, 63) i66 = int_xor(i58, i65) i67 = int_sub(i66, i65) i68 = int_add_ovf(i51, i67) guard_no_overflow(descr=...) 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=...) ______________________________ TestMath.test_log _______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x000000014188e640> def test_log(self): def main(n): import math i = 1 s = 0.0 while i < n: s += math.log(i) - math.log10(i) i += 1 return s log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i3 = float_le(f1, 0.0) guard_false(i3, descr=...) f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>) f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i4 = int_add(i0, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_math.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001329ff0c0> 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=<Guard0x1306e9898>) i55 = int_lt(i50, i30) guard_true(i55, descr=<Guard0x13076e8c0>) f56 = cast_int_to_float(i50) i58 = float_le(f56, 0.000000) guard_false(i58, descr=<Guard0x13076e920>) f60 = call_f(ConstClass(log), f56, descr=<Callf 8 f EF=2>) f62 = call_f(ConstClass(log10), f56, descr=<Callf 8 f EF=2>) f63 = float_sub(f60, f62) f64 = float_add(f48, f63) i66 = int_add(i50, 1) i68 = getfield_raw_i(4387412584, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x1306e98e0>) jump(p0, p1, p8, p10, i66, f64, i30, descr=TargetToken(5108000416)) Expected: i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i3 = float_le(f1, 0.0) guard_false(i3, descr=...) f2 = call_f(ConstClass(log), f1, descr=<Callf . f EF=2>) f3 = call_f(ConstClass(log10), f1, descr=<Callf . f EF=2>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) 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=...) ____________________________ TestMath.test_sin_cos _____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x00000001132f4368> def test_sin_cos(self): def main(n): import math i = 1 s = 0.0 while i < n: s += math.sin(i) - math.cos(i) i += 1 return s log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) i6 = --ISINF--(f1) guard_false(i6, descr=...) f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>) f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i7 = int_add(i0, 1) --TICK-- jump(..., descr=) """) pypy/module/pypyjit/test_pypy_c/test_math.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000125c6ab10> 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=<Guard0x1306e9898>) i56 = int_lt(i51, i30) guard_true(i56, descr=<Guard0x13076e410>) f57 = cast_int_to_float(i51) f59 = float_add(f57, 11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576.000000) i60 = float_eq(f59, f57) guard_false(i60, descr=<Guard0x13076e470>) f62 = call_f(ConstClass(sin), f57, descr=<Callf 8 f EF=0>) f64 = call_f(ConstClass(cos), f57, descr=<Callf 8 f EF=0>) f65 = float_sub(f62, f64) f66 = float_add(f49, f65) i68 = int_add(i51, 1) i70 = getfield_raw_i(4446280296, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x1306e98e0>) jump(p0, p1, p8, p10, i68, f66, i30, descr=TargetToken(5108000416)) Expected: i2 = int_lt(i0, i1) guard_true(i2, descr=...) guard_not_invalidated(descr=...) f1 = cast_int_to_float(i0) f1\B999 = float_add(f1, ...) i6 = float_eq(f1\B999, f1) guard_false(i6, descr=...) f2 = call_f(ConstClass(sin), f1, descr=<Callf . f EF=0>) f3 = call_f(ConstClass(cos), f1, descr=<Callf . f EF=0>) f4 = float_sub(f2, f3) f5 = float_add(f0, f4) i7 = 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=) ____________________________ TestMath.test_pow_two _____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_math.TestMath object at 0x0000000125ca50c0> def test_pow_two(self): def main(n): s = 0.123 while n > 0: s -= s ** 2 # ID: pow n -= 1 return s log = self.run(main, [500]) assert abs(log.result - main(500)) < 1e-9 loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id("pow", """ guard_not_invalidated(descr=...) f38 = float_mul(f30, f30) f39 = float_sub(f30, f38) """) pypy/module/pypyjit/test_pypy_c/test_math.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000113c8f718> 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 = 'pow' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== f35 = float_mul(f26, f26) f36 = float_sub(f26, f35) Expected: guard_not_invalidated(descr=...) f38 = float_mul(f30, f30) f39 = float_sub(f30, f38) ___________________________ TestMinMax.test_min_max ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_min_max.TestMinMax object at 0x0000000134bd1670> def test_min_max(self): def main(): i=0 sa=0 while i < 300: sa+=min(max(i, 3000), 4000) i+=1 return sa log = self.run(main, []) assert log.result == 300*3000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_lt(i4, 300) guard_true(i7, descr=...) guard_not_invalidated(descr=...) i9 = int_add_ovf(i5, 3000) guard_no_overflow(descr=...) i11 = int_add(i4, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_min_max.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000133d0f4b0> 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=<Guard0x1606e96e8>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x16074bf70>) i40 = int_add_ovf(i30, 3000) guard_no_overflow(descr=<Guard0x16074bfa0>) i42 = int_add(i32, 1) i44 = getfield_raw_i(4418132584, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x16076c020>) jump(p0, p1, i42, i40, descr=TargetToken(5913292320)) Expected: i7 = int_lt(i4, 300) guard_true(i7, descr=...) guard_not_invalidated(descr=...) i9 = int_add_ovf(i5, 3000) guard_no_overflow(descr=...) i11 = int_add(i4, 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=...) _______________________________ TestMisc.test_f1 _______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x000000013350a560> def test_f1(self): def f1(n): "Arbitrary test function." i = 0 x = 1 while i<n: j = 0 while j<=i: j = j + 1 x = x + (i&j) i = i + 1 return x log = self.run(f1, [2117]) assert log.result == 1083876708 # we get two loops: in the initial one "i" is only read and thus is # not virtual, then "i" is written and thus we get a new loop where # "i" is virtual. However, in this specific case the two loops happen # to contain the very same operations loop0, loop1 = log.loops_by_filename(self.filepath) expected = """ i9 = int_le(i7, i8) guard_true(i9, descr=...) i11 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i12 = int_and(i8, i11) i13 = int_add_ovf(i6, i12) guard_no_overflow(descr=...) --TICK-- jump(..., descr=...) """ > assert loop0.match(expected) pypy/module/pypyjit/test_pypy_c/test_misc.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130b9e5d0> 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=<Guard0x1586e94a8>) i38 = int_le(i29, i26) guard_true(i38, descr=<Guard0x15874b3a0>) i40 = int_add_ovf(i29, 1) guard_no_overflow(descr=<Guard0x15874b370>) i41 = int_and(i26, i40) i42 = int_add_ovf(i33, i41) guard_no_overflow(descr=<Guard0x15874b340>) i44 = getfield_raw_i(4389182056, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x15874b2e0>) jump(p0, p1, p8, p10, i42, i40, i26, descr=TargetToken(5778750240)) Expected: i9 = int_le(i7, i8) guard_true(i9, descr=...) i11 = int_add_ovf(i7, 1) guard_no_overflow(descr=...) i12 = int_and(i8, i11) i13 = int_add_ovf(i6, i12) guard_no_overflow(descr=...) 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=...) ___________________________ TestMisc.test_factorial ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x0000000133c57ef8> def test_factorial(self): def fact(n): r = 1 while n > 1: r *= n n -= 1 return r log = self.run(fact, [7], threshold=4) assert log.result == 5040 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i7 = int_gt(i4, 1) guard_true(i7, descr=...) i8 = int_mul_ovf(i5, i4) guard_no_overflow(descr=...) i10 = int_add(i4, -1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_misc.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130cf5638> 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=<Guard0x138b08c38>) i31 = int_gt(i25, 1) guard_true(i31, descr=<Guard0x138b21670>) i32 = int_mul_ovf(i23, i25) guard_no_overflow(descr=<Guard0x138b216a0>) i34 = int_add(i25, -1) i36 = getfield_raw_i(4382923368, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x138b21700>) jump(p0, p1, i34, i32, descr=TargetToken(5246177440)) Expected: i7 = int_gt(i4, 1) guard_true(i7, descr=...) i8 = int_mul_ovf(i5, i4) guard_no_overflow(descr=...) i10 = int_add(i4, -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=...) ________________________ TestMisc.test_mixed_type_loop _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x00000001346698a0> def test_mixed_type_loop(self): def main(n): i = 0.0 j = 2 while i < n: i = j + i return i # log = self.run(main, [1000]) assert log.result == 1000.0 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i9 = float_lt(f5, f7) guard_true(i9, descr=...) f10 = float_add(f8, f5) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_misc.py:86: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000013454a058> 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=<Guard0x1286e9148>) i39 = float_lt(f34, f29) guard_true(i39, descr=<Guard0x128748230>) f40 = float_add(f33, f34) i42 = getfield_raw_i(4458322536, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x1287495b0>) jump(p0, p1, p8, f40, p12, f29, f33, descr=TargetToken(4973433952)) Expected: i9 = float_lt(f5, f7) guard_true(i9, descr=...) f10 = float_add(f8, f5) 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=...) ________________ TestMisc.test_cached_pure_func_of_equal_fields ________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x000000011335d328> def test_cached_pure_func_of_equal_fields(self): def main(n): class A(object): def __init__(self, val): self.val1 = self.val2 = val A("x") # prevent field unboxing a = A(1) b = A(1) sa = 0 while n: sa += 2*a.val1 sa += 2*b.val2 b.val2 = a.val1 n -= 1 return sa # log = self.run(main, [1000]) assert log.result == 4000 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i12 = int_is_true(i4) guard_true(i12, descr=...) guard_not_invalidated(descr=...) guard_nonnull_class(p10, ConstClass(W_IntObject), descr=...) i10p = getfield_gc_i(p10, descr=...) i10 = int_mul_ovf(2, i10p) guard_no_overflow(descr=...) i14 = int_add_ovf(i13, i10) guard_no_overflow(descr=...) i13 = int_add_ovf(i14, i9) guard_no_overflow(descr=...) setfield_gc(p17, p10, descr=...) i17 = int_sub_ovf(i4, 1) guard_no_overflow(descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_misc.py:113: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000133fcfbb0> 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=<Guard0x1506e9808>) i57 = int_is_true(i51) guard_true(i57, descr=<Guard0x15076c320>) guard_nonnull_class(p56, ConstClass(W_IntObject), descr=<Guard0x1506e9850>) i59 = getfield_gc_i(p56, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) i61 = int_mul_ovf(2, i59) guard_no_overflow(descr=<Guard0x15076c350>) i62 = int_add_ovf(i49, i61) guard_no_overflow(descr=<Guard0x15076c380>) i63 = int_add_ovf(i62, i38) guard_no_overflow(descr=<Guard0x15076c3b0>) setfield_gc(p14, p56, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value1 16>) i65 = int_sub_ovf(i51, 1) guard_no_overflow(descr=<Guard0x1506e9898>) i68 = getfield_raw_i(4393458280, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x15076c410>) jump(p0, p1, i65, p10, p12, p14, i63, p24, p56, p56, i61, descr=TargetToken(5644871456)) Expected: i12 = int_is_true(i4) guard_true(i12, descr=...) guard_not_invalidated(descr=...) guard_nonnull_class(p10, ConstClass(W_IntObject), descr=...) i10p = getfield_gc_i(p10, descr=...) i10 = int_mul_ovf(2, i10p) guard_no_overflow(descr=...) i14 = int_add_ovf(i13, i10) guard_no_overflow(descr=...) i13 = int_add_ovf(i14, i9) guard_no_overflow(descr=...) setfield_gc(p17, p10, descr=...) i17 = int_sub_ovf(i4, 1) guard_no_overflow(descr=...) 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=...) _______________________ TestMisc.test_range_iter_simple ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x000000012520be50> def test_range_iter_simple(self): def main(n): def g(n): return range(n) s = 0 for i in range(n): # ID: for tmp = g(n) s += tmp[i] # ID: getitem a = 0 return s # log = self.run(main, [1000]) assert log.result == 1000 * 999 / 2 loop, = log.loops_by_filename(self.filepath) > assert loop.match(self.RANGE_ITER_STEP_1) pypy/module/pypyjit/test_pypy_c/test_misc.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000131f30fa8> 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: guard_not_invalidated(descr=<Guard0x1306e9730>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x13076d130>) i75 = int_add(i71, 1) ===== HERE ===== p76 = force_token() setfield_gc(p20, i75, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i80 = int_lt(0, i72) guard_true(i80, descr=<Guard0x1306e9778>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x13076d1c0>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x13076d220>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x13076d250>) i90 = getfield_raw_i(4457536104, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x13076d2b0>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(5108000480)) Expected: guard_not_invalidated? # W_IntRangeStepOneIterator.next() i16 = int_lt(i11, i12) guard_true(i16, descr=...) i20 = int_add(i11, 1) setfield_gc(p4, i20, descr=<.* .*W_IntRangeIterator.inst_current .*>) guard_not_invalidated? i21 = force_token() i89 = int_lt(0, i9) guard_true(i89, descr=...) i88 = int_add(i9, -1) # Compared with pypy2, we get these two operations extra. # I think the reason is that W_IntRangeStepOneIterator is used # for any 'start' value, which might be negative. i89 = int_lt(i11, 0) guard_false(i89, descr=...) i25 = int_ge(i11, i9) guard_false(i25, descr=...) i27 = int_add_ovf(i7, i11) guard_no_overflow(descr=...) 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=...) _______________________ TestMisc.test_range_iter_normal ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x0000000131d411d8> def test_range_iter_normal(self): # Difference: range(n) => range(1, n). # This difference doesn't really change anything in pypy3.5, # but it used to in pypy2.7. def main(n): def g(n): return range(n) s = 0 for i in range(1, n): # ID: for tmp = g(n) s += tmp[i] # ID: getitem a = 0 return s # log = self.run(main, [1000]) assert log.result == 1000 * 999 / 2 loop, = log.loops_by_filename(self.filepath) > assert loop.match(self.RANGE_ITER_STEP_1) pypy/module/pypyjit/test_pypy_c/test_misc.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000011297f4b0> 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: guard_not_invalidated(descr=<Guard0x1406e9730>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x14076b160>) i75 = int_add(i71, 1) ===== HERE ===== p76 = force_token() setfield_gc(p20, i75, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i80 = int_lt(0, i72) guard_true(i80, descr=<Guard0x1406e9778>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x14076b1f0>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x14076b250>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x14076b280>) i90 = getfield_raw_i(4455291496, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x14076b2e0>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(5376435936)) Expected: guard_not_invalidated? # W_IntRangeStepOneIterator.next() i16 = int_lt(i11, i12) guard_true(i16, descr=...) i20 = int_add(i11, 1) setfield_gc(p4, i20, descr=<.* .*W_IntRangeIterator.inst_current .*>) guard_not_invalidated? i21 = force_token() i89 = int_lt(0, i9) guard_true(i89, descr=...) i88 = int_add(i9, -1) # Compared with pypy2, we get these two operations extra. # I think the reason is that W_IntRangeStepOneIterator is used # for any 'start' value, which might be negative. i89 = int_lt(i11, 0) guard_false(i89, descr=...) i25 = int_ge(i11, i9) guard_false(i25, descr=...) i27 = int_add_ovf(i7, i11) guard_no_overflow(descr=...) 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=...) ___________________ TestMisc.test_dont_trace_every_iteration ___________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x0000000111848b48> def test_dont_trace_every_iteration(self): def reference(a, b): i = sa = 0 while i < 300: sa += a % b i += 1 return sa # def main(a, b): i = sa = 0 while i < 300: if a > 0: pass if 1 < b < 2: pass sa += a % b i += 1 return sa # log_ref = self.run(reference, [10, 20]) assert log_ref.result == 300 * (10 % 20) # log = self.run(main, [10, 20]) assert log.result == 300 * (10 % 20) assert log.jit_summary.tracing_no == log_ref.jit_summary.tracing_no loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i11 = int_lt(i7, 300) guard_true(i11, descr=...) i12 = int_add_ovf(i8, i9) guard_no_overflow(descr=...) i14 = int_add(i7, 1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_misc.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000111cc9b08> 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=<Guard0x1181718e0>) i47 = int_lt(i41, 300) guard_true(i47, descr=<Guard0x1181f43b0>) i48 = int_add_ovf(i39, i37) guard_no_overflow(descr=<Guard0x1181f43e0>) i50 = int_add(i41, 1) i52 = getfield_raw_i(4456110696, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x1181f4440>) jump(p0, p1, p8, p10, i50, i48, i28, i32, i37, descr=TargetToken(4699613344)) Expected: i11 = int_lt(i7, 300) guard_true(i11, descr=...) i12 = int_add_ovf(i8, i9) guard_no_overflow(descr=...) i14 = int_add(i7, 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=...) _____________________________ TestMisc.test_locals _____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_misc.TestMisc object at 0x0000000123ffdec0> @pytest.mark.skipif("sys.maxint == 2 ** 31 - 1") def test_locals(self): def main(n): res = 0 for i in range(n): locals()["abc"] = 1 res += locals()["abc"] + locals()["i"] return res log = self.run(main, [3000]) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" ... i82 = int_add(i76, 1) setfield_gc(p16, i82, descr=...) guard_not_invalidated(descr=...) setarrayitem_gc(p63, 1, i71, descr=...) setarrayitem_gc(p63, 2, i76, descr=...) setarrayitem_gc(p63, 0, i77, descr=...) i87 = int_add_ovf(i71, i82) guard_no_overflow(descr=...) --TICK-- i92 = arraylen_gc(p61, descr=...) i93 = arraylen_gc(p63, descr=...) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_misc.py:509: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000012455d5c8> 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: guard_not_invalidated(descr=<Guard0x1586e9898>) i70 = int_lt(i68, i28) guard_true(i70, descr=<Guard0x15876cc80>) i72 = int_add(i68, 1) setfield_gc(p14, i72, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) ===== HERE ===== setarrayitem_gc(p55, 1, i63, descr=<ArrayS 8>) setarrayitem_gc(p55, 2, i68, descr=<ArrayS 8>) setarrayitem_gc(p55, 0, i69, descr=<ArrayS 8>) i76 = int_add_ovf(i63, i72) guard_no_overflow(descr=<Guard0x1586e98e0>) i79 = getfield_raw_i(4390541928, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i81 = int_lt(i79, 0) guard_false(i81, descr=<Guard0x15876cd70>) i82 = arraylen_gc(p53, descr=<ArrayP 8>) i83 = arraylen_gc(p55, descr=<ArrayS 8>) jump(p0, p1, p5, p8, i76, i68, p14, i72, i28, p40, p43, p48, p53, p55, i69, descr=TargetToken(5779097632)) Expected: ... i82 = int_add(i76, 1) setfield_gc(p16, i82, descr=...) guard_not_invalidated(descr=...) setarrayitem_gc(p63, 1, i71, descr=...) setarrayitem_gc(p63, 2, i76, descr=...) setarrayitem_gc(p63, 0, i77, descr=...) i87 = int_add_ovf(i71, i82) guard_no_overflow(descr=...) 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=...) i92 = arraylen_gc(p61, descr=...) i93 = arraylen_gc(p63, descr=...) jump(..., descr=...) _____________________ TestString.test_python3_missing_bchr _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x00000001412e7558> def test_python3_missing_bchr(self): # Check that 'bytes([i])' is special-cased into something # efficient, as Python 3.5 doesn't have a bchr() function or # anything more direct. def main(n): i = 0 result = b'' while i < n: c = bytes([i]) result += c i += 1 return i log = self.run(main, [255]) assert log.result == 255 loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" # nothing left like allocating a list object or doing any # residual call i49 = int_lt(i38, i26) guard_true(i49, descr=...) guard_not_invalidated(descr=...) i51 = int_lt(i38, 256) guard_true(i51, descr=...) i53 = int_add(i38, 1) --TICK-- i58 = strlen(p46) i60 = int_add(i58, 1) p61 = newstr(i60) copystrcontent(p46, p61, 0, 0, i58) strsetitem(p61, i58, i38) p62 = newstr(1) strsetitem(p62, 0, i38) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_string.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000123d734b0> 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=<Guard0x1281718e0>) i44 = int_lt(i33, i24) guard_true(i44, descr=<Guard0x1281e9640>) i46 = int_lt(i33, 256) guard_true(i46, descr=<Guard0x1281e96a0>) i48 = int_add(i33, 1) i50 = getfield_raw_i(4460124776, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i52 = int_lt(i50, 0) guard_false(i52, descr=<Guard0x1281e9700>) i53 = strlen(p41) i55 = int_add(i53, 1) p56 = newstr(i55) copystrcontent(p41, p56, 0, 0, i53) strsetitem(p56, i53, i33) p57 = newstr(1) strsetitem(p57, 0, i33) jump(p0, p1, p8, i48, p56, p57, i24, descr=TargetToken(4968034976)) Expected: # nothing left like allocating a list object or doing any # residual call i49 = int_lt(i38, i26) guard_true(i49, descr=...) guard_not_invalidated(descr=...) i51 = int_lt(i38, 256) guard_true(i51, descr=...) i53 = int_add(i38, 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=...) i58 = strlen(p46) i60 = int_add(i58, 1) p61 = newstr(i60) copystrcontent(p46, p61, 0, 0, i58) strsetitem(p61, i58, i38) p62 = newstr(1) strsetitem(p62, 0, i38) jump(..., descr=...) ___________________ TestString.test_lookup_default_encoding ____________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x0000000123cb15c8> def test_lookup_default_encoding(self): def main(n): i = 0 letters = b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' uletters = u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' while i < n: c = bytes([letters[i % len(uletters)]]) i += (c.decode() == uletters[i % len(uletters)]) return i log = self.run(main, [300], import_site=True) assert log.result == 300 loop, = log.loops_by_filename(self.filepath) assert loop.match(""" i88 = int_lt(i83, i36) guard_true(i88, descr=...) guard_not_invalidated(descr=...) i92 = int_eq(i83, %d) i94 = call_i(ConstClass(ll_int_py_mod__Signed_Signed), i83, i46, descr=<Calli . ii EF=0 OS=14>) i97 = int_ge(i94, i53) guard_false(i97, descr=...) i98 = strgetitem(p52, i94) p103 = newstr(1) strsetitem(p103, 0, i98) i95 = call_i(ConstClass(_check_utf8), p103, 0, 0, -1, descr=<Calli 8 riii EF=4>) guard_no_exception(descr=...) i98 = int_ge(i95, 0) guard_true(i98, descr=...) i99 = int_ge(i94, i46) guard_false(i99, descr=...) i115 = int_add(i94, 1) i116 = int_gt(i115, i71) guard_false(i116, descr=...) i104 = call_i(ConstClass(_ll_4_str_eq_slice_char__rpy_stringPtr_Signed_Signed_Char), p65, i94, 1, i98, descr=<Calli 8 riii EF=0 OS=27>) guard_true(i104, descr=...) i124 = int_add(i83, 1) --TICK-- jump(..., descr=...) > """ % (-sys.maxint-1,)) pypy/module/pypyjit/test_pypy_c/test_string.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130942f70> 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=<Guard0x128776c80>) i75 = int_lt(i70, i34) guard_true(i75, descr=<Guard0x12879eb60>) i77 = int_eq(i70, -9223372036854775808) i79 = call_i(ConstClass(ll_int_py_mod__Signed_Signed), i70, i38, descr=<Calli 8 ii EF=0 OS=14>) i80 = int_ge(i79, i47) guard_false(i80, descr=<Guard0x128776cc8>) i81 = strgetitem(p46, i79) p83 = newstr(1) strsetitem(p83, 0, i81) i88 = call_i(ConstClass(_check_utf8), p83, 0, 0, -1, descr=<Calli 8 riii EF=4>) guard_no_exception(descr=<Guard0x128776d10>) i91 = int_ge(i88, 0) guard_true(i91, descr=<Guard0x12879ebf0>) i92 = int_ge(i79, i38) guard_false(i92, descr=<Guard0x12879ec50>) i94 = int_add(i79, 1) i95 = int_gt(i94, i61) guard_false(i95, descr=<Guard0x12879ecb0>) i97 = call_i(ConstClass(_ll_4_str_eq_slice_char__rpy_stringPtr_Signed_Signed_Char), p60, i79, 1, i81, descr=<Calli 8 riii EF=0 OS=27>) guard_true(i97, descr=<Guard0x128776d58>) i99 = int_add(i70, 1) i101 = getfield_raw_i(4393130600, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i103 = int_lt(i101, 0) guard_false(i103, descr=<Guard0x12879ed40>) jump(p0, p1, p8, i99, p12, p14, p83, i34, i38, i47, p46, i61, p60, descr=TargetToken(4973917152)) Expected: i88 = int_lt(i83, i36) guard_true(i88, descr=...) guard_not_invalidated(descr=...) i92 = int_eq(i83, -9223372036854775808) i94 = call_i(ConstClass(ll_int_py_mod__Signed_Signed), i83, i46, descr=<Calli . ii EF=0 OS=14>) i97 = int_ge(i94, i53) guard_false(i97, descr=...) i98 = strgetitem(p52, i94) p103 = newstr(1) strsetitem(p103, 0, i98) i95 = call_i(ConstClass(_check_utf8), p103, 0, 0, -1, descr=<Calli 8 riii EF=4>) guard_no_exception(descr=...) i98 = int_ge(i95, 0) guard_true(i98, descr=...) i99 = int_ge(i94, i46) guard_false(i99, descr=...) i115 = int_add(i94, 1) i116 = int_gt(i115, i71) guard_false(i116, descr=...) i104 = call_i(ConstClass(_ll_4_str_eq_slice_char__rpy_stringPtr_Signed_Signed_Char), p65, i94, 1, i98, descr=<Calli 8 riii EF=0 OS=27>) guard_true(i104, descr=...) i124 = int_add(i83, 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=...) _________________________ TestString.test_int_base_16 __________________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x0000000112fa14b0> def test_int_base_16(self): def main(n): i = 1 while i < n: digits = '0123456789' i += int(digits[i % len(digits)], 16) return i log = self.run(main, [1100], import_site=True) assert log.result == main(1100) loop, = log.loops_by_filename(self.filepath) if sys.maxint > 2**32: args = (63, -3689348814741910323, 3) else: args = (31, -858993459, 3) assert loop.match(""" i11 = int_lt(i6, i7) guard_true(i11, descr=...) guard_not_invalidated(descr=...) i13 = int_eq(i6, %d) # value provided below # "mod 10" block: i79 = int_rshift(i6, %d) i80 = int_xor(i6, i79) i82 = uint_mul_high(i80, %d) i84 = uint_rshift(i82, %d) i85 = int_xor(i84, i79) i87 = int_mul(i85, 10) i19 = int_sub(i6, i87) i85 = int_add(i19, 1) # not used p25 = newstr(1) i23 = strgetitem(ConstPtr(ptr92), i19) strsetitem(p25, 0, i23) i107 = call_i(ConstClass(string_to_int), p25, 16, 1, 1, 0, 1, descr=<Calli . riiiii EF=4>) guard_no_exception(descr=...) i95 = int_add_ovf(i6, i107) guard_no_overflow(descr=...) --TICK-- jump(..., descr=...) > """ % ((-sys.maxint-1,)+args)) pypy/module/pypyjit/test_pypy_c/test_string.py:127: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000124b89590> 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=<Guard0x1286f7f58>) i63 = int_lt(i58, i30) guard_true(i63, descr=<Guard0x128767850>) i65 = int_eq(i58, -9223372036854775808) i67 = int_rshift(i58, 63) i68 = int_xor(i58, i67) i70 = uint_mul_high(i68, -3689348814741910323) i72 = uint_rshift(i70, 3) i73 = int_xor(i72, i67) i75 = int_mul(i73, 10) i76 = int_sub(i58, i75) i78 = int_add(i76, 1) p79 = newstr(1) i81 = strgetitem(ConstPtr(ptr80), i76) strsetitem(p79, 0, i81) i88 = call_i(ConstClass(string_to_int), p79, 16, 1, 1, 0, 1, descr=<Calli 8 riiiii EF=4>) guard_no_exception(descr=<Guard0x1286f7fa0>) i89 = int_add_ovf(i58, i88) guard_no_overflow(descr=<Guard0x128767880>) i91 = getfield_raw_i(4430486120, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x1287678e0>) jump(p0, p1, p8, i89, i30, descr=TargetToken(4973728736)) Expected: i11 = int_lt(i6, i7) guard_true(i11, descr=...) guard_not_invalidated(descr=...) i13 = int_eq(i6, -9223372036854775808) # value provided below # "mod 10" block: i79 = int_rshift(i6, 63) i80 = int_xor(i6, i79) i82 = uint_mul_high(i80, -3689348814741910323) i84 = uint_rshift(i82, 3) i85 = int_xor(i84, i79) i87 = int_mul(i85, 10) i19 = int_sub(i6, i87) i85 = int_add(i19, 1) # not used p25 = newstr(1) i23 = strgetitem(ConstPtr(ptr92), i19) strsetitem(p25, 0, i23) i107 = call_i(ConstClass(string_to_int), p25, 16, 1, 1, 0, 1, descr=<Calli . riiiii EF=4>) guard_no_exception(descr=...) i95 = int_add_ovf(i6, i107) guard_no_overflow(descr=...) 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=...) ___________________________ TestString.test_str_mod ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x0000000130fc2a30> def test_str_mod(self): def main(n): s = 0 while n > 0: s += len('%d %d' % (n, n)) n -= 1 return s log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i79 = int_gt(i74, 0) guard_true(i79, descr=...) guard_not_invalidated(descr=...) p80 = call_r(ConstClass(ll_int2dec__Signed), i74, descr=<Callr . i EF=3>) guard_no_exception(descr=...) i85 = strlen(p80) p86 = new(descr=<SizeDescr .+>) p88 = newstr(23) {{{ setfield_gc(p86, 0, descr=<FieldS stringbuilder.current_pos .+>) setfield_gc(p86, p88, descr=<FieldP stringbuilder.current_buf .+>) setfield_gc(p86, 23, descr=<FieldS stringbuilder.current_end .+>) setfield_gc(p86, 23, descr=<FieldS stringbuilder.total_size .+>) }}} call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p86, p80, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=...) i89 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_pos .+>) i90 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_end .+>) i91 = int_eq(i89, i90) cond_call(i91, ConstClass(ll_grow_by__stringbuilderPtr_Signed), p86, 1, descr=<Callv 0 ri EF=5>) guard_no_exception(descr=...) i92 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_pos .+>) i93 = int_add(i92, 1) p94 = getfield_gc_r(p86, descr=<FieldP stringbuilder.current_buf .+>) strsetitem(p94, i92, 32) setfield_gc(p86, i93, descr=<FieldS stringbuilder.current_pos .+>) call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p86, p80, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=...) p95 = call_r(..., descr=<Callr . r EF=5>) # ll_build guard_no_exception(descr=...) i96 = call_i(ConstClass(codepoints_in_utf8), p95, 0, _, descr=<Calli . rii EF=4>) guard_no_exception(descr=...) i969 = int_lt(i96, 0) guard_false(i969, descr=...) i97 = int_add_ovf(i71, i96) guard_no_overflow(descr=...) i98 = int_add(i74, -1) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_string.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000140a14090> 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=<Guard0x140171928>) i65 = int_gt(i59, 0) guard_true(i65, descr=<Guard0x1401f4680>) p67 = call_r(ConstClass(ll_int2dec__Signed), i59, descr=<Callr 8 i EF=3>) guard_no_exception(descr=<Guard0x140171970>) i68 = strlen(p67) p69 = new(descr=<SizeDescr 48>) p71 = newstr(23) setfield_gc(p69, p71, descr=<FieldP stringbuilder.current_buf 8>) setfield_gc(p69, 0, descr=<FieldS stringbuilder.current_pos 16>) setfield_gc(p69, 23, descr=<FieldS stringbuilder.current_end 24>) setfield_gc(p69, 23, descr=<FieldS stringbuilder.total_size 32>) call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p69, p67, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=<Guard0x1401719b8>) i75 = getfield_gc_i(p69, descr=<FieldS stringbuilder.current_pos 16>) i76 = getfield_gc_i(p69, descr=<FieldS stringbuilder.current_end 24>) i77 = int_eq(i75, i76) cond_call(i77, ConstClass(ll_grow_by__stringbuilderPtr_Signed), p69, 1, descr=<Callv 0 ri EF=5>) guard_no_exception(descr=<Guard0x140171a00>) i80 = getfield_gc_i(p69, descr=<FieldS stringbuilder.current_pos 16>) i82 = int_add(i80, 1) p83 = getfield_gc_r(p69, descr=<FieldP stringbuilder.current_buf 8>) strsetitem(p83, i80, 32) setfield_gc(p69, i82, descr=<FieldS stringbuilder.current_pos 16>) call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p69, p67, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=<Guard0x140171a48>) p87 = call_r(ConstClass(ll_build_trampoline__v1817___simple_call__function_), p69, descr=<Callr 8 r EF=5>) guard_no_exception(descr=<Guard0x140171a90>) i91 = call_i(ConstClass(codepoints_in_utf8), p87, 0, 9223372036854775807, descr=<Calli 8 rii EF=4>) guard_no_exception(descr=<Guard0x140171ad8>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x1401f46e0>) i94 = int_add_ovf(i57, i91) guard_no_overflow(descr=<Guard0x1401f4710>) i96 = int_add(i59, -1) i98 = getfield_raw_i(4454161000, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i100 = int_lt(i98, 0) guard_false(i100, descr=<Guard0x1401f4770>) jump(p0, p1, i96, i94, descr=TargetToken(5370701536)) Expected: i79 = int_gt(i74, 0) guard_true(i79, descr=...) guard_not_invalidated(descr=...) p80 = call_r(ConstClass(ll_int2dec__Signed), i74, descr=<Callr . i EF=3>) guard_no_exception(descr=...) i85 = strlen(p80) p86 = new(descr=<SizeDescr .+>) p88 = newstr(23) {{{ setfield_gc(p86, 0, descr=<FieldS stringbuilder.current_pos .+>) setfield_gc(p86, p88, descr=<FieldP stringbuilder.current_buf .+>) setfield_gc(p86, 23, descr=<FieldS stringbuilder.current_end .+>) setfield_gc(p86, 23, descr=<FieldS stringbuilder.total_size .+>) }}} call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p86, p80, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=...) i89 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_pos .+>) i90 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_end .+>) i91 = int_eq(i89, i90) cond_call(i91, ConstClass(ll_grow_by__stringbuilderPtr_Signed), p86, 1, descr=<Callv 0 ri EF=5>) guard_no_exception(descr=...) i92 = getfield_gc_i(p86, descr=<FieldS stringbuilder.current_pos .+>) i93 = int_add(i92, 1) p94 = getfield_gc_r(p86, descr=<FieldP stringbuilder.current_buf .+>) strsetitem(p94, i92, 32) setfield_gc(p86, i93, descr=<FieldS stringbuilder.current_pos .+>) call_n(ConstClass(ll_append_res0__stringbuilderPtr_rpy_stringPtr), p86, p80, descr=<Callv 0 rr EF=5>) guard_no_exception(descr=...) p95 = call_r(..., descr=<Callr . r EF=5>) # ll_build guard_no_exception(descr=...) i96 = call_i(ConstClass(codepoints_in_utf8), p95, 0, _, descr=<Calli . rii EF=4>) guard_no_exception(descr=...) i969 = int_lt(i96, 0) guard_false(i969, descr=...) i97 = int_add_ovf(i71, i96) guard_no_overflow(descr=...) i98 = int_add(i74, -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=...) _________________________ TestString.test_lookup_codec _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x0000000125bebb40> def test_lookup_codec(self): log = self.run(""" import codecs def main(n): for i in range(n): codecs.lookup('utf8') return i """, [1000]) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i45 = int_lt(i43, i26) guard_true(i45, descr=...) i46 = int_add(i43, 1) setfield_gc(p15, i46, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_not_invalidated(descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_string.py:256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x00000001416b0e20> 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=<Guard0x1586e90b8>) i32 = int_lt(i31, i23) guard_true(i32, descr=<Guard0x15874b310>) i34 = int_add(i31, 1) i36 = getfield_raw_i(4416641640, descr=<FieldS pypysig_long_struct_inner.c_value 0>) setfield_gc(p12, i34, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x1586e96a0>) jump(p0, p1, p8, i31, p12, i34, i23, descr=TargetToken(5778740320)) Expected: i45 = int_lt(i43, i26) guard_true(i45, descr=...) i46 = int_add(i43, 1) setfield_gc(p15, i46, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_not_invalidated(descr=...) 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=...) _________________________ TestString.test_decode_ascii _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x000000012367b2b8> def test_decode_ascii(self): log = self.run(""" def main(n): for i in range(n): (b"x" * (i & 15)).decode('ascii') return i """, [1000]) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i49 = int_lt(i47, i24) guard_true(i49, descr=...) i50 = int_add(i47, 1) i53 = int_and(i47, 15) setfield_gc(p15, i50, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i55 = int_le(i53, 0) guard_false(i55, descr=...) i56 = int_eq(i53, 1) guard_false(i56, descr=...) p80 = call_r(ConstClass(ll_char_mul__Char_Signed), 120, i53, descr=<Callr . ii EF=3>) guard_no_exception(descr=...) guard_not_invalidated(descr=...) i59 = call_i(ConstClass(first_non_ascii_char), p80, descr=<Calli . r EF=4>) guard_no_exception(descr=...) i61 = int_lt(i59, 0) guard_true(i61, descr=...) i62 = strlen(p80) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_string.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000134c54058> 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=<Guard0x1386e97c0>) i47 = int_lt(i46, i23) guard_true(i47, descr=<Guard0x1387663b0>) i49 = int_add(i46, 1) i51 = int_and(i46, 15) setfield_gc(p12, i49, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i53 = int_le(i51, 0) guard_false(i53, descr=<Guard0x1386e9808>) i55 = int_eq(i51, 1) guard_false(i55, descr=<Guard0x138766440>) p58 = call_r(ConstClass(ll_char_mul__Char_Signed), 120, i51, descr=<Callr 8 ii EF=3>) guard_no_exception(descr=<Guard0x1386e9850>) i60 = call_i(ConstClass(first_non_ascii_char), p58, descr=<Calli 8 r EF=4>) guard_no_exception(descr=<Guard0x1386e9898>) i62 = int_lt(i60, 0) guard_true(i62, descr=<Guard0x1387664a0>) i63 = strlen(p58) i65 = getfield_raw_i(4416543336, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i67 = int_lt(i65, 0) guard_false(i67, descr=<Guard0x138766500>) jump(p0, p1, p8, i46, p12, i49, i23, descr=TargetToken(5242227232)) Expected: i49 = int_lt(i47, i24) guard_true(i49, descr=...) i50 = int_add(i47, 1) i53 = int_and(i47, 15) setfield_gc(p15, i50, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i55 = int_le(i53, 0) guard_false(i55, descr=...) i56 = int_eq(i53, 1) guard_false(i56, descr=...) p80 = call_r(ConstClass(ll_char_mul__Char_Signed), 120, i53, descr=<Callr . ii EF=3>) guard_no_exception(descr=...) guard_not_invalidated(descr=...) i59 = call_i(ConstClass(first_non_ascii_char), p80, descr=<Calli . r EF=4>) guard_no_exception(descr=...) i61 = int_lt(i59, 0) guard_true(i61, descr=...) i62 = strlen(p80) 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=...) ___________ TestString.test_unicode_indexing_small_constant_indices ____________ self = <pypy.module.pypyjit.test_pypy_c.test_string.TestString object at 0x0000000113f8a6b0> def test_unicode_indexing_small_constant_indices(self): log = self.run(""" l = [u"abä", u"cdä", u"äü", u"éé", u"–—¿"] * 1000 def main(n): global s for u in l: s = u[0] + u[1] + u[-1] # ID: index len(u) return len(s) """, [1000]) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('index', ''' i77 = getfield_gc_i(p73, descr=<FieldS pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__length .*>) p78 = getfield_gc_r(p73, descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__utf8 .* pure>) i79 = strlen(p78) i80 = int_eq(i77, i79) guard_false(i80, descr=...) # check not ascii i82 = int_ge(0, i77) guard_false(i82, descr=...) i85 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p78, 0, descr=...) i86 = int_gt(i85, i79) guard_false(i86, descr=...) i88 = int_ge(1, i77) guard_false(i88, descr=...) i90 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p78, i85, descr=...) i91 = int_gt(i90, i79) guard_false(i91, descr=...) i92 = int_sub(i90, i85) i94 = int_add(-1, i77) i96 = call_i(ConstClass(prev_codepoint_pos_dont_look_inside), p78, i79, descr=...) i97 = int_sub(i79, i96) guard_not_invalidated(descr=...) ''') pypy/module/pypyjit/test_pypy_c/test_string.py:320: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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:408: in match_op self._assert(op != '--end--', 'got less ops than expected') _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x0000000133dcbde0> cond = False, message = 'got less ops than expected' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: got less ops than expected pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch ----------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = 'index' ('got less ops than expected',) <could not determine information> Ignore ops: [] Got: i72 = getfield_gc_i(p68, descr=<FieldS pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__length 16 pure>) p73 = getfield_gc_r(p68, descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__utf8 24 pure>) i74 = strlen(p73) i75 = int_eq(i72, i74) guard_false(i75, descr=<Guard0x1481f4ad0>) i77 = int_ge(0, i72) guard_false(i77, descr=<Guard0x1481f4b30>) i80 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p73, 0, descr=<Calli 8 ri EF=0>) i81 = int_gt(i80, i74) guard_false(i81, descr=<Guard0x148171850>) i83 = int_ge(1, i72) guard_false(i83, descr=<Guard0x1481f4bc0>) i85 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p73, i80, descr=<Calli 8 ri EF=0>) i86 = int_gt(i85, i74) guard_false(i86, descr=<Guard0x148171898>) i87 = int_sub(i85, i80) i89 = int_add(-1, i72) i91 = call_i(ConstClass(prev_codepoint_pos_dont_look_inside), p73, i74, descr=<Calli 8 ri EF=0>) i92 = int_sub(i74, i91) ===== HERE ===== Expected: i77 = getfield_gc_i(p73, descr=<FieldS pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__length .*>) p78 = getfield_gc_r(p73, descr=<FieldP pypy.objspace.std.unicodeobject.W_UnicodeObject.inst__utf8 .* pure>) i79 = strlen(p78) i80 = int_eq(i77, i79) guard_false(i80, descr=...) # check not ascii i82 = int_ge(0, i77) guard_false(i82, descr=...) i85 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p78, 0, descr=...) i86 = int_gt(i85, i79) guard_false(i86, descr=...) i88 = int_ge(1, i77) guard_false(i88, descr=...) i90 = call_i(ConstClass(next_codepoint_pos_dont_look_inside), p78, i85, descr=...) i91 = int_gt(i90, i79) guard_false(i91, descr=...) i92 = int_sub(i90, i85) i94 = int_add(-1, i77) i96 = call_i(ConstClass(prev_codepoint_pos_dont_look_inside), p78, i79, descr=...) i97 = int_sub(i79, i96) guard_not_invalidated(descr=...) _______________________ TestStruct.test_struct_function ________________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x00000001121a2d40> def test_struct_function(self): def main(n): import struct i = 1 while i < n: buf = struct.pack("<i", i) # ID: pack x = struct.unpack("<i", buf)[0] # ID: unpack i += x // i return i log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) # This could, of course stand some improvement, to remove all these # arithmatic ops, but we've removed all the core overhead. if sys.byteorder == 'little': # on little endian machines, we take the fast path and store the # value using gc_store_indexed assert loop.match_by_id("pack", """ dummy_get_utf8? guard_not_invalidated(descr=...) # struct.pack %s p75 = newstr(4) gc_store_indexed(p75, 0, _, 1, _, 4, descr=...) > """ % extra) pypy/module/pypyjit/test_pypy_c/test_struct.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000112efff68> 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 = 'pack' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== i68 = int_ge(i61, -2147483648) guard_true(i68, descr=<Guard0x140202740>) i70 = int_le(i61, 2147483647) guard_true(i70, descr=<Guard0x1402027a0>) p72 = newstr(4) gc_store_indexed(p72, 0, i61, 1, 24, 4, descr=<ArrayS 4>) Expected: dummy_get_utf8? guard_not_invalidated(descr=...) # struct.pack i8 = int_ge(i4, -2147483648) guard_true(i8, descr=...) i9 = int_le(i4, 2147483647) guard_true(i9, descr=...) p75 = newstr(4) gc_store_indexed(p75, 0, _, 1, _, 4, descr=...) ________________________ TestStruct.test_struct_object _________________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x000000011408a218> def test_struct_object(self): def main(n): import struct s = struct.Struct("ii") i = 1 while i < n: buf = s.pack(-1, i) # ID: pack x = s.unpack(buf)[1] # ID: unpack i += x // i return i log = self.run(main, [1000]) assert log.result == main(1000) if sys.byteorder == 'little': loop, = log.loops_by_filename(self.filepath) assert loop.match_by_id('pack', """ dummy_get_utf8? guard_not_invalidated(descr=...) # struct.pack p85 = newstr(8) gc_store_indexed(p85, 0, -1, 1, _, 4, descr=...) %s gc_store_indexed(p85, 4, _, 1, _, 4, descr=...) > """ % extra) pypy/module/pypyjit/test_pypy_c/test_struct.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000131d04058> 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 = 'pack' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== p81 = newstr(8) gc_store_indexed(p81, 0, -1, 1, 24, 4, descr=<ArrayS 4>) i88 = int_ge(i74, -2147483648) guard_true(i88, descr=<Guard0x12875ef98>) i90 = int_le(i74, 2147483647) guard_true(i90, descr=<Guard0x128778aa0>) gc_store_indexed(p81, 4, i74, 1, 24, 4, descr=<ArrayS 4>) Expected: dummy_get_utf8? guard_not_invalidated(descr=...) # struct.pack p85 = newstr(8) gc_store_indexed(p85, 0, -1, 1, _, 4, descr=...) i8 = int_ge(i4, -2147483648) guard_true(i8, descr=...) i9 = int_le(i4, 2147483647) guard_true(i9, descr=...) gc_store_indexed(p85, 4, _, 1, _, 4, descr=...) ______________________ TestStruct.test_unpack_raw_buffer _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x0000000133ef0170> def test_unpack_raw_buffer(self): def main(n): import array import struct buf = struct.pack('H', 0x1234) buf = array.array('b', buf) i = 1 res = 0 while i < n: val = struct.unpack("h", buf)[0] # ID: unpack res += val i += 1 return res log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('unpack', """ guard_not_invalidated(descr=...) i65 = raw_load_i(i49, 0, descr=<ArrayS 2>) """) pypy/module/pypyjit/test_pypy_c/test_struct.py:133: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000125cbd1a0> 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 = 'unpack' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== i65 = raw_load_i(i49, 0, descr=<ArrayS 2>) Expected: guard_not_invalidated(descr=...) i65 = raw_load_i(i49, 0, descr=<ArrayS 2>) _______________________ TestStruct.test_unpack_bytearray _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x00000001253cd440> def test_unpack_bytearray(self): def main(n): import struct buf = struct.pack('H', 0x1234) buf = bytearray(buf) i = 1 res = 0 while i < n: val = struct.unpack("h", buf)[0] # ID: unpack res += val i += 1 return res log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) # the offset of gc_load_indexed_i used to be the constant 0. However, # now it is 'i46' because we need to add 0 to # W_BytearrayObject._offset > assert loop.match_by_id('unpack', """ guard_not_invalidated(descr=...) setfield_gc(_, _, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) i70 = gc_load_indexed_i(p48, i46, 1, _, -2) """) pypy/module/pypyjit/test_pypy_c/test_struct.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000124d8d8d8> 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 = 'unpack' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== setfield_gc(p12, i43, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports 16>) i74 = gc_load_indexed_i(p52, i46, 1, 16, -2) Expected: guard_not_invalidated(descr=...) setfield_gc(_, _, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) i70 = gc_load_indexed_i(p48, i46, 1, _, -2) _____________________ TestStruct.test_pack_into_raw_buffer _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x00000001237c7718> def test_pack_into_raw_buffer(self): def main(n): import array import struct buf = array.array('b', b'\x00'*8) i = 1 while i < n: struct.pack_into("h", buf, 4, i) # ID: pack_into i += 1 return i log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('pack_into', """\ guard_not_invalidated(descr=...) i65 = int_le(i58, 32767) guard_true(i65, descr=...) raw_store(i55, 4, i58, descr=<ArrayS 2>) """) pypy/module/pypyjit/test_pypy_c/test_struct.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000013223f088> 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 = 'pack_into' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== setfield_gc(p14, i45, descr=<FieldS pypy.module.array.interp_array.W_ArrayBase.inst__exports 16>) i65 = int_le(i58, 32767) guard_true(i65, descr=<Guard0x15875d028>) raw_store(i55, 4, i58, descr=<ArrayS 2>) Expected: guard_not_invalidated(descr=...) i65 = int_le(i58, 32767) guard_true(i65, descr=...) raw_store(i55, 4, i58, descr=<ArrayS 2>) _____________________ TestStruct.test_pack_into_bytearray ______________________ self = <pypy.module.pypyjit.test_pypy_c.test_struct.TestStruct object at 0x000000011184ebb8> def test_pack_into_bytearray(self): def main(n): import struct buf = bytearray(8) i = 1 while i < n: struct.pack_into("h", buf, 4, i) # ID: pack_into i += 1 return i log = self.run(main, [1000]) assert log.result == main(1000) loop, = log.loops_by_filename(self.filepath) > assert loop.match_by_id('pack_into', """\ dummy_get_utf8? guard_not_invalidated(descr=...) dummy_get_utf8? _ = int_add(_, 1) p68 = getfield_gc_r(p14, descr=<FieldP pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__data \d+>) i69 = getfield_gc_i(p68, descr=<FieldS list.length \d+>) i70 = getfield_gc_i(p14, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__offset \d+>) i71 = int_sub(i69, i70) i72 = int_add(i71, -1) i73 = int_add(i71, -5) setfield_gc(p14, _, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) i75 = int_lt(i73, 2) guard_false(i75, descr=...) i77 = int_le(i62, 32767) guard_true(i77, descr=...) p78 = getfield_gc_r(p68, descr=<FieldP list.items \d+>) i81 = int_add(4, i70) gc_store_indexed(p78, i81, i62, 1, _, 2, descr=<ArrayS 2>) _ = getfield_gc_i(p14, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) _ = int_le(_, 0) guard_false(_, descr=...) _ = int_add(_, -1) """) pypy/module/pypyjit/test_pypy_c/test_struct.py:194: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000123ba11a0> 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 = 'pack_into' ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== i77 = int_add(i68, 1) p78 = getfield_gc_r(p12, descr=<FieldP pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__data 8>) i79 = getfield_gc_i(p78, descr=<FieldS list.length 8>) i80 = getfield_gc_i(p12, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__offset 24>) i81 = int_sub(i79, i80) i83 = int_add(i81, -1) i85 = int_add(i81, -5) setfield_gc(p12, i77, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports 16>) i87 = int_lt(i85, 2) guard_false(i87, descr=<Guard0x11875d028>) i89 = int_le(i70, 32767) guard_true(i89, descr=<Guard0x11877a500>) p90 = getfield_gc_r(p78, descr=<FieldP list.items 16>) i92 = int_add(4, i80) gc_store_indexed(p90, i92, i70, 1, 16, 2, descr=<ArrayS 2>) i96 = getfield_gc_i(p12, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports 16>) i98 = int_le(i96, 0) guard_false(i98, descr=<Guard0x11875d070>) i100 = int_add(i96, -1) Expected: dummy_get_utf8? guard_not_invalidated(descr=...) dummy_get_utf8? _ = int_add(_, 1) p68 = getfield_gc_r(p14, descr=<FieldP pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__data \d+>) i69 = getfield_gc_i(p68, descr=<FieldS list.length \d+>) i70 = getfield_gc_i(p14, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__offset \d+>) i71 = int_sub(i69, i70) i72 = int_add(i71, -1) i73 = int_add(i71, -5) setfield_gc(p14, _, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) i75 = int_lt(i73, 2) guard_false(i75, descr=...) i77 = int_le(i62, 32767) guard_true(i77, descr=...) p78 = getfield_gc_r(p68, descr=<FieldP list.items \d+>) i81 = int_add(4, i70) gc_store_indexed(p78, i81, i62, 1, _, 2, descr=<ArrayS 2>) _ = getfield_gc_i(p14, descr=<FieldS pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__exports \d+>) _ = int_le(_, 0) guard_false(_, descr=...) _ = int_add(_, -1) ____________________________ TestThread.test_simple ____________________________ self = <pypy.module.pypyjit.test_pypy_c.test_thread.TestThread object at 0x00000001232c33d0> def test_simple(self): def main(n): try: import _thread as thread except ImportError: import thread def f(): i = 0 while i < n: i += 1 done.release() done = thread.allocate_lock() done.acquire() thread.start_new_thread(f, ()) done.acquire() return 0 log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i2 = int_lt(i0, i1) guard_true(i2, descr=...) i3 = int_add(i0, 1) --THREAD-TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_thread.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000111a57398> 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=<Guard0x130171148>) i34 = int_lt(i26, i23) guard_true(i34, descr=<Guard0x1301c7f10>) i36 = int_add(i26, 1) i38 = getfield_raw_i(4456421992, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i40 = int_add(i38, -1) setfield_raw(4456421992, i40, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i40, 0) guard_false(i43, descr=<Guard0x130171268>) jump(p0, p1, i36, p10, p12, p20, i23, descr=TargetToken(5101925536)) Expected: i2 = int_lt(i0, i1) guard_true(i2, descr=...) i3 = int_add(i0, 1) guard_not_invalidated? ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker1 = int_add(ticker0, #) setfield_raw(#, ticker1, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond0 = int_lt(ticker1, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) _____________________________ TestThread.test_tls ______________________________ self = <pypy.module.pypyjit.test_pypy_c.test_thread.TestThread object at 0x0000000140c24090> def test_tls(self): def main(n): try: from _thread import _local except ImportError: from thread import _local local = _local() local.x = "abc" # prevent type unboxing local.x = 1 i = 0 while i < n: i += local.x return 0 log = self.run(main, [500]) assert round(log.result, 6) == round(main(500), 6) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i53 = int_lt(i48, i27) guard_true(i53, descr=...) i54 = int_add_ovf(i48, i47) guard_no_overflow(descr=...) --TICK-- i58 = arraylen_gc(p43, descr=...) jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_thread.py:49: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000111d24e58> 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=<Guard0x1586e9808>) i54 = int_lt(i49, i28) guard_true(i54, descr=<Guard0x158749fd0>) i55 = int_add_ovf(i49, i48) guard_no_overflow(descr=<Guard0x15876e020>) i57 = getfield_raw_i(4393359976, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x15876e080>) i60 = arraylen_gc(p44, descr=<ArrayP 8>) jump(p0, p1, p8, p10, p12, i55, p20, p22, i28, p36, p40, p44, p46, i48, descr=TargetToken(5779089824)) Expected: i53 = int_lt(i48, i27) guard_true(i53, descr=...) i54 = int_add_ovf(i48, i47) guard_no_overflow(descr=...) 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=...) i58 = arraylen_gc(p43, descr=...) jump(..., descr=...) _____________________ TestThread.test_lock_acquire_release _____________________ self = <pypy.module.pypyjit.test_pypy_c.test_thread.TestThread object at 0x0000000140f4c0c8> def test_lock_acquire_release(self): def main(n): import threading lock = threading.Lock() while n > 0: with lock: n -= 1 log = self.run(main, [500]) assert log.result == main(500) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i56 = int_gt(i44, 0) guard_true(i56, descr=...) guard_not_invalidated? p57 = force_token() setfield_gc(p0, p57, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i58 = call_may_force_i(ConstClass(acquire_timed), p31, -1, descr=<Calli . ri EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) i99 = int_eq(i58, 1) guard_true(i99, descr=...) i58 = int_add(i44, -1) guard_not_invalidated? i59 = call_i(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>) i60 = int_is_true(i59) guard_false(i60, descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_thread.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x000000011290ae20> 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=<Guard0x138ab7418>) i50 = int_gt(i40, 0) guard_true(i50, descr=<Guard0x138b030a0>) p51 = force_token() setfield_gc(p0, p51, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i54 = call_may_force_i(ConstClass(acquire_timed), p32, -1, descr=<Calli 8 ri EF=7>) guard_not_forced(descr=<Guard0x138ad4ed0>) guard_no_exception(descr=<Guard0x138b030d0>) i56 = int_eq(i54, 1) guard_true(i56, descr=<Guard0x138b03130>) guard_not_invalidated(descr=<Guard0x138b03160>) i58 = int_add(i40, -1) i60 = call_i(ConstClass(RPyThreadReleaseLock), i41, descr=<Calli 8 i EF=2>) i61 = int_is_true(i60) guard_false(i61, descr=<Guard0x138ab7460>) i64 = getfield_raw_i(4422605416, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x138b031f0>) jump(p0, p1, i58, p10, p12, p22, p24, p32, i41, descr=TargetToken(5246023008)) Expected: i56 = int_gt(i44, 0) guard_true(i56, descr=...) guard_not_invalidated? p57 = force_token() setfield_gc(p0, p57, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) i58 = call_may_force_i(ConstClass(acquire_timed), p31, -1, descr=<Calli . ri EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) i99 = int_eq(i58, 1) guard_true(i99, descr=...) i58 = int_add(i44, -1) guard_not_invalidated? i59 = call_i(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>) i60 = int_is_true(i59) guard_false(i60, descr=...) 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=...) ____________________ TestThread.test_make_ref_with_callback ____________________ self = <pypy.module.pypyjit.test_pypy_c.test_weakref.TestThread object at 0x000000013001dd00> def test_make_ref_with_callback(self): log = self.run(""" import weakref class Dummy(object): pass def noop(obj): pass def main(n): obj = Dummy() for i in range(n): weakref.ref(obj, noop) """, [500]) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i58 = getfield_gc_i(p18, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current .>) i60 = int_lt(i58, i31) guard_true(i60, descr=...) i61 = int_add(i58, 1) dummy_get_utf8? setfield_gc(p18, i61, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_not_invalidated(descr=...) dummy_get_utf8? dummy_get_utf8? p65 = getfield_gc_r(p14, descr=<FieldP .+inst_map \d+>) guard_value(p65, ConstPtr(ptr45), descr=...) p66 = getfield_gc_r(p14, descr=<FieldP .+inst__value0 \d+>) guard_nonnull(p66, descr=...) p67 = force_token() setfield_gc(p0, p67, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token \d+>) p68 = call_may_force_r(ConstClass(WeakrefLifeline.make_weakref_with_callback), p66, ConstPtr(ptr50), p14, ConstPtr(ptr51), descr=<Callr \d rrrr EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) guard_nonnull_class(p68, ..., descr=...) guard_not_invalidated(descr=...) --TICK-- jump(..., descr=...) """) pypy/module/pypyjit/test_pypy_c/test_weakref.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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 0x0000000130a41cc8> 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=<Guard0x1381f34f0>) i45 = getfield_gc_i(p14, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) i46 = int_lt(i45, i27) guard_true(i46, descr=<Guard0x1382140b0>) i48 = int_add(i45, 1) p49 = getfield_gc_r(p10, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst_map 48>) setfield_gc(p14, i48, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_value(p49, ConstPtr(ptr50), descr=<Guard0x1381f3538>) p52 = getfield_gc_r(p10, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull(p52, descr=<Guard0x138214110>) p53 = force_token() setfield_gc(p0, p53, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token 8>) p57 = call_may_force_r(ConstClass(WeakrefLifeline.make_weakref_with_callback), p52, ConstPtr(ptr55), p10, ConstPtr(ptr56), descr=<Callr 8 rrrr EF=7>) guard_not_forced(descr=<Guard0x1381ed380>) guard_no_exception(descr=<Guard0x138214140>) guard_nonnull_class(p57, 4404628904, descr=<Guard0x1381f3580>) guard_not_invalidated(descr=<Guard0x138214170>) i60 = getfield_raw_i(4418525800, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x1382141d0>) jump(p0, p1, p8, p10, i45, p14, i27, descr=TargetToken(5236560544)) Expected: i58 = getfield_gc_i(p18, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current .>) i60 = int_lt(i58, i31) guard_true(i60, descr=...) i61 = int_add(i58, 1) dummy_get_utf8? setfield_gc(p18, i61, descr=<FieldS pypy.module.__builtin__.functional.W_IntRangeIterator.inst_current 8>) guard_not_invalidated(descr=...) dummy_get_utf8? dummy_get_utf8? p65 = getfield_gc_r(p14, descr=<FieldP .+inst_map \d+>) guard_value(p65, ConstPtr(ptr45), descr=...) p66 = getfield_gc_r(p14, descr=<FieldP .+inst__value0 \d+>) guard_nonnull(p66, descr=...) p67 = force_token() setfield_gc(p0, p67, descr=<FieldP pypy.interpreter.pyframe.PyFrame.vable_token \d+>) p68 = call_may_force_r(ConstClass(WeakrefLifeline.make_weakref_with_callback), p66, ConstPtr(ptr50), p14, ConstPtr(ptr51), descr=<Callr \d rrrr EF=7>) guard_not_forced(descr=...) guard_no_exception(descr=...) guard_nonnull_class(p68, ..., descr=...) guard_not_invalidated(descr=...) 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=...) =========================== short test summary info ============================ FAIL pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_loops_by_id FAIL pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_ops_by_id FAIL pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_inlined_function FAIL pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_loop_match FAIL pypy/module/pypyjit/test_pypy_c/test_array.py::TestArray::()::test_arraycopy_disappears FAIL pypy/module/pypyjit/test_pypy_c/test_array.py::TestArray::()::test_array_intimg FAIL pypy/module/pypyjit/test_pypy_c/test_buffers.py::TestBuffers::()::test_re_match FAIL pypy/module/pypyjit/test_pypy_c/test_buffers.py::TestBuffers::()::test_struct_unpack FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_simple_call FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_method_call FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_static_classmethod_call FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_empty FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_func_defaults FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_global_closure_has_constant_cells FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_local_closure_is_virtual FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_virtual FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_virtual2 FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_kwargs_update_virtual1 FAIL pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_methodcall_kwargs_regression FAIL pypy/module/pypyjit/test_pypy_c/test_exception.py::TestException::()::test_exception_inside_loop_1 FAIL pypy/module/pypyjit/test_pypy_c/test_exception.py::TestException::()::test_reraise FAIL pypy/module/pypyjit/test_pypy_c/test_exception.py::TestException::()::test_continue_in_finally FAIL pypy/module/pypyjit/test_pypy_c/test_ffi.py::Test__ffi::()::test_cffi_init_struct_with_list FAIL pypy/module/pypyjit/test_pypy_c/test_generators.py::TestGenerators::()::test_simple_generator1 FAIL pypy/module/pypyjit/test_pypy_c/test_generators.py::TestGenerators::()::test_simple_generator2 FAIL pypy/module/pypyjit/test_pypy_c/test_getframe.py::TestGetFrame::()::test_getframe_one FAIL pypy/module/pypyjit/test_pypy_c/test_globals.py::TestGlobals::()::test_load_builtin FAIL pypy/module/pypyjit/test_pypy_c/test_import.py::TestImport::()::test_import_in_function FAIL pypy/module/pypyjit/test_pypy_c/test_import.py::TestImport::()::test___import___has_fast_path FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_virtual_instance FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_load_attr FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_mutate_class_int FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_mutate_class FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_python_contains FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_super FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_super_no_args FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_float_instance_field_read FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_float_instance_field_write FAIL pypy/module/pypyjit/test_pypy_c/test_instance.py::TestInstance::()::test_namedtuple_construction FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_gt FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_sub_lt FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_addsub_ge FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_addmul_ge FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_eq FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_mul FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_assert FAIL pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_abs_branch_free FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_log FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_sin_cos FAIL pypy/module/pypyjit/test_pypy_c/test_math.py::TestMath::()::test_pow_two FAIL pypy/module/pypyjit/test_pypy_c/test_min_max.py::TestMinMax::()::test_min_max FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_f1 FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_factorial FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_mixed_type_loop FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_cached_pure_func_of_equal_fields FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_range_iter_simple FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_range_iter_normal FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_dont_trace_every_iteration FAIL pypy/module/pypyjit/test_pypy_c/test_misc.py::TestMisc::()::test_locals FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_python3_missing_bchr FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_lookup_default_encoding FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_int_base_16 FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_str_mod FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_lookup_codec FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_decode_ascii FAIL pypy/module/pypyjit/test_pypy_c/test_string.py::TestString::()::test_unicode_indexing_small_constant_indices FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_struct_function FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_struct_object FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_unpack_raw_buffer FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_unpack_bytearray FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_pack_into_raw_buffer FAIL pypy/module/pypyjit/test_pypy_c/test_struct.py::TestStruct::()::test_pack_into_bytearray FAIL pypy/module/pypyjit/test_pypy_c/test_thread.py::TestThread::()::test_simple FAIL pypy/module/pypyjit/test_pypy_c/test_thread.py::TestThread::()::test_tls FAIL pypy/module/pypyjit/test_pypy_c/test_thread.py::TestThread::()::test_lock_acquire_release FAIL pypy/module/pypyjit/test_pypy_c/test_weakref.py::TestThread::()::test_make_ref_with_callback ======= 76 failed, 955 passed, 164 skipped, 1 xfailed in 108.98 seconds ======== program finished with exit code 1 elapsedTime=109.442926