mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
GH-111485: Remove some special cases from the code generator and bytecodes.c (GH-111540)
This commit is contained in:
parent
d27acd4461
commit
2904d99839
8 changed files with 119 additions and 55 deletions
|
@ -385,12 +385,9 @@ class Analyzer:
|
|||
def analyze_pseudo(self, pseudo: parsing.Pseudo) -> PseudoInstruction:
|
||||
targets = [self.instrs[target] for target in pseudo.targets]
|
||||
assert targets
|
||||
# Make sure the targets have the same fmt
|
||||
fmts = list(set([t.instr_fmt for t in targets]))
|
||||
assert len(fmts) == 1
|
||||
ignored_flags = {"HAS_EVAL_BREAK_FLAG", "HAS_DEOPT_FLAG", "HAS_ERROR_FLAG"}
|
||||
assert len({t.instr_flags.bitmap(ignore=ignored_flags) for t in targets}) == 1
|
||||
return PseudoInstruction(pseudo.name, targets, fmts[0], targets[0].instr_flags)
|
||||
return PseudoInstruction(pseudo.name, targets, targets[0].instr_flags)
|
||||
|
||||
def analyze_instruction(
|
||||
self, instr: Instruction, offset: int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue