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

Commitd50930a

Browse files
authored
gh-105481: Fix types and a bug for pseudos (#105788)
1 parent74c2422 commitd50930a

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
@@ -510,7 +510,7 @@ class OverriddenInstructionPlaceHolder:
510510
name:str
511511

512512

513-
AnyInstruction=Instruction|MacroInstruction
513+
AnyInstruction=Instruction|MacroInstruction|PseudoInstruction
514514
INSTR_FMT_PREFIX="INSTR_FMT_"
515515
INSTR_FLAG_SUFFIX="_FLAG"
516516

@@ -550,6 +550,7 @@ def error(self, msg: str, node: parser.Node) -> None:
550550
macros:dict[str,parser.Macro]
551551
macro_instrs:dict[str,MacroInstruction]
552552
families:dict[str,parser.Family]
553+
pseudos:dict[str,parser.Pseudo]
553554
pseudo_instrs:dict[str,PseudoInstruction]
554555

555556
defparse(self)->None:
@@ -607,7 +608,7 @@ def parse_file(self, filename: str, instrs_idx: dict[str, int]) -> None:
607608

608609
# Parse from start
609610
psr.setpos(start)
610-
thing:parser.InstDef|parser.Macro|parser.Family|None
611+
thing:parser.InstDef|parser.Macro|parser.Pseudo|parser.Family|None
611612
thing_first_token=psr.peek()
612613
whilething:=psr.definition():
613614
ifws:= [wforwinRESERVED_WORDSifvariable_used(thing,w)]:
@@ -927,7 +928,7 @@ def effect_str(effects: list[StackEffect]) -> str:
927928
popped=str(-low)
928929
pushed=str(sp-low)
929930
caseparser.Pseudo():
930-
instr=self.pseudos[thing.name]
931+
instr=self.pseudo_instrs[thing.name]
931932
popped=pushed=None
932933
# Calculate stack effect, and check that it's the the same
933934
# for all targets.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp