Skip to content

Commit

Permalink
pythongh-106581: Honor 'always_exits' in write_components() (python#1…
Browse files Browse the repository at this point in the history
…09338)

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 authored and vstinner committed Sep 13, 2023
1 parent c88d7c2 commit a102880
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 a102880

Please sign in to comment.