Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4291adf

Browse files
committed
Fix types and bug for pseudos
1 parent8da9d1b commit4291adf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎Tools/cases_generator/generate_cases.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ class OverriddenInstructionPlaceHolder:
491491
name:str
492492

493493

494-
AnyInstruction=Instruction|MacroInstruction
494+
AnyInstruction=Instruction|MacroInstruction|PseudoInstruction
495495
INSTR_FMT_PREFIX="INSTR_FMT_"
496496

497497

@@ -530,6 +530,7 @@ def error(self, msg: str, node: parser.Node) -> None:
530530
macros:dict[str,parser.Macro]
531531
macro_instrs:dict[str,MacroInstruction]
532532
families:dict[str,parser.Family]
533+
pseudos:dict[str,parser.Pseudo]
533534
pseudo_instrs:dict[str,PseudoInstruction]
534535

535536
defparse(self)->None:
@@ -587,7 +588,7 @@ def parse_file(self, filename: str, instrs_idx: dict[str, int]) -> None:
587588

588589
# Parse from start
589590
psr.setpos(start)
590-
thing:parser.InstDef|parser.Macro|parser.Family|None
591+
thing:parser.InstDef|parser.Macro|parser.Pseudo|parser.Family|None
591592
thing_first_token=psr.peek()
592593
whilething:=psr.definition():
593594
matchthing:
@@ -900,7 +901,7 @@ def effect_str(effects: list[StackEffect]) -> str:
900901
popped=str(-low)
901902
pushed=str(sp-low)
902903
caseparser.Pseudo():
903-
instr=self.pseudos[thing.name]
904+
instr=self.pseudo_instrs[thing.name]
904905
popped=pushed=None
905906
# Calculate stack effect, and check that it's the the same
906907
# for all targets.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp