8000 gh-105481: add pseudo-instructions to the cases DSL by iritkatriel · Pull Request #105506 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105481: add pseudo-instructions to the cases DSL #105506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 11, 2023
Prev Previous commit
Next Next commit
pushed, popped --> popped, pushed
  • Loading branch information
iritkatriel committed Jun 10, 2023
commit 096df7a1a817f6a01f9f2f57b7e7622934c51bc0
4 changes: 2 additions & 2 deletions Tools/cases_generator/generate_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,13 +959,13 @@ def effect_str(effects: list[StackEffect]) -> str:
pushed = str(sp - low)
case parser.Pseudo():
instr = self.pseudos[thing.name]
pushed = popped = None
popped = pushed = None
for target in self.pseudos[thing.name].targets:
target_instr = self.instrs.get(target)
assert target_instr
target_popped = effect_str(target_instr.input_effects)
target_pushed = effect_str(target_instr.output_effects)
if pushed is None and popped is None:
if popped is None and pushed is None:
popped, pushed = target_popped, target_pushed
else:
assert popped == target_popped
Expand Down
0