]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-128914: Remove all but one conditional stack effects (GH-129226)
authorMark Shannon <mark@hotpy.org>
Mon, 27 Jan 2025 16:24:48 +0000 (16:24 +0000)
committerGitHub <noreply@github.com>
Mon, 27 Jan 2025 16:24:48 +0000 (16:24 +0000)
commit75b49621578a45415bfeedd6cc68d50e821d8281
tree907f5c0765dc65e5f0eaa81ef9f80589623e0361
parent8ec76d90340287eb3587f0ae388bbfe158fb28d8
GH-128914: Remove all but one conditional stack effects (GH-129226)

* Remove all 'if (0)' and 'if (1)' conditional stack effects

* Use array instead of conditional for BUILD_SLICE args

* Refactor LOAD_GLOBAL to use a common conditional uop

* Remove conditional stack effects from LOAD_ATTR specializations

* Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array.

* Remove conditional stack effects from CALL_FUNCTION_EX
19 files changed:
Include/internal/pycore_magic_number.h
Include/internal/pycore_opcode_metadata.h
Include/internal/pycore_uop_ids.h
Include/internal/pycore_uop_metadata.h
Include/opcode_ids.h
Lib/_opcode_metadata.py
Lib/test/test__opcode.py
Lib/test/test_capi/test_opt.py
Lib/test/test_dis.py
Programs/test_frozenmain.h
Python/bytecodes.c
Python/codegen.c
Python/executor_cases.c.h
Python/generated_cases.c.h
Python/opcode_targets.h
Python/optimizer.c
Python/optimizer_analysis.c
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h