Skip to content

Commit 0ef4da7

Browse files
committed
Emit PEEKs in super/macro instructions in correct order
1 parent 32b4ac0 commit 0ef4da7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Python/generated_cases.c.h

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

Tools/cases_generator/generate_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ def wrap_super_or_macro(self, up: SuperOrMacroInstruction):
632632
# outer block, rather than trusting the compiler to optimize it.
633633
self.out.emit("")
634634
with self.out.block(f"TARGET({up.name})"):
635-
for i, var in enumerate(up.stack):
635+
for i, var in reversed(list(enumerate(up.stack))):
636636
src = None
637637
if i < up.initial_sp:
638638
src = StackEffect(f"PEEK({up.initial_sp - i})", "")

0 commit comments

Comments
 (0)