Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_simple_call

self = <pypy.module.pypyjit.test_pypy_c.test_call.TestCall object at 0x00000000066d5be8>

    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
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy/module/pypyjit/test_pypy_c/test_call.py::TestCall::()::test_simple_call