mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
GH-111485: Use micro-ops to split specialization code from base action (GH-111561)
This commit is contained in:
parent
eaf67e37a2
commit
b14e882428
9 changed files with 864 additions and 583 deletions
|
@ -383,7 +383,12 @@ class Analyzer:
|
|||
return MacroInstruction(macro.name, format, flags, macro, parts, offset)
|
||||
|
||||
def analyze_pseudo(self, pseudo: parsing.Pseudo) -> PseudoInstruction:
|
||||
targets = [self.instrs[target] for target in pseudo.targets]
|
||||
targets: list[Instruction | MacroInstruction] = []
|
||||
for target_name in pseudo.targets:
|
||||
if target_name in self.instrs:
|
||||
targets.append(self.instrs[target_name])
|
||||
else:
|
||||
targets.append(self.macro_instrs[target_name])
|
||||
assert targets
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue