8000 gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst by iritkatriel · Pull Request #105482 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst #105482

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 10 commits into from
Jun 13, 2023
Prev Previous commit
Next Next commit
change order of args to PseudoInstruction
  • Loading branch information
iritkatriel committed Jun 13, 2023
commit 33dfd3ed1cfb136589962975933f2bd2b331e798
4 changes: 2 additions & 2 deletions Tools/cases_generator/generate_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,9 @@ class PseudoInstruction:
"""A pseudo instruction."""

name: str
targets: list[Instruction]
instr_fmt: str
flags: int
targets: list[Instruction]


@dataclasses.dataclass
Expand Down Expand Up @@ -809,7 +809,7 @@ def analyze_pseudo(self, pseudo: parser.Pseudo) -> PseudoInstruction:
assert(len(fmts) == 1)
flags_list = list(set([t.flags for t in targets]))
assert(len(flags_list) == 1)
return PseudoInstruction(pseudo.name, fmts[0], flags_list[0], targets)
return PseudoInstruction(pseudo.name, targets, fmts[0], flags_list[0])

def analyze_instruction(
self, instr: Instruction, stack: list[StackEffect], sp: int
Expand Down
0