8000 gh-105481: refactor instr flag related code into a new InstructionFlags class by iritkatriel · Pull Request #105950 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105481: refactor instr flag related code into a new InstructionFlags class #105950

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 5 commits into from
Jun 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
hash the bitmap instead of the InstructionFlags object
  • Loading branch information
iritkatriel committed Jun 21, 2023
commit f34174df787a0ce43ba1cf8979fec42c924cb044
5 changes: 2 additions & 3 deletions Tools/cases_generator/generate_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,9 +862,8 @@ def analyze_pseudo(self, pseudo: parser.Pseudo) -> PseudoInstruction:
# Make sure the targets have the same fmt
fmts = list(set([t.instr_fmt for t in targets]))
assert(len(fmts) == 1)
flags_list = list(set([t.instr_flags for t in targets]))
assert(len(flags_list) == 1)
return PseudoInstruction(pseudo.name, targets, fmts[0], flags_list[0])
assert(len(list(set([t.instr_flags.bitmap() for t in targets]))) == 1)
return PseudoInstruction(pseudo.name, targets, fmts[0], targets[0].instr_flags)

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