]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106581: Project through calls (#108067)
authorGuido van Rossum <guido@python.org>
Thu, 17 Aug 2023 18:29:58 +0000 (11:29 -0700)
committerGitHub <noreply@github.com>
Thu, 17 Aug 2023 18:29:58 +0000 (11:29 -0700)
commit61c7249759ce88465ea655d5c19d17d03ff3f74b
treed6dd9d45ecbfdb2436ca462517982b95491179af
parent292a22bdc22f2aa70c96e9e53ca6d6b0c5f8d5bf
gh-106581: Project through calls (#108067)

This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.
16 files changed:
Include/internal/pycore_ceval.h
Include/internal/pycore_function.h
Include/internal/pycore_opcode_metadata.h
Lib/test/test_capi/test_misc.py
Lib/test/test_code.py
Objects/codeobject.c
Objects/funcobject.c
Python/abstract_interp_cases.c.h
Python/bytecodes.c
Python/ceval.c
Python/ceval_macros.h
Python/executor_cases.c.h
Python/generated_cases.c.h
Python/optimizer.c
Tools/cases_generator/analysis.py
Tools/cases_generator/stacking.py