python testrunner/pypyjit_tests.py in dir /Users/matti/build-worker-x86_64/pypy-c-jit-macos-x86-64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: HOME=/Users/matti HOMEBREW_CELLAR=/opt/homebrew_x86_64/Cellar HOMEBREW_PREFIX=/opt/homebrew_x86_64 HOMEBREW_REPOSITORY=/opt/homebrew_x86_64 INFOPATH=/opt/homebrew_x86_64/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-x86_64-buildbot/bin:/opt/homebrew_x86_64/bin:/opt/homebrew_x86_64/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_x86_64/opt/openssl@1.1/lib/pkgconfig PWD=/Users/matti/build-worker-x86_64/pypy-c-jit-macos-x86-64/build PYPY_USESSION_DIR=/tmp/buildbot-x86_64 SHELL=/bin/zsh SHLVL=2 SSH_CLIENT=10.0.0.17 59930 22 SSH_CONNECTION=10.0.0.17 59930 10.0.0.16 22 SSH_TTY=/dev/ttys000 TERM=xterm-256color TMPDIR=/tmp/buildbot-x86_64/pytest USER=matti _=/Users/matti/oss/pypy-x86_64-buildbot/bin/buildslave using PTY: False /Users/matti/oss/pypy-x86_64-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-x86_64/pypy-c-jit-macos-x86-64/build/pytest.pyc rootdir: /Users/matti/build-worker-x86_64/pypy-c-jit-macos-x86-64/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..... 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 0x00007fd2b4ea7f68> 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 0x00007fd2b474b7f8> 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 0x00007fd2a2b182f8> 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 0x00007fd2b60699f0> 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 0x00007fd2b61102f8> 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=<Guard0x7fe13874c020>) i26 = int_lt(i20, 1003) guard_true(i26, descr=<Guard0x7fe138749130>) i28 = int_add(i20, 1) i30 = getfield_raw_i(4597915040, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i32 = int_lt(i30, 0) guard_false(i32, descr=<Guard0x7fe1387491a0>) jump(p0, p1, i28, descr=TargetToken(140605291493664)) 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 0x00007fd2b583ccd0> 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 0x00007fd290d4f1d8> 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=<Guard0x7fccd81d6fc0>) i38 = int_lt(i33, i30) guard_true(i38, descr=<Guard0x7fccd81f0fa8>) i40 = int_add(i33, 1) i42 = getfield_raw_i(4542533024, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x7fccd81f1018>) jump(p0, p1, p8, i40, i30, descr=TargetToken(140517775937120)) 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 0x00007fd2b62d5c20> 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 0x00007fd2a2d3b0f8> 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=<Guard0x7fb9d81d5240>) i67 = int_lt(i61, 307200) guard_true(i67, descr=<Guard0x7fb9d81fe1a8>) 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=<Guard0x7fb9d81fe218>) setarrayitem_raw(i54, i61, i75, descr=<ArrayS 4>) i78 = int_add(i61, 1) i80 = getfield_raw_i(4528623008, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i82 = int_lt(i80, 0) guard_false(i82, descr=<Guard0x7fb9d81d5290>) jump(p0, p1, p8, p10, p12, i78, i69, p24, i46, i54, descr=TargetToken(140436171560224)) 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 0x00007fd2a3a278a0> 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 0x00007fd2a384ade8> 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=<Guard0x7f9cb07a52e0>) i76 = instance_ptr_eq(ConstPtr(ptr75), p73) guard_false(i76, descr=<Guard0x7f9cb07bfcc8>) 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=<Guard0x7f9cb07bfd38>) i84 = int_gt(9223372036854775807, i80) guard_true(i84, descr=<Guard0x7f9cb07bfda8>) guard_not_invalidated(descr=<Guard0x7f9cb07bfe88>) i99 = getfield_raw_i(4531772832, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i101 = int_lt(i99, 0) guard_false(i101, descr=<Guard0x7f9cb07bfef8>) 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 0x00007fd2b660abb8> 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 0x00007fd2b5f816e0> 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(4560780704, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x7f84801017f8>) 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 0x00007fd2a40e17c0> 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 0x00007fd2b6e76c28> 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 0x00007fd2906a1a98> 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 0x00007fd2b55283d8> 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=<Guard0x7f8df81d3100>) i60 = int_lt(i47, i30) guard_true(i60, descr=<Guard0x7f8df81fe4f0>) p61 = force_token() i65 = int_add_ovf(i59, 1) guard_no_overflow(descr=<Guard0x7f8df81fe528>) p67 = force_token() i72 = getfield_raw_i(4576214432, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x7f8df81fe598>) jump(p0, p1, p8, i59, p12, i65, p16, p24, i30, p37, i65, descr=TargetToken(140247729886240)) 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 0x00007fd2b753ab80> 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 0x00007fd2a33f9210> 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 0x00007fd272250cd0> 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=<Guard0x7fa4d81d6f20>) i36 = int_lt(i29, i26) guard_true(i36, descr=<Guard0x7fa4d81f3328>) i38 = int_add(i29, 1) i40 = getfield_raw_i(4597046688, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i42 = int_lt(i40, 0) guard_false(i42, descr=<Guard0x7fa4d81f3398>) jump(p0, p1, p8, i38, i26, descr=TargetToken(140345977244768)) 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 0x00007fd27253e9c0> 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 0x00007fd2725abd38> 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=<Guard0x7f8c381d6fc0>) ===== HERE ===== guard_value(p3, ConstPtr(ptr14), descr=<Guard0x7f8c381f1130>) guard_not_invalidated(descr=<Guard0x7f8c381f1168>) guard_isnull(p5, descr=<Guard0x7f8c381f11d8>) guard_nonnull_class(p8, ConstClass(W_IntObject), descr=<Guard0x7f8c381d7010>) 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=<Guard0x7f8c381f1248>) 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=<Guard0x7f8c381d7060>) i26 = getfield_gc_i(p21, descr=<FieldU pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 186 pure>) i27 = int_is_zero(i26) guard_true(i27, descr=<Guard0x7f8c381f12b8>) i31 = int_add(i16, 5) i34 = getfield_raw_i(4573953440, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i36 = int_lt(i34, 0) guard_false(i36, descr=<Guard0x7f8c381f1328>) 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 0x00007fd27296d0c0> 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 0x00007fd2729ed9b8> 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=<Guard0x7f84701d4f70>) 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=<Guard0x7f84701f19b8>) p47 = force_token() i51 = int_add(i44, 1) i54 = getfield_raw_i(4536065440, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i56 = int_lt(i54, 0) guard_false(i56, descr=<Guard0x7f84701f1a28>) 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(140206793461408)) 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 0x00007fd272dd0ad8> 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 0x00007fd272e5d7f8> 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=<Guard0x7fdaa068d060>) i54 = int_lt(i48, i24) guard_true(i54, descr=<Guard0x7fdaa06a9c90>) p55 = force_token() i59 = int_add(i48, 1) i62 = getfield_raw_i(4574297504, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i64 = int_lt(i62, 0) guard_false(i64, descr=<Guard0x7fdaa06a9d00>) jump(p0, p1, p8, p10, i59, i24, p38, descr=TargetToken(140576970904288)) 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 0x00007fd27325b6a8> 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 0x00007fd273312100> 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=<Guard0x7ff4001d3100>) i55 = int_lt(i50, i26) guard_true(i55, descr=<Guard0x7ff40020a288>) p56 = force_token() p59 = force_token() i63 = int_sub_ovf(1, i46) guard_no_overflow(descr=<Guard0x7ff40020a2c0>) i64 = int_add_ovf(i63, i50) guard_no_overflow(descr=<Guard0x7ff40020a2f8>) i68 = int_add(i50, 1) i70 = getfield_raw_i(4528717216, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x7ff40020a368>) jump(p0, p1, p8, i64, i68, i26, p31, descr=TargetToken(140685950782240)) 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 0x00007fd2b5bf6330> 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 0x00007fd2a17e2138> 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 0x00007fd2b28b2fe0> 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=<Guard0x7f9a6068d100>) 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 0x00007fd2b3ea0b10> 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 0x00007fd2b49a2c28> 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=<Guard0x7f7c801d31a0>) i40 = int_is_true(i35) guard_true(i40, descr=<Guard0x7f7c801f36a8>) i42 = getfield_raw_i(4604009888, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x7f7c801f3718>) i46 = int_sub_ovf(i35, 1) guard_no_overflow(descr=<Guard0x7f7c801f3750>) i48 = getfield_raw_i(4604009888, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i50 = int_lt(i48, 0) guard_false(i50, descr=<Guard0x7f7c801f37c0>) jump(p0, p1, i46, p16, p32, descr=TargetToken(140172702158112)) 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 0x00007fd2b5352b10> 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 0x00007fd2b569d4e8> 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=<Guard0x7fdc180e33d0>) i44 = int_lt(i39, i24) guard_true(i44, descr=<Guard0x7fdc181039b8>) i46 = getfield_raw_i(4596874656, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x7fdc18103a28>) i50 = int_add(i39, 1) i52 = getfield_raw_i(4596874656, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x7fdc18103a98>) jump(p0, p1, p8, i50, i24, p36, descr=TargetToken(140583273221344)) 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 0x00007fd290c12560> 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 0x00007fd29094f130> 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=<Guard0x7fd2881d2980>) i32 = int_lt(i27, i24) guard_true(i32, descr=<Guard0x7fd2881ea1e0>) i34 = int_add(i27, 1) i36 = getfield_raw_i(4527873440, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x7fd2881ea1a8>) jump(p0, p1, p8, i34, p16, p18, i24, descr=TargetToken(140542203535776)) 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 0x00007fd2a27525d0> 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 0x00007fd2b64d0f00> 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=<Guard0x7f98003a71f0>) 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=<Guard0x7f98003d8bf0>) 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=<Guard0x7f98003a7240>) 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=<Guard0x7f98003a7290>) p120 = getfield_gc_r(p118, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p120, ConstPtr(ptr121), descr=<Guard0x7f98003a72e0>) p123 = getfield_gc_r(p14, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull_class(p123, 4559863808, descr=<Guard0x7f98003a7330>) p125 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_userclass 32 pure>) guard_isnull(p125, descr=<Guard0x7f98003d8c60>) p126 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_dict 16 pure>) guard_value(p126, ConstPtr(ptr127), descr=<Guard0x7f98003a7380>) p128 = getfield_gc_r(p126, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p128, ConstPtr(ptr129), descr=<Guard0x7f98003a73d0>) p131 = call_r(ConstClass(_ll_0_alloc_with_del___), descr=<Callr 8 EF=5>) guard_no_exception(descr=<Guard0x7f98003a7420>) 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=<Guard0x7f980039d518>) guard_no_exception(descr=<Guard0x7f98003d8c98>) i144 = int_signext(i104, 2) i145 = int_ne(i104, i144) guard_false(i145, descr=<Guard0x7f98003d8d08>) 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(4573638048, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i158 = int_add(i156, -14) setfield_raw(4573638048, 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=<Guard0x7f98003a7470>) jump(p0, p1, p8, p10, p12, p14, i104, p18, i35, p44, p45, descr=TargetToken(140290815695904)) 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 0x00007fd27016ea68> 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 0x00007fd2b7264528> 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=<Guard0x7f8e5868b380>) cond_call(i25, 4549857952, 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(140249345448160)) 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 0x00007fd270af22f8> 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 0x00007fd290b699f0> 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=<Guard0x7fdd281d3380>) cond_call(i25, 4576031392, 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(140587837610144)) 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 0x00007fd2b6b14608> 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 0x00007fd27208e8e0> 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=<Guard0x7fc3c87272e0>) i47 = int_lt(i42, i24) guard_true(i47, descr=<Guard0x7fc3c873b788>) i49 = int_add(i42, 1) i51 = getfield_raw_i(4597886368, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i53 = int_lt(i51, 0) guard_false(i53, descr=<Guard0x7fc3c873b7f8>) jump(p0, p1, p8, p10, i49, i24, p34, descr=TargetToken(140478858343136)) 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 0x00007fd2b6e5d360> 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 0x00007fd270b6ec28> 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 0x00007fd2b6fbf168> 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 0x00007fd2b7e9f558> 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 0x00007fd27225ce20> 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 0x00007fd2b6abd408> 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 0x00007fd2b7224a68> 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 0x00007fd2b721bb78> 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=<Guard0x7f7970635920>) i37 = int_lt(i32, i28) guard_true(i37, descr=<Guard0x7f797067c138>) i39 = int_add_ovf(i32, 2) guard_no_overflow(descr=<Guard0x7f797067c170>) i41 = getfield_raw_i(4569566624, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i41, 0) guard_false(i43, descr=<Guard0x7f797067c1e0>) jump(p0, p1, p8, i39, p22, i28, descr=TargetToken(140159553410272)) 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 0x00007fd2a391f440> 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 0x00007fd2b5d79248> 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=<Guard0x7fb6201069d0>) i31 = int_lt(i26, i20) guard_true(i31, descr=<Guard0x7fb62011a218>) i33 = int_add(i26, 1) i35 = getfield_raw_i(4565999008, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i37 = int_lt(i35, 0) guard_false(i37, descr=<Guard0x7fb62011a1e0>) jump(p0, p1, p8, i33, i20, descr=TargetToken(140420198777248)) 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 0x00007fd2700fdf30> 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 0x00007fd272c039f0> 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 0x00007fd2a2b77788> 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 0x00007fd2b5915a28> 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 0x00007fd2b5c3a100> 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 0x00007fd2a2a8acd0> 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=<Guard0x7fa0b01d3240>) i52 = int_lt(i44, 300) guard_true(i52, descr=<Guard0x7fa0b0203980>) p53 = force_token() p56 = force_token() i60 = int_add(i44, 1) i64 = getfield_raw_i(4533423520, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x7fa0b02039f0>) jump(p0, p1, p8, i60, p12, p20, p31, descr=TargetToken(140328126368480)) 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 0x00007fd2b5dce448> 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 0x00007fd2a32e9b08> 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=<Guard0x7faf581d3380>) i56 = int_lt(i48, 300) guard_true(i56, descr=<Guard0x7faf58208678>) p57 = force_token() p60 = force_token() p61 = force_token() i65 = int_add(i48, 1) i69 = getfield_raw_i(4610866592, 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=<Guard0x7faf581d33d0>) jump(p0, p1, p8, i65, p20, p30, descr=TargetToken(140391074462048)) 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 0x00007fd29006a288> 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 0x00007fd2b45686b0> 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=<Guard0x7fa158788598>) ===== 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(4594531744, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x7fa158788608>) 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 0x00007fd2904c52f0> 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 0x00007fd2b32435c8> 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=<Guard0x7fd300639ad0>) ===== 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(4533050784, 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=<Guard0x7fd30060b510>) 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 0x00007fd2a245fb40> 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 0x00007fd2a272a138> 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=<Guard0x7fe8e877b3d0>) i77 = int_lt(i71, 2000) guard_true(i77, descr=<Guard0x7fe8e87ffef8>) 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, -1271933711622043447, 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=<Guard0x7fe8e877b420>) i90 = int_lt(i86, 0) guard_false(i90, descr=<Guard0x7fe8e87fff68>) p91 = getinteriorfield_gc_r(p57, i86, descr=<InteriorFieldDescr <FieldP odictentry.value 8>>) guard_value(p91, ConstPtr(ptr92), descr=<Guard0x7fe8e877b470>) p94 = force_token() i98 = int_add_ovf(i69, i71) guard_no_overflow(descr=<Guard0x7fe8e87fffa0>) i100 = int_add(i71, 1) i102 = getfield_raw_i(4573568416, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i104 = int_lt(i102, 0) guard_false(i104, descr=<Guard0x7fe8e880c058>) jump(p0, p1, p8, i98, i100, p33, p46, p34, p57, descr=TargetToken(140638309861536)) 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 0x00007fd2a26f74e8> 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 0x00007fd29065d328> 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=<Guard0x7fe9e01d5100>) i44 = int_lt(i39, i26) guard_true(i44, descr=<Guard0x7fe9e01eb750>) i46 = int_add_ovf(i33, 1) guard_no_overflow(descr=<Guard0x7fe9e01eb788>) i48 = int_add_ovf(i37, 1) guard_no_overflow(descr=<Guard0x7fe9e01eb7c0>) i50 = int_add(i39, 1) i52 = getfield_raw_i(4542524832, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x7fe9e01eb830>) jump(p0, p1, p8, i48, i46, i50, p20, i26, descr=TargetToken(140642464190560)) 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 0x00007fd2b535d360> 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 0x00007fd290bc1b40> 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=<Guard0x7fece81d70b0>) i34 = int_lt(i28, 300) guard_true(i34, descr=<Guard0x7fece81eb018>) i36 = int_sub_ovf(i28, 10) guard_no_overflow(descr=<Guard0x7fece81eb050>) i38 = int_add_ovf(i26, 1) guard_no_overflow(descr=<Guard0x7fece81eb088>) i40 = int_add(i28, 1) i42 = getfield_raw_i(4540009888, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x7fece81eb0f8>) jump(p0, p1, i38, i40, descr=TargetToken(140655483310880)) 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 0x00007fd2908ef408> 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 0x00007fd2b58906b0> 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=<Guard0x7f7dc01d5060>) i48 = int_lt(i43, i26) guard_true(i48, descr=<Guard0x7f7dc01f1210>) i50 = int_add_ovf(i43, 5) guard_no_overflow(descr=<Guard0x7f7dc01f1248>) i52 = int_add_ovf(i35, 1) guard_no_overflow(descr=<Guard0x7f7dc01f1280>) i54 = int_add(i43, -1) i56 = int_add_ovf(i41, 1) guard_no_overflow(descr=<Guard0x7f7dc01f12b8>) i58 = int_add(i43, 1) i60 = getfield_raw_i(4537253280, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x7f7dc01f1328>) jump(p0, p1, p8, i56, i52, i58, p20, i26, descr=TargetToken(140178070868384)) 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 0x00007fd2b622ab48> 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 0x00007fd2a2d123d8> 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=<Guard0x7fe48068d010>) i48 = int_lt(i42, 300) guard_true(i48, descr=<Guard0x7fe4806a90f8>) i50 = int_add(i42, 5) i52 = int_add_ovf(i34, 1) guard_no_overflow(descr=<Guard0x7fe4806a9130>) i54 = int_lshift(i42, 1) i56 = int_add_ovf(i40, 1) guard_no_overflow(descr=<Guard0x7fe4806a9168>) i58 = int_add(i42, 1) i60 = getfield_raw_i(4571061664, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x7fe4806a91d8>) jump(p0, p1, p8, i56, i52, i58, p20, descr=TargetToken(140619383705696)) 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 0x00007fd2b66882c0> 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 0x00007fd2b72658d8> 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=<Guard0x7f7e4868b1f0>) i44 = int_lt(i38, 300) guard_true(i44, descr=<Guard0x7f7e4869f360>) i46 = int_eq(i38, 10) guard_false(i46, descr=<Guard0x7f7e4869f3d0>) i48 = int_add_ovf(i36, 1) guard_no_overflow(descr=<Guard0x7f7e4869f408>) i50 = int_add(i38, 1) i52 = getfield_raw_i(4607180192, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x7f7e4869f478>) jump(p0, p1, p8, p10, i48, i50, p20, descr=TargetToken(140180357502496)) 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 0x00007fd2b52b2c28> 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 0x00007fd2b606f9f0> 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=<Guard0x7fb91074b150>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x7fb9107632b8>) i40 = int_lshift(i32, 1) i42 = int_add_ovf(i30, 1) guard_no_overflow(descr=<Guard0x7fb9107632f0>) i44 = int_add(i32, 1) i46 = getfield_raw_i(4598115744, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x7fb910763360>) jump(p0, p1, p8, i42, i44, descr=TargetToken(140432821835232)) 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 0x00007fd2b5ce8f00> 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 0x00007fd2a3b361e0> 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=<Guard0x7fb6181d51a0>) i40 = int_lt(i34, 300) guard_true(i40, descr=<Guard0x7fb6181e7280>) i42 = int_add_ovf(i32, 8) guard_no_overflow(descr=<Guard0x7fb6181e72b8>) i44 = int_add(i34, 1) i46 = getfield_raw_i(4573191584, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x7fb6181e7328>) jump(p0, p1, p8, i42, i44, descr=TargetToken(140420065416416)) 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 0x00007fd2b6fbe8a8> 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 0x00007fd2729783a0> 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=<Guard0x7f82d0095f60>) 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=<Guard0x7f82d00fb5c8>) i57 = getfield_raw_i(4604738976, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x7f82d00fb638>) 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 0x00007fd27294d670> 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 0x00007fd2a2babe50> 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=<Guard0x7f97f074d100>) i55 = int_lt(i50, i30) guard_true(i55, descr=<Guard0x7f97f0767a98>) f56 = cast_int_to_float(i50) i58 = float_le(f56, 0.000000) guard_false(i58, descr=<Guard0x7f97f0767b08>) 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(4572548512, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x7f97f074d150>) jump(p0, p1, p8, p10, i66, f64, i30, descr=TargetToken(140290551060448)) 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 0x00007fd2a40d6950> 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 0x00007fd2b61c63a0> 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=<Guard0x7f9790105060>) i56 = int_lt(i51, i30) guard_true(i56, descr=<Guard0x7f9790121670>) f57 = cast_int_to_float(i51) f59 = float_add(f57, 11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576.000000) i60 = float_eq(f59, f57) guard_false(i60, descr=<Guard0x7f97901216e0>) 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(4565945760, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x7f97901050b0>) jump(p0, p1, p8, p10, i68, f66, i30, descr=TargetToken(140288933860576)) 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 0x00007fd270d9b248> 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 0x00007fd2b72ba020> 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 0x00007fd27009efa8> 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 0x00007fd2a260fb08> 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=<Guard0x7f9a48107010>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x7f9a48122f70>) i40 = int_add_ovf(i30, 3000) guard_no_overflow(descr=<Guard0x7f9a48122fa8>) i42 = int_add(i32, 1) i44 = getfield_raw_i(4536147360, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x7f9a48123018>) jump(p0, p1, i42, i40, descr=TargetToken(140300610800864)) 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 0x00007fd2b5221478> 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 0x00007fd2732d7718> 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=<Guard0x7fcba01d31f0>) i38 = int_le(i29, i26) guard_true(i38, descr=<Guard0x7fcba01eb1d8>) i40 = int_add_ovf(i29, 1) guard_no_overflow(descr=<Guard0x7fcba01eb210>) i41 = int_and(i26, i40) i42 = int_add_ovf(i33, i41) guard_no_overflow(descr=<Guard0x7fcba01eb248>) i44 = getfield_raw_i(4561972640, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x7fcba01eb2b8>) jump(p0, p1, p8, p10, i42, i40, i26, descr=TargetToken(140512541430496)) 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 0x00007fd27043ef00> 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 0x00007fd273006e20> 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=<Guard0x7fd77139bb00>) i31 = int_gt(i25, 1) guard_true(i31, descr=<Guard0x7fd7713ac100>) i32 = int_mul_ovf(i23, i25) guard_no_overflow(descr=<Guard0x7fd7713ac138>) i34 = int_add(i25, -1) i36 = getfield_raw_i(4576337312, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x7fd7713ac1a8>) jump(p0, p1, i34, i32, descr=TargetToken(140563294342304)) 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 0x00007fd2714226b0> 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 0x00007fd2a0c78288> 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=<Guard0x7fc6306107a0>) i39 = float_lt(f34, f29) guard_true(i39, descr=<Guard0x7fc63061e480>) f40 = float_add(f33, f34) i42 = getfield_raw_i(4527689120, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x7fc63061e410>) jump(p0, p1, p8, f40, p12, f29, f33, descr=TargetToken(140489191965088)) 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 0x00007fd2a35a46e8> 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 0x00007fd2b5f78988> 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=<Guard0x7fe2f00e5290>) i57 = int_is_true(i51) guard_true(i57, descr=<Guard0x7fe2f00ff4b0>) guard_nonnull_class(p56, ConstClass(W_IntObject), descr=<Guard0x7fe2f00e52e0>) 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=<Guard0x7fe2f00ff4e8>) i62 = int_add_ovf(i49, i61) guard_no_overflow(descr=<Guard0x7fe2f00ff520>) i63 = int_add_ovf(i62, i38) guard_no_overflow(descr=<Guard0x7fe2f00ff558>) setfield_gc(p14, p56, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value1 16>) i65 = int_sub_ovf(i51, 1) guard_no_overflow(descr=<Guard0x7fe2f00e5330>) i68 = getfield_raw_i(4576128416, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x7fe2f00ff5c8>) jump(p0, p1, i65, p10, p12, p14, i63, p24, p56, p56, i61, descr=TargetToken(140612666880480)) 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 0x00007fd2b6d5ab80> 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 0x00007fd2b5ed9130> 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=<Guard0x7fd650723060>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x7fd650750480>) 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=<Guard0x7fd6507230b0>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x7fd650750528>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x7fd650750598>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x7fd6507505d0>) i90 = getfield_raw_i(4598558112, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x7fd650750640>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(140558449497312)) 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 0x00007fd2b5c06758> 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 0x00007fd2a0f56ad8> 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=<Guard0x7f8b581d5010>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x7f8b58200448>) 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=<Guard0x7f8b581d5060>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x7f8b582004f0>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x7f8b58200560>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x7f8b58200598>) i90 = getfield_raw_i(4529356192, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x7f8b58200608>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(140236455597280)) 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 0x00007fd2b4b4e218> 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 0x00007fd2a1c436e0> 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=<Guard0x7ff66874b1f0>) i47 = int_lt(i41, 300) guard_true(i47, descr=<Guard0x7ff668767440>) i48 = int_add_ovf(i39, i37) guard_no_overflow(descr=<Guard0x7ff668767478>) i50 = int_add(i41, 1) i52 = getfield_raw_i(4533775776, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x7ff6687674e8>) jump(p0, p1, p8, p10, i50, i48, i28, i32, i37, descr=TargetToken(140696291250720)) 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 0x00007fd2b5656250> @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 0x00007fd2a2b03788> 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=<Guard0x7fe5e81d7240>) i70 = int_lt(i68, i28) guard_true(i70, descr=<Guard0x7fe5e81eff30>) 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=<Guard0x7fe5e81d7290>) i79 = getfield_raw_i(4560907680, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i81 = int_lt(i79, 0) guard_false(i81, descr=<Guard0x7fe5e81fe090>) 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(140625418633568)) 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 0x00007fd2a259f7c0> 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 0x00007fd2b50a93d0> 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=<Guard0x7f78801d5380>) i44 = int_lt(i33, i24) guard_true(i44, descr=<Guard0x7f78801fc250>) i46 = int_lt(i33, 256) guard_true(i46, descr=<Guard0x7f78801fc2c0>) i48 = int_add(i33, 1) i50 = getfield_raw_i(4607540640, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i52 = int_lt(i50, 0) guard_false(i52, descr=<Guard0x7f78801fc330>) 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(140155522273120)) 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 0x00007fd2b59f26b0> 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 0x00007fd290f8e598> 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=<Guard0x7f7e802096a0>) i75 = int_lt(i70, i34) guard_true(i75, descr=<Guard0x7f7e80225788>) 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=<Guard0x7f7e802096f0>) 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=<Guard0x7f7e80209740>) i91 = int_ge(i88, 0) guard_true(i91, descr=<Guard0x7f7e80225830>) i92 = int_ge(i79, i38) guard_false(i92, descr=<Guard0x7f7e802258a0>) i94 = int_add(i79, 1) i95 = int_gt(i94, i61) guard_false(i95, descr=<Guard0x7f7e80225910>) 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=<Guard0x7f7e80209790>) i99 = int_add(i70, 1) i101 = getfield_raw_i(4575706528, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i103 = int_lt(i101, 0) guard_false(i103, descr=<Guard0x7f7e802259b8>) jump(p0, p1, p8, i99, p12, p14, p83, i34, i38, i47, p46, i61, p60, descr=TargetToken(140181292235424)) 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 0x00007fd29094fc90> 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 0x00007fd2b55faad8> 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=<Guard0x7fbd50693e70>) i63 = int_lt(i58, i30) guard_true(i63, descr=<Guard0x7fbd506b8058>) 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=<Guard0x7fbd50693ec0>) i89 = int_add_ovf(i58, i88) guard_no_overflow(descr=<Guard0x7fbd506b8090>) i91 = getfield_raw_i(4539256224, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x7fbd506b8100>) jump(p0, p1, p8, i89, i30, descr=TargetToken(140451074634464)) 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 0x00007fd2b6c3ca68> 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 0x00007fd2b76214e8> 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=<Guard0x7f8a8874f0b0>) i65 = int_gt(i59, 0) guard_true(i65, descr=<Guard0x7f8a8876b868>) p67 = call_r(ConstClass(ll_int2dec__Signed), i59, descr=<Callr 8 i EF=3>) guard_no_exception(descr=<Guard0x7f8a8874f100>) 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=<Guard0x7f8a8874f150>) 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=<Guard0x7f8a8874f1a0>) 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=<Guard0x7f8a8874f1f0>) p87 = call_r(ConstClass(ll_build_trampoline__v1817___simple_call__function_), p69, descr=<Callr 8 r EF=5>) guard_no_exception(descr=<Guard0x7f8a8874f240>) i91 = call_i(ConstClass(codepoints_in_utf8), p87, 0, 9223372036854775807, descr=<Calli 8 rii EF=4>) guard_no_exception(descr=<Guard0x7f8a8874f290>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x7f8a8876b8d8>) i94 = int_add_ovf(i57, i91) guard_no_overflow(descr=<Guard0x7f8a8876b910>) i96 = int_add(i59, -1) i98 = getfield_raw_i(4569230752, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i100 = int_lt(i98, 0) guard_false(i100, descr=<Guard0x7f8a8876b980>) jump(p0, p1, i96, i94, descr=TargetToken(140232971652896)) 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 0x00007fd270871248> 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 0x00007fd2a38206b0> 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=<Guard0x7fbb301d6750>) i32 = int_lt(i31, i23) guard_true(i32, descr=<Guard0x7fbb301ea0c8>) i34 = int_add(i31, 1) i36 = getfield_raw_i(4576746912, 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=<Guard0x7fbb301d6700>) jump(p0, p1, p8, i31, p12, i34, i23, descr=TargetToken(140441942785888)) 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 0x00007fd270dcc3a0> 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 0x00007fd272511948> 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=<Guard0x7ff6c01d6f70>) i47 = int_lt(i46, i23) guard_true(i47, descr=<Guard0x7ff6c01ef520>) 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=<Guard0x7ff6c01d6fc0>) i55 = int_eq(i51, 1) guard_false(i55, descr=<Guard0x7ff6c01ef5c8>) p58 = call_r(ConstClass(ll_char_mul__Char_Signed), 120, i51, descr=<Callr 8 ii EF=3>) guard_no_exception(descr=<Guard0x7ff6c01d7010>) i60 = call_i(ConstClass(first_non_ascii_char), p58, descr=<Calli 8 r EF=4>) guard_no_exception(descr=<Guard0x7ff6c01d7060>) i62 = int_lt(i60, 0) guard_true(i62, descr=<Guard0x7ff6c01ef638>) i63 = strlen(p58) i65 = getfield_raw_i(4608970144, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i67 = int_lt(i65, 0) guard_false(i67, descr=<Guard0x7ff6c01ef6a8>) jump(p0, p1, p8, i46, p12, i49, i23, descr=TargetToken(140697761909152)) 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 0x00007fd2a2e238a0> 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 0x00007fd2b7e36b48> 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=<Guard0x7f8f681efde0>) i77 = int_ge(0, i72) guard_false(i77, descr=<Guard0x7f8f681efe50>) 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=<Guard0x7f8f681d5100>) i83 = int_ge(1, i72) guard_false(i83, descr=<Guard0x7f8f681efef8>) 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=<Guard0x7f8f681d5150>) 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 0x00007fd2b75e30f8> 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 0x00007fd2b5ca0fe0> 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=<Guard0x7fcc40200d78>) i70 = int_le(i61, 2147483647) guard_true(i70, descr=<Guard0x7fcc40200de8>) 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 0x00007fd2b7f28288> 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 0x00007fd2b7f79590> 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=<Guard0x7fcbe068dd80>) i90 = int_le(i74, 2147483647) guard_true(i90, descr=<Guard0x7fcbe06bb0f8>) 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 0x00007fd2720da3d8> 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 0x00007fd27234e800> 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 0x00007fd2a37c8800> 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 0x00007fd2709c1ad0> 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 0x00007fd2b1608090> 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 0x00007fd2b5c3a1a8> 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=<Guard0x7fefa860dec0>) 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 0x00007fd2b67027c8> 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 0x00007fd2a139cb80> 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=<Guard0x7fd89074bec0>) i89 = int_le(i70, 32767) guard_true(i89, descr=<Guard0x7fd890778e20>) 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=<Guard0x7fd89074bf10>) 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 0x00007fd2b28ca870> 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 0x00007fd290144528> 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=<Guard0x7f8c6068a390>) i34 = int_lt(i26, i23) guard_true(i34, descr=<Guard0x7f8c606895c8>) i36 = int_add(i26, 1) i38 = getfield_raw_i(4572626336, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i40 = int_add(i38, -1) setfield_raw(4572626336, i40, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i40, 0) guard_false(i43, descr=<Guard0x7f8c6068a340>) jump(p0, p1, i36, p10, p12, p20, i23, descr=TargetToken(140240889575968)) 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 0x00007fd290413a60> 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 0x00007fd2b4cf7018> 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=<Guard0x7f9c301d3470>) i54 = int_lt(i49, i28) guard_true(i54, descr=<Guard0x7f9c301e76a8>) i55 = int_add_ovf(i49, i48) guard_no_overflow(descr=<Guard0x7f9c301e76e0>) i57 = getfield_raw_i(4598070688, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x7f9c301e7750>) i60 = arraylen_gc(p44, descr=<ArrayP 8>) jump(p0, p1, p8, p10, p12, i55, p20, p22, i28, p36, p40, p44, p46, i48, descr=TargetToken(140308798904736)) 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 0x00007fd29051e8a8> 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 0x00007fd290836918> 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=<Guard0x7ff7a04a3470>) i50 = int_gt(i40, 0) guard_true(i50, descr=<Guard0x7ff7a04a87c8>) 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=<Guard0x7ff7a0478b78>) guard_no_exception(descr=<Guard0x7ff7a04a8800>) i56 = int_eq(i54, 1) guard_true(i56, descr=<Guard0x7ff7a04a8870>) guard_not_invalidated(descr=<Guard0x7ff7a04a88a8>) 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=<Guard0x7ff7a04a34c0>) i64 = getfield_raw_i(4599582112, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x7ff7a04a8950>) jump(p0, p1, i58, p10, p12, p22, p24, p32, i41, descr=TargetToken(140701522880544)) 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 0x00007fd2b58cde50> 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 0x00007fd290de2fe0> 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=<Guard0x7fbcd0212110>) 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=<Guard0x7fbcd0203d70>) 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=<Guard0x7fbcd0212160>) p52 = getfield_gc_r(p10, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull(p52, descr=<Guard0x7fbcd0203de0>) 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=<Guard0x7fbcd01d6de0>) guard_no_exception(descr=<Guard0x7fbcd0203e18>) guard_nonnull_class(p57, 4517690872, descr=<Guard0x7fbcd02121b0>) guard_not_invalidated(descr=<Guard0x7fbcd0203e50>) i60 = getfield_raw_i(4531768736, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x7fbcd0203ec0>) jump(p0, p1, p8, p10, i45, p14, i27, descr=TargetToken(140448922388256)) 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, 956 passed, 163 skipped, 1 xfailed in 206.35 seconds ======== program finished with exit code 1 elapsedTime=207.326245