python testrunner/pypyjit_tests.py in dir d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build (timeout 4000 secs) watching logfiles {'pytestLog': 'pypyjit_new.log'} argv: ['python', 'testrunner/pypyjit_tests.py'] environment: ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\matti\AppData\Roaming ASL.LOG=Destination=file CHOCOLATEYINSTALL=C:\ProgramData\chocolatey CHOCOLATEYLASTPATHUPDATE=133185086718935289 CHOCOLATEYTOOLSLOCATION=C:\tools CLINK_DIR=C:\Program Files (x86)\clink\0.4.9 COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files COMMONPROGRAMW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-RYZEN COMSPEC=C:\WINDOWS\system32\cmd.exe CONDA_BAT=d:\miniconda\condabin\conda.bat CONDA_EXE=d:\miniconda\Scripts\conda.exe CONDA_SHLVL=0 CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7 DRIVERDATA=C:\Windows\System32\Drivers\DriverData LOCALAPPDATA=C:\Users\matti\AppData\Local NUMBER_OF_PROCESSORS=2 NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\ OS=Windows_NT PATH=d:\CPython27\lib\site-packages\pywin32_system32;d:\pypy_stuff\pypy\externals\bin;D:\CPython27;D:\pypy_stuff\pypy2.7-v7.3.18\Scripts;D:\pypy_stuff\pypy2.7-v7.3.18;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseHg\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=AMD64 PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD PROCESSOR_LEVEL=23 PROCESSOR_REVISION=7100 PROGRAMDATA=C:\ProgramData PROGRAMFILES=C:\Program Files (x86) PROGRAMFILES(X86)=C:\Program Files (x86) PROGRAMW6432=C:\Program Files PROMPT=$P$G PSMODULEPATH=%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public PWD=d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build PYPY_ENABLE_WINCONSOLEIO=1 PYTEST_XDIST_AUTO_NUM_WORKERS=4 RTOOLS40_HOME=C:\rtools40 RTOOLS43_HOME=C:\rtools43 RTOOLS44_HOME=C:\rtools44 SYSTEMDRIVE=C: SYSTEMROOT=C:\WINDOWS TEMP=D:\SystemTemp TMP=D:\SystemTemp TMPDIR=d:\systemtemp\pytest USERDOMAIN=DESKTOP-RYZEN USERNAME=matti USERPROFILE=C:\Users\matti VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\ WINDIR=C:\WINDOWS using PTY: False D:\pypy_stuff\pypy2.7-v7.3.18\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 win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1 pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\pytest.pyc rootdir: d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-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.ss..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 0x000001bd1d1e89f8> 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 0x000001bd1d553328> 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 0x000001bd1d90da28> 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 0x000001bd1dc5afa8> 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 0x000001bd1dd0e598> 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=<Guard0x1d3d4f46068>) i26 = int_lt(i20, 1003) guard_true(i26, descr=<Guard0x1d3d4f3f640>) i28 = int_add(i20, 1) i30 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i32 = int_lt(i30, 0) guard_false(i32, descr=<Guard0x1d3d4f3f6a0>) jump(p0, p1, i28, descr=TargetToken(2009322321504)) 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 0x000001bd1eb10678> 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 0x000001bd1ec19ec0> 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=<Guard0x14f269ac068>) i38 = int_lt(i33, i30) guard_true(i38, descr=<Guard0x14f2699f9a0>) i40 = int_add(i33, 1) i42 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x14f2699fa00>) jump(p0, p1, p8, i40, i30, descr=TargetToken(1439461504608)) 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 0x000001bd1c9224b8> 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 0x000001bd1cea5328> 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=<Guard0x24d99fae0f8>) i67 = int_lt(i61, 307200) guard_true(i67, descr=<Guard0x24d99fac860>) 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=<Guard0x24d99fac8c0>) setarrayitem_raw(i54, i61, i75, descr=<ArrayS 4>) i78 = int_add(i61, 1) i80 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i82 = int_lt(i80, 0) guard_false(i82, descr=<Guard0x24d99fae140>) jump(p0, p1, p8, p10, p12, i78, i69, p24, i46, i54, descr=TargetToken(2532318869216)) 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 0x000001bd1efaf408> 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 0x000001bd1dbf5e50> 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=<Guard0x1c1db84bbf8>) i76 = instance_ptr_eq(ConstPtr(ptr75), p73) guard_false(i76, descr=<Guard0x1c1dba5b5e0>) 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=<Guard0x1c1dba5b640>) i84 = int_gt(9223372036854775807, i80) guard_true(i84, descr=<Guard0x1c1dba5b6a0>) guard_not_invalidated(descr=<Guard0x1c1dba5b760>) i99 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i101 = int_lt(i99, 0) guard_false(i101, descr=<Guard0x1c1dba5b7c0>) 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 0x000001bd2255c2f8> 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 0x000001bd1cac28e0> 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(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x1aa9653ffa0>) 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 0x000001bd1e33edb0> 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 0x000001bd1d70ce90> 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 0x000001bd20484f70> 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 0x000001bd20891088> 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=<Guard0x2a71ac120b0>) i60 = int_lt(i47, i30) guard_true(i60, descr=<Guard0x2a71ac08ec0>) p61 = force_token() i65 = int_add_ovf(i59, 1) guard_no_overflow(descr=<Guard0x2a71ac08ef0>) p67 = force_token() i72 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x2a71ac08f50>) jump(p0, p1, p8, i59, p12, i65, p16, p24, i30, p37, i65, descr=TargetToken(2916731418272)) 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 0x000001bd1e623c58> 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 0x000001bd1f849f68> 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 0x000001bd2309a870> 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=<Guard0x2968990c068>) i36 = int_lt(i29, i26) guard_true(i36, descr=<Guard0x296898ffd60>) i38 = int_add(i29, 1) i40 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i42 = int_lt(i40, 0) guard_false(i42, descr=<Guard0x296898ffdc0>) jump(p0, p1, p8, i38, i26, descr=TargetToken(2845576099424)) 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 0x000001bd22a01ad0> 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 0x000001bd239ac330> 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=<Guard0x184e2f7df58>) ===== HERE ===== guard_value(p3, ConstPtr(ptr14), descr=<Guard0x184e2fdfdc0>) guard_not_invalidated(descr=<Guard0x184e2fdfdf0>) guard_isnull(p5, descr=<Guard0x184e2fdfe50>) guard_nonnull_class(p8, ConstClass(W_IntObject), descr=<Guard0x184e2f7dfa0>) 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=<Guard0x184e2fdfeb0>) 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=<Guard0x184e2fea020>) i26 = getfield_gc_i(p21, descr=<FieldU pypy.interpreter.executioncontext.ExecutionContext.inst_profilefunc 186 pure>) i27 = int_is_zero(i26) guard_true(i27, descr=<Guard0x184e2fdff10>) i31 = int_add(i16, 5) i34 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i36 = int_lt(i34, 0) guard_false(i36, descr=<Guard0x184e2fdff70>) 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 0x000001bd23c4cfe0> 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 0x000001bd23c9b868> 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=<Guard0x21442c1c0f8>) 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=<Guard0x21442c1a500>) p47 = force_token() i51 = int_add(i44, 1) i54 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i56 = int_lt(i54, 0) guard_false(i56, descr=<Guard0x21442c1a560>) 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(2286042379936)) 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 0x000001bd2412e330> 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 0x000001bd2414e2f8> 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=<Guard0x1846523e0b0>) i54 = int_lt(i48, i24) guard_true(i54, descr=<Guard0x1846523a5f0>) p55 = force_token() i59 = int_add(i48, 1) i62 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i64 = int_lt(i62, 0) guard_false(i64, descr=<Guard0x1846523a650>) jump(p0, p1, p8, p10, i59, i24, p38, descr=TargetToken(1668143937312)) 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 0x000001bd244b36a8> 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 0x000001bd2450cc60> 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=<Guard0x1e5333c8338>) i55 = int_lt(i50, i26) guard_true(i55, descr=<Guard0x1e5333d1b50>) p56 = force_token() p59 = force_token() i63 = int_sub_ovf(1, i46) guard_no_overflow(descr=<Guard0x1e5333d1b80>) i64 = int_add_ovf(i63, i50) guard_no_overflow(descr=<Guard0x1e5333d1bb0>) i68 = int_add(i50, 1) i70 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x1e5333d1c10>) jump(p0, p1, p8, i64, i68, i26, p31, descr=TargetToken(2083918770976)) 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 0x000001bd248b64b8> 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 0x000001bd24ecfd38> 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 0x000001bd24fa6fa8> 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=<Guard0x1e1041ae0b0>) 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 0x000001bd256cb788> 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 0x000001bd256f4fa8> 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=<Guard0x1d53eade020>) i40 = int_is_true(i35) guard_true(i40, descr=<Guard0x1d53eadc170>) i42 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x1d53eadc1d0>) i46 = int_sub_ovf(i35, 1) guard_no_overflow(descr=<Guard0x1d53eadc200>) i48 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i50 = int_lt(i48, 0) guard_false(i50, descr=<Guard0x1d53eadc260>) jump(p0, p1, i46, p16, p32, descr=TargetToken(2015391020704)) 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 0x000001bd231bc410> 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 0x000001bd21e1bbb0> 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=<Guard0x2c01ee60068>) i44 = int_lt(i39, i24) guard_true(i44, descr=<Guard0x2c01ee5e500>) i46 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x2c01ee5e560>) i50 = int_add(i39, 1) i52 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x2c01ee5e5c0>) jump(p0, p1, p8, i50, i24, p36, descr=TargetToken(3024175134304)) 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 0x000001bd1cf23910> 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 0x000001bd21707b08> 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=<Guard0x29a1c0fa068>) i32 = int_lt(i27, i24) guard_true(i32, descr=<Guard0x29a1c0ef730>) i34 = int_add(i27, 1) i36 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x29a1c0ef790>) jump(p0, p1, p8, i34, p16, p18, i24, descr=TargetToken(2860918797920)) 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 0x000001bd1f996de8> 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 0x000001bd1cce9a28> 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=<Guard0x177134bb3d0>) 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=<Guard0x1771357f490>) 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=<Guard0x177134bb418>) 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=<Guard0x177134bb460>) p120 = getfield_gc_r(p118, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p120, ConstPtr(ptr121), descr=<Guard0x177134bb4a8>) p123 = getfield_gc_r(p14, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull_class(p123, 140729686951680, descr=<Guard0x177134bb4f0>) p125 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_userclass 32 pure>) guard_isnull(p125, descr=<Guard0x1771357f4f0>) p126 = getfield_gc_r(p123, descr=<FieldP pypy.interpreter.module.Module.inst_w_dict 16 pure>) guard_value(p126, ConstPtr(ptr127), descr=<Guard0x177134bb538>) p128 = getfield_gc_r(p126, descr=<FieldP pypy.objspace.std.dictmultiobject.W_ModuleDictObject.inst_mstrategy 16 pure>) guard_value(p128, ConstPtr(ptr129), descr=<Guard0x177134bb580>) p131 = call_r(ConstClass(_ll_0_alloc_with_del___), descr=<Callr 8 EF=5>) guard_no_exception(descr=<Guard0x177134bb5c8>) 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=<Guard0x177135485c0>) guard_no_exception(descr=<Guard0x1771357f520>) i144 = int_signext(i104, 2) i145 = int_ne(i104, i144) guard_false(i145, descr=<Guard0x1771357f580>) 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(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i158 = int_add(i156, -14) setfield_raw(140729701711872, 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=<Guard0x177134bb610>) jump(p0, p1, p8, p10, p12, p14, i104, p18, i35, p44, p45, descr=TargetToken(1610937278496)) 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 0x000001bd1ea54758> 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 0x000001bd220691d8> 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=<Guard0x2b0d39c0260>) cond_call(i25, 140729678585616, p20, descr=<Callv 0 r EF=2 OS=121>) p97 = force_token() p124 = new_with_vtable(descr=<SizeDescr 16>) i125 = arraylen_gc(p48, descr=<ArrayP 8>) setfield_gc(p124, i114, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) setarrayitem_gc(p48, 0, p124, descr=<ArrayP 8>) jump(p0, p1, p124, p10, p12, p20, i25, p32, p48, p34, p33, p35, p36, p67, i108, i70, descr=TargetToken(2958487484064)) 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 0x000001bd208a4ec8> 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 0x000001bd20445050> 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=<Guard0x1ad1789e2a8>) cond_call(i25, 140729678585616, p20, descr=<Callv 0 r EF=2 OS=121>) p97 = force_token() p124 = new_with_vtable(descr=<SizeDescr 16>) i125 = arraylen_gc(p48, descr=<ArrayP 8>) setfield_gc(p124, i114, descr=<FieldS pypy.objspace.std.intobject.W_IntObject.inst_intval 8 pure>) setarrayitem_gc(p48, 0, p124, descr=<ArrayP 8>) jump(p0, p1, p124, p10, p12, p20, i25, p32, p48, p34, p33, p35, p36, p67, i108, i70, descr=TargetToken(1842935658080)) 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 0x000001bd2152b130> 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 0x000001bd21504608> 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=<Guard0x1bc5d37a218>) i47 = int_lt(i42, i24) guard_true(i47, descr=<Guard0x1bc5d36fe50>) i49 = int_add(i42, 1) i51 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i53 = int_lt(i51, 0) guard_false(i53, descr=<Guard0x1bc5d36feb0>) jump(p0, p1, p8, p10, i49, i24, p34, descr=TargetToken(1908529198688)) 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 0x000001bd1db6e6b0> 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 0x000001bd207d4db0> 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 0x000001bd24763b08> 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 0x000001bd24725558> 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 0x000001bd1d31d360> 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 0x000001bd20abdb78> 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 0x000001bd23084528> 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 0x000001bd23039398> 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=<Guard0x1e4e628d0b8>) i37 = int_lt(i32, i28) guard_true(i37, descr=<Guard0x1e4e62bb7c0>) i39 = int_add_ovf(i32, 2) guard_no_overflow(descr=<Guard0x1e4e62bb7f0>) i41 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i41, 0) guard_false(i43, descr=<Guard0x1e4e62bb850>) jump(p0, p1, p8, i39, p22, i28, descr=TargetToken(2082625825440)) 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 0x000001bd1f2fbd00> 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 0x000001bd1ed8ea68> 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=<Guard0x1fa6f38a068>) i31 = int_lt(i26, i20) guard_true(i31, descr=<Guard0x1fa6f37f850>) i33 = int_add(i26, 1) i35 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i37 = int_lt(i35, 0) guard_false(i37, descr=<Guard0x1fa6f37f8b0>) jump(p0, p1, p8, i33, i20, descr=TargetToken(2175119226528)) 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 0x000001bd1b30be88> 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 0x000001bd19a7ea68> 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 0x000001bd256f47c8> 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 0x000001bd2545d210> 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 0x000001bd1b70ed78> def test_super(self): def main(): class A(object): def m(self, x): return x + 1 class B(A): def m(self, x): return super(B, self).m(x) i = 0 while i < 300: i = B().m(i) return i log = self.run(main, []) loop, = log.loops_by_filename(self.filepath) > assert loop.match(""" i78 = int_lt(i72, 300) guard_true(i78, descr=...) guard_not_invalidated(descr=...) i79 = force_token() i80 = force_token() i81 = int_add(i72, 1) --TICK-- jump(..., descr=...) """) pypy\module\pypyjit\test_pypy_c\test_instance.py:247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pypy\module\pypyjit\test_pypy_c\model.py:177: in match return matcher.match(expected_src, **kwds) pypy\module\pypyjit\test_pypy_c\model.py:524: in match self.match_loop(expected_ops, ignore_ops) pypy\module\pypyjit\test_pypy_c\model.py:500: in match_loop self.match_op(op, exp_op) pypy\module\pypyjit\test_pypy_c\model.py:409: in match_op self._assert(op.name == exp_opname, "operation mismatch") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000001bd201b6870> cond = False, message = 'operation mismatch' def _assert(self, cond, message): if not cond: > raise InvalidMatch(message, frame=sys._getframe(1)) E InvalidMatch: operation mismatch pypy\module\pypyjit\test_pypy_c\model.py:402: InvalidMatch ---------------------------- Captured stdout call ----------------------------- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Loops don't match ================= loop id = None ('operation mismatch',) <could not determine information> Ignore ops: [] Got: ===== HERE ===== guard_not_invalidated(descr=<Guard0x15e43e820b0>) i52 = int_lt(i44, 300) guard_true(i52, descr=<Guard0x15e43e79610>) p53 = force_token() p56 = force_token() i60 = int_add(i44, 1) i64 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x15e43e79670>) jump(p0, p1, p8, i60, p12, p20, p31, descr=TargetToken(1504377599584)) Expected: i78 = int_lt(i72, 300) guard_true(i78, descr=...) guard_not_invalidated(descr=...) i79 = force_token() i80 = force_token() i81 = int_add(i72, 1) guard_not_invalidated? ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>) ticker_cond0 = int_lt(ticker0, 0) guard_false(ticker_cond0, descr=...) jump(..., descr=...) _______________________ TestInstance.test_super_no_args _______________________ self = <pypy.module.pypyjit.test_pypy_c.test_instance.TestInstance object at 0x000001bd207467c8> 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 0x000001bd1e849398> 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=<Guard0x2190b08c458>) i56 = int_lt(i48, 300) guard_true(i56, descr=<Guard0x2190b087310>) p57 = force_token() p60 = force_token() p61 = force_token() i65 = int_add(i48, 1) i69 = getfield_raw_i(140729701711872, 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=<Guard0x2190b08c4a0>) jump(p0, p1, p8, i65, p20, p30, descr=TargetToken(2306582603616)) 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 0x000001bd25a01948> 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 0x000001bd1c081210> 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=<Guard0x17eec77bd90>) ===== 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(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i74 = int_lt(i72, 0) guard_false(i74, descr=<Guard0x17eec77bdf0>) 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 0x000001bd1ab5af00> 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 0x000001bd1a821f30> 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=<Guard0x1a521f85f40>) ===== 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(140729701711872, 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=<Guard0x1a521f72890>) 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 0x000001bd1c9e5be8> 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 0x000001bd1c2bad08> 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=<Guard0x249d793dbb0>) i77 = int_lt(i71, 2000) guard_true(i77, descr=<Guard0x249d799cbc0>) 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__v1935___simple_call__function_), p46, p81, 6371919833891935375, 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=<Guard0x249d793dbf8>) i90 = int_lt(i86, 0) guard_false(i90, descr=<Guard0x249d799cc20>) p91 = getinteriorfield_gc_r(p57, i86, descr=<InteriorFieldDescr <FieldP odictentry.value 8>>) guard_value(p91, ConstPtr(ptr92), descr=<Guard0x249d793dc40>) p94 = force_token() i98 = int_add_ovf(i69, i71) guard_no_overflow(descr=<Guard0x249d799cc50>) i100 = int_add(i71, 1) i102 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i104 = int_lt(i102, 0) guard_false(i104, descr=<Guard0x249d799ccb0>) jump(p0, p1, p8, i98, i100, p33, p46, p34, p57, descr=TargetToken(2516172733472)) 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 0x000001bd1f9508a8> 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 0x000001bd221b85d0> 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=<Guard0x1d4270aa0f8>) i44 = int_lt(i39, i26) guard_true(i44, descr=<Guard0x1d42709fac0>) i46 = int_add_ovf(i33, 1) guard_no_overflow(descr=<Guard0x1d42709faf0>) i48 = int_add_ovf(i37, 1) guard_no_overflow(descr=<Guard0x1d42709fb20>) i50 = int_add(i39, 1) i52 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x1d42709fb80>) jump(p0, p1, p8, i48, i46, i50, p20, i26, descr=TargetToken(2010699495008)) 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 0x000001bd1f085868> 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 0x000001bd25482d08> 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=<Guard0x15d5495a0b0>) i34 = int_lt(i28, 300) guard_true(i34, descr=<Guard0x15d5494f850>) i36 = int_sub_ovf(i28, 10) guard_no_overflow(descr=<Guard0x15d5494f880>) i38 = int_add_ovf(i26, 1) guard_no_overflow(descr=<Guard0x15d5494f8b0>) i40 = int_add(i28, 1) i42 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x15d5494f910>) jump(p0, p1, i38, i40, descr=TargetToken(1500362471008)) 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 0x000001bd1d760758> 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 0x000001bd1e699408> 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=<Guard0x24b71f5c0f8>) i48 = int_lt(i43, i26) guard_true(i48, descr=<Guard0x24b71f4fb20>) i50 = int_add_ovf(i43, 5) guard_no_overflow(descr=<Guard0x24b71f4fb50>) i52 = int_add_ovf(i35, 1) guard_no_overflow(descr=<Guard0x24b71f4fb80>) i54 = int_add(i43, -1) i56 = int_add_ovf(i41, 1) guard_no_overflow(descr=<Guard0x24b71f4fbb0>) i58 = int_add(i43, 1) i60 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x24b71f4fc10>) jump(p0, p1, p8, i56, i52, i58, p20, i26, descr=TargetToken(2523057518176)) 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 0x000001bd24abc020> 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 0x000001bd24b132f0> 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=<Guard0x28a097bc068>) i48 = int_lt(i42, 300) guard_true(i48, descr=<Guard0x28a097afac0>) i50 = int_add(i42, 5) i52 = int_add_ovf(i34, 1) guard_no_overflow(descr=<Guard0x28a097afaf0>) i54 = int_lshift(i42, 1) i56 = int_add_ovf(i40, 1) guard_no_overflow(descr=<Guard0x28a097afb20>) i58 = int_add(i42, 1) i60 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x28a097afb80>) jump(p0, p1, p8, i56, i52, i58, p20, descr=TargetToken(2791887631968)) 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 0x000001bd15d24f38> 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 0x000001bd204fdb78> 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=<Guard0x249151ca0b0>) i44 = int_lt(i38, 300) guard_true(i44, descr=<Guard0x249151bfa60>) i46 = int_eq(i38, 10) guard_false(i46, descr=<Guard0x249151bfac0>) i48 = int_add_ovf(i36, 1) guard_no_overflow(descr=<Guard0x249151bfaf0>) i50 = int_add(i38, 1) i52 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x249151bfb50>) jump(p0, p1, p8, p10, i48, i50, p20, descr=TargetToken(2512909858464)) 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 0x000001bd1d6cb2f0> 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 0x000001bd1d6a8918> 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=<Guard0x1f57671a068>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x1f57670f970>) i40 = int_lshift(i32, 1) i42 = int_add_ovf(i30, 1) guard_no_overflow(descr=<Guard0x1f57670f9a0>) i44 = int_add(i32, 1) i46 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x1f57670fa00>) jump(p0, p1, p8, i42, i44, descr=TargetToken(2153765566048)) 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 0x000001bd1b1712f0> 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 0x000001bd1a5c71d8> 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=<Guard0x2a0a34fa068>) i40 = int_lt(i34, 300) guard_true(i40, descr=<Guard0x2a0a34ef910>) i42 = int_add_ovf(i32, 8) guard_no_overflow(descr=<Guard0x2a0a34ef940>) i44 = int_add(i34, 1) i46 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i48 = int_lt(i46, 0) guard_false(i48, descr=<Guard0x2a0a34ef9a0>) jump(p0, p1, p8, i42, i44, descr=TargetToken(2888957720224)) 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 0x000001bd1a45ce90> 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 0x000001bd25767280> 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=<Guard0x1d59be0a068>) 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=<Guard0x1d59bdff9a0>) i57 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x1d59bdffa00>) 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 0x000001bd21f1edb0> 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 0x000001bd15fdf360> 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=<Guard0x1df1ac9e188>) i55 = int_lt(i50, i30) guard_true(i55, descr=<Guard0x1df1ac9c4a0>) f56 = cast_int_to_float(i50) i58 = float_le(f56, 0.000000) guard_false(i58, descr=<Guard0x1df1ac9c500>) f60 = call_f(ConstClass(ccall_log), f56, descr=<Callf 8 f EF=2>) f62 = call_f(ConstClass(ccall_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(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x1df1ac9e1d0>) jump(p0, p1, p8, p10, i66, f64, i30, descr=TargetToken(2057738548832)) 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 0x000001bd1b8f5ad0> 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 0x000001bd1b642250> 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=<Guard0x17afca1c188>) i56 = int_lt(i51, i30) guard_true(i56, descr=<Guard0x17afca1e1a0>) f57 = cast_int_to_float(i51) f59 = float_add(f57, 11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576.000000) i60 = float_eq(f59, f57) guard_false(i60, descr=<Guard0x17afca1e200>) f62 = call_f(ConstClass(ccall_sin), f57, descr=<Callf 8 f EF=2>) f64 = call_f(ConstClass(ccall_cos), f57, descr=<Callf 8 f EF=2>) f65 = float_sub(f62, f64) f66 = float_add(f49, f65) i68 = int_add(i51, 1) i70 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i72 = int_lt(i70, 0) guard_false(i72, descr=<Guard0x17afca1c1d0>) jump(p0, p1, p8, p10, i68, f66, i30, descr=TargetToken(1627735881376)) 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 0x000001bd1d4a92f0> 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 0x000001bd1e3b5440> 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 0x000001bd21c14020> 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 0x000001bd21c27638> 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=<Guard0x19f0472c020>) i38 = int_lt(i32, 300) guard_true(i38, descr=<Guard0x19f0471fb50>) i40 = int_add_ovf(i30, 3000) guard_no_overflow(descr=<Guard0x19f0471fb80>) i42 = int_add(i32, 1) i44 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x19f0471fbe0>) jump(p0, p1, i42, i40, descr=TargetToken(1782485841504)) 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 0x000001bd2277b4e8> 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 0x000001bd1edb3ec0> 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=<Guard0x20fe4f3a068>) i38 = int_le(i29, i26) guard_true(i38, descr=<Guard0x20fe4f2f8b0>) i40 = int_add_ovf(i29, 1) guard_no_overflow(descr=<Guard0x20fe4f2f8e0>) i41 = int_and(i26, i40) i42 = int_add_ovf(i33, i41) guard_no_overflow(descr=<Guard0x20fe4f2f910>) i44 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i46 = int_lt(i44, 0) guard_false(i46, descr=<Guard0x20fe4f2f970>) jump(p0, p1, p8, p10, i42, i40, i26, descr=TargetToken(2267288729184)) 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 0x000001bd1cde2138> 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 0x000001bd1b09b558> 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=<Guard0x17de0ee8a88>) i31 = int_gt(i25, 1) guard_true(i31, descr=<Guard0x17de0f07d90>) i32 = int_mul_ovf(i23, i25) guard_no_overflow(descr=<Guard0x17de0f07d30>) i34 = int_add(i25, -1) i36 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i38 = int_lt(i36, 0) guard_false(i38, descr=<Guard0x17de0f07ca0>) jump(p0, p1, i34, i32, descr=TargetToken(1640155512416)) 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 0x000001bd24701cc8> 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 0x000001bd244896e0> 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=<Guard0x186fd35a068>) i39 = float_lt(f34, f29) guard_true(i39, descr=<Guard0x186fd34fa00>) f40 = float_add(f33, f34) i42 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i44 = int_lt(i42, 0) guard_false(i44, descr=<Guard0x186fd34fa60>) jump(p0, p1, p8, f40, p12, f29, f33, descr=TargetToken(1679285188256)) 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 0x000001bd1caeb590> 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 0x000001bd1b7c1440> 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=<Guard0x23fdc91c1d0>) i57 = int_is_true(i51) guard_true(i57, descr=<Guard0x23fdc90fd00>) guard_nonnull_class(p56, ConstClass(W_IntObject), descr=<Guard0x23fdc91c218>) 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=<Guard0x23fdc90fd30>) i62 = int_add_ovf(i49, i61) guard_no_overflow(descr=<Guard0x23fdc90fd60>) i63 = int_add_ovf(i62, i38) guard_no_overflow(descr=<Guard0x23fdc90fd90>) setfield_gc(p14, p56, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value1 16>) i65 = int_sub_ovf(i51, 1) guard_no_overflow(descr=<Guard0x23fdc91c260>) i68 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i70 = int_lt(i68, 0) guard_false(i70, descr=<Guard0x23fdc90fdf0>) jump(p0, p1, i65, p10, p12, p14, i63, p24, p56, p56, i61, descr=TargetToken(2473306519136)) 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 0x000001bd200642f8> 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 0x000001bd21ee1b08> 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=<Guard0x1f422aa00b0>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x1f422a9cb90>) 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=<Guard0x1f422aa00f8>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x1f422a9cc20>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x1f422a9cc80>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x1f422a9ccb0>) i90 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x1f422a9cd10>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(2148064982624)) 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 0x000001bd1bbdc2c0> 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 0x000001bd1b94ecd0> 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=<Guard0x280861620b0>) i73 = int_lt(i71, i31) guard_true(i73, descr=<Guard0x2808615ab90>) 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=<Guard0x280861620f8>) i83 = int_add(i72, -1) i86 = int_lt(i71, 0) guard_false(i86, descr=<Guard0x2808615ac20>) i87 = int_ge(i71, i72) guard_false(i87, descr=<Guard0x2808615ac80>) i88 = int_add_ovf(i66, i71) guard_no_overflow(descr=<Guard0x2808615acb0>) i90 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i92 = int_lt(i90, 0) guard_false(i92, descr=<Guard0x2808615ad10>) jump(p0, p1, p8, p10, i88, i71, i72, p20, i75, i31, p46, i72, p47, descr=TargetToken(2751028426336)) 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 0x000001bd20511168> 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 0x000001bd20c27be8> 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=<Guard0x2324ffbc0f8>) i47 = int_lt(i41, 300) guard_true(i47, descr=<Guard0x2324ffafdc0>) i48 = int_add_ovf(i39, i37) guard_no_overflow(descr=<Guard0x2324ffafdf0>) i50 = int_add(i41, 1) i52 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i54 = int_lt(i52, 0) guard_false(i54, descr=<Guard0x2324ffafe50>) jump(p0, p1, p8, p10, i50, i48, i28, i32, i37, descr=TargetToken(2415113303648)) 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 0x000001bd1b5b8ec8> @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 0x000001bd1cfc6f70> 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=<Guard0x17fd203e1d0>) i70 = int_lt(i68, i28) guard_true(i70, descr=<Guard0x17fd203a7d0>) 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=<Guard0x17fd203e218>) i79 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i81 = int_lt(i79, 0) guard_false(i81, descr=<Guard0x17fd203a8c0>) 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(1648495720096)) 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 0x000001bd2571aa30> 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 0x000001bd2558fa98> 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=<Guard0x1951bd38218>) i44 = int_lt(i33, i24) guard_true(i44, descr=<Guard0x1951bd3c860>) i46 = int_lt(i33, 256) guard_true(i46, descr=<Guard0x1951bd3c8c0>) i48 = int_add(i33, 1) i50 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i52 = int_lt(i50, 0) guard_false(i52, descr=<Guard0x1951bd3c920>) 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(1739928401696)) 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 0x000001bd1d751b78> 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 0x000001bd1d4e5d70> 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=<Guard0x1a5cba01c88>) i75 = int_lt(i70, i34) guard_true(i75, descr=<Guard0x1a5cba52620>) 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=<Guard0x1a5cba01cd0>) 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=<Guard0x1a5cba01d18>) i91 = int_ge(i88, 0) guard_true(i91, descr=<Guard0x1a5cba526b0>) i92 = int_ge(i79, i38) guard_false(i92, descr=<Guard0x1a5cba52b90>) i94 = int_add(i79, 1) i95 = int_gt(i94, i61) guard_false(i95, descr=<Guard0x1a5cba52b60>) 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=<Guard0x1a5cba01df0>) i99 = int_add(i70, 1) i101 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i103 = int_lt(i101, 0) guard_false(i103, descr=<Guard0x1a5cba52b00>) jump(p0, p1, p8, i99, p12, p14, p83, i34, i38, i47, p46, i61, p60, descr=TargetToken(1811597573024)) 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 0x000001bd219e98d8> 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 0x000001bd1ba38e90> 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=<Guard0x19e96b3f9b8>) i63 = int_lt(i58, i30) guard_true(i63, descr=<Guard0x19e96b88770>) 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=<Guard0x19e96b3fa00>) i89 = int_add_ovf(i58, i88) guard_no_overflow(descr=<Guard0x19e96b887a0>) i91 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x19e96b88800>) jump(p0, p1, p8, i89, i30, descr=TargetToken(1780644920096)) 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 0x000001bd1e6b8678> 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 0x000001bd1e6a3e50> 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=<Guard0x26a7b1c0218>) i65 = int_gt(i59, 0) guard_true(i65, descr=<Guard0x26a7b1be1d0>) p67 = call_r(ConstClass(ll_int2dec__Signed), i59, descr=<Callr 8 i EF=3>) guard_no_exception(descr=<Guard0x26a7b1c0260>) 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=<Guard0x26a7b1c02a8>) 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=<Guard0x26a7b1c02f0>) 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=<Guard0x26a7b1c0338>) p87 = call_r(ConstClass(ll_build_trampoline__v1630___simple_call__function_), p69, descr=<Callr 8 r EF=5>) guard_no_exception(descr=<Guard0x26a7b1c0380>) i91 = call_i(ConstClass(codepoints_in_utf8), p87, 0, 9223372036854775807, descr=<Calli 8 rii EF=4>) guard_no_exception(descr=<Guard0x26a7b1c03c8>) i93 = int_lt(i91, 0) guard_false(i93, descr=<Guard0x26a7b1be230>) i94 = int_add_ovf(i57, i91) guard_no_overflow(descr=<Guard0x26a7b1be260>) i96 = int_add(i59, -1) i98 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i100 = int_lt(i98, 0) guard_false(i100, descr=<Guard0x26a7b1be2c0>) jump(p0, p1, i96, i94, descr=TargetToken(2656354989728)) 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 0x000001bd20e73c90> 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 0x000001bd24172790> 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=<Guard0x253cce5a020>) i32 = int_lt(i31, i23) guard_true(i32, descr=<Guard0x253cce4f820>) i34 = int_add(i31, 1) i36 = getfield_raw_i(140729701711872, 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=<Guard0x253cce5a068>) jump(p0, p1, p8, i31, p12, i34, i23, descr=TargetToken(2558942934624)) 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 0x000001bd248b3750> 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 0x000001bd244f11d8> 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=<Guard0x1f2b1a1c068>) i47 = int_lt(i46, i23) guard_true(i47, descr=<Guard0x1f2b1a0ffa0>) 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=<Guard0x1f2b1a1c0b0>) i55 = int_eq(i51, 1) guard_false(i55, descr=<Guard0x1f2b1a1e050>) p58 = call_r(ConstClass(ll_char_mul__Char_Signed), 120, i51, descr=<Callr 8 ii EF=3>) guard_no_exception(descr=<Guard0x1f2b1a1c0f8>) i60 = call_i(ConstClass(first_non_ascii_char), p58, descr=<Calli 8 r EF=4>) guard_no_exception(descr=<Guard0x1f2b1a1c140>) i62 = int_lt(i60, 0) guard_true(i62, descr=<Guard0x1f2b1a1e0b0>) i63 = strlen(p58) i65 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i67 = int_lt(i65, 0) guard_false(i67, descr=<Guard0x1f2b1a1e110>) jump(p0, p1, p8, i46, p12, i49, i23, descr=TargetToken(2141873665696)) 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 0x000001bd1a602838> 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 0x000001bd1eada218> 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=<Guard0x204d6cec6b0>) i77 = int_ge(0, i72) guard_false(i77, descr=<Guard0x204d6cec710>) 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=<Guard0x204d6cee140>) i83 = int_ge(1, i72) guard_false(i83, descr=<Guard0x204d6cec7a0>) 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=<Guard0x204d6cee188>) 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 0x000001bd1b085130> 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 0x000001bd19b87d00> 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=<Guard0x2058c5b3670>) i70 = int_le(i61, 2147483647) guard_true(i70, descr=<Guard0x2058c5b36d0>) 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 0x000001bd24bb14e8> 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 0x000001bd245a6c98> 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=<Guard0x27fca4c5bf8>) i90 = int_le(i74, 2147483647) guard_true(i90, descr=<Guard0x27fca4e1850>) 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 0x000001bd2120f018> 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 0x000001bd1d629c90> 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 0x000001bd2147da60> 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 0x000001bd222d1670> 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 0x000001bd1bb82058> 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 0x000001bd1b6e0020> 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=<Guard0x206da610218>) 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 0x000001bd1de04448> 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 0x000001bd1de979f0> 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=<Guard0x214d815e260>) i89 = int_le(i70, 32767) guard_true(i89, descr=<Guard0x214d815cfe0>) 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=<Guard0x214d815e4e8>) 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 0x000001bd2233f9b8> 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 0x000001bd2269afa8> 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=<Guard0x26fd66da068>) i34 = int_lt(i26, i23) guard_true(i34, descr=<Guard0x26fd66cf730>) i36 = int_add(i26, 1) i38 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i40 = int_add(i38, -1) setfield_raw(140729701711872, i40, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i43 = int_lt(i40, 0) guard_false(i43, descr=<Guard0x26fd66da0b0>) jump(p0, p1, i36, p10, p12, p20, i23, descr=TargetToken(2679361926944)) 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 0x000001bd1cb65638> 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 0x000001bd2489b280> 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=<Guard0x249af4da140>) i54 = int_lt(i49, i28) guard_true(i54, descr=<Guard0x249af4cfb20>) i55 = int_add_ovf(i49, i48) guard_no_overflow(descr=<Guard0x249af4cfb50>) i57 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i59 = int_lt(i57, 0) guard_false(i59, descr=<Guard0x249af4cfbb0>) i60 = arraylen_gc(p44, descr=<ArrayP 8>) jump(p0, p1, p8, p10, p12, i55, p20, p22, i28, p36, p40, p44, p46, i48, descr=TargetToken(2515496761056)) 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 0x000001bd1ba41248> 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 0x000001bd24e55a60> 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=<Guard0x2132264dd18>) i50 = int_gt(i40, 0) guard_true(i50, descr=<Guard0x213226bd2b0>) 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=<Guard0x213226b8f70>) guard_no_exception(descr=<Guard0x213226bd2e0>) i56 = int_eq(i54, 1) guard_true(i56, descr=<Guard0x213226bd340>) guard_not_invalidated(descr=<Guard0x213226bd370>) 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=<Guard0x2132264dd60>) i64 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i66 = int_lt(i64, 0) guard_false(i66, descr=<Guard0x213226bd400>) jump(p0, p1, i58, p10, p12, p22, p24, p32, i41, descr=TargetToken(2281204962848)) 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 0x000001bd2262ab10> 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 0x000001bd1eaef018> 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=<Guard0x1a74fe05070>) 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=<Guard0x1a74fe0ce00>) 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=<Guard0x1a74fe050b8>) p52 = getfield_gc_r(p10, descr=<FieldP pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable.inst__value0 8>) guard_nonnull(p52, descr=<Guard0x1a74fe0ce60>) 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=<Guard0x1a74fe08a20>) guard_no_exception(descr=<Guard0x1a74fe0ce90>) guard_nonnull_class(p57, 140729686659016, descr=<Guard0x1a74fe05100>) guard_not_invalidated(descr=<Guard0x1a74fe0cec0>) i60 = getfield_raw_i(140729701711872, descr=<FieldS pypysig_long_struct_inner.c_value 0>) i62 = int_lt(i60, 0) guard_false(i62, descr=<Guard0x1a74fe0cf20>) jump(p0, p1, p8, p10, i45, p14, i27, descr=TargetToken(1818111238048)) 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, 954 passed, 165 skipped, 1 xfailed in 216.23 seconds ======= program finished with exit code 1 elapsedTime=217.747000