summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-09-12 17:58:40 (GMT)
committerGitHub <noreply@github.com>2023-09-12 17:58:40 (GMT)
commitb86ce91bfeeb0437a38ee6b59fb86d5d37d529ee (patch)
treea8345f8042f8afaa7a19a6d5d0291da8bef66a9f /Tools
parentd12b3e3152b1858e91c4890d0bf3a3b574a3ff6f (diff)
downloadcpython-b86ce91bfeeb0437a38ee6b59fb86d5d37d529ee.zip
cpython-b86ce91bfeeb0437a38ee6b59fb86d5d37d529ee.tar.gz
cpython-b86ce91bfeeb0437a38ee6b59fb86d5d37d529ee.tar.bz2
gh-106581: Honor 'always_exits' in write_components() (#109338)
I must have overlooked this when refactoring the code generator. The Tier 1 interpreter contained a few silly things like ``` goto resume_frame; STACK_SHRINK(1); ``` (and other variations, some where the unconditional `goto` was hidden in a macro).
Diffstat (limited to 'Tools')
-rw-r--r--Tools/cases_generator/stacking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/cases_generator/stacking.py b/Tools/cases_generator/stacking.py
index 026f039..9cf9ad1 100644
--- a/Tools/cases_generator/stacking.py
+++ b/Tools/cases_generator/stacking.py
@@ -457,7 +457,7 @@ def write_components(
with out.block(""):
mgr.instr.write_body(out, -4, mgr.active_caches, tier)
- if mgr is managers[-1] and not next_instr_is_set:
+ if mgr is managers[-1] and not next_instr_is_set and not mgr.instr.always_exits:
# Adjust the stack to its final depth, *then* write the
# pokes for all preceding uops.
# Note that for array output effects we may still write