Skip to content

Commit

Permalink
gh-106581: Honor 'always_exits' in write_components() (#109338)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
gvanrossum committed Sep 12, 2023
1 parent d12b3e3 commit b86ce91
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Tools/cases_generator/stacking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b86ce91

Please sign in to comment.