]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-121784: Generate an error during code gen if a variable is marked `unused`, but...
authorMark Shannon <mark@hotpy.org>
Thu, 18 Jul 2024 11:49:24 +0000 (12:49 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Jul 2024 11:49:24 +0000 (12:49 +0100)
commit3eacfc1a4d09a9807bedba58ef4037788b6df961
tree3c852f1d2c54a0debe6909e041ff8de08d87b210
parent169324c27a39a4d6a4dd7b313b0de6ab2d1f7e6b
GH-121784: Generate an error during code gen if a variable is marked `unused`, but is used and thus cached in a prior uop. (#121788)

* Reject uop definitions that declare values as 'unused' that are already cached by prior uops

* Track which variables are defined and only load from memory when needed

* Support explicit `flush` in macro definitions.

* Make sure stack is flushed in where needed.
Lib/test/test_generated_cases.py
Python/bytecodes.c
Python/executor_cases.c.h
Python/generated_cases.c.h
Tools/cases_generator/analyzer.py
Tools/cases_generator/optimizer_generator.py
Tools/cases_generator/stack.py
Tools/cases_generator/tier1_generator.py
Tools/cases_generator/tier2_generator.py