Skip to content

Commit b86ce91

Browse files
authored
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).
1 parent d12b3e3 commit b86ce91

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Python/generated_cases.c.h

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/stacking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def write_components(
457457
with out.block(""):
458458
mgr.instr.write_body(out, -4, mgr.active_caches, tier)
459459

460-
if mgr is managers[-1] and not next_instr_is_set:
460+
if mgr is managers[-1] and not next_instr_is_set and not mgr.instr.always_exits:
461461
# Adjust the stack to its final depth, *then* write the
462462
# pokes for all preceding uops.
463463
# Note that for array output effects we may still write

0 commit comments

Comments
 (0)