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

gh-105481: Fix types and bug for pseudos#105788

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvanrossum merged 1 commit intopython:mainfromgvanrossum:pseudo-fixes
Jun 14, 2023
Merged
Changes fromall commits
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
Fix types and bug for pseudos
  • Loading branch information
@gvanrossum
gvanrossum committedJun 14, 2023
commit28db75ee71cd67c25a0c97fd66a29b78c20c1e6b
7 changes: 4 additions & 3 deletionsTools/cases_generator/generate_cases.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -510,7 +510,7 @@ class OverriddenInstructionPlaceHolder:
name: str


AnyInstruction = Instruction | MacroInstruction
AnyInstruction = Instruction | MacroInstruction | PseudoInstruction
INSTR_FMT_PREFIX = "INSTR_FMT_"
INSTR_FLAG_SUFFIX = "_FLAG"

Expand DownExpand Up@@ -550,6 +550,7 @@ def error(self, msg: str, node: parser.Node) -> None:
macros: dict[str, parser.Macro]
macro_instrs: dict[str, MacroInstruction]
families: dict[str, parser.Family]
pseudos: dict[str, parser.Pseudo]
pseudo_instrs: dict[str, PseudoInstruction]

def parse(self) -> None:
Expand DownExpand Up@@ -607,7 +608,7 @@ def parse_file(self, filename: str, instrs_idx: dict[str, int]) -> None:

# Parse from start
psr.setpos(start)
thing: parser.InstDef | parser.Macro | parser.Family | None
thing: parser.InstDef | parser.Macro | parser.Pseudo | parser.Family | None
thing_first_token = psr.peek()
while thing := psr.definition():
if ws := [w for w in RESERVED_WORDS if variable_used(thing, w)]:
Expand DownExpand Up@@ -927,7 +928,7 @@ def effect_str(effects: list[StackEffect]) -> str:
popped = str(-low)
pushed = str(sp - low)
case parser.Pseudo():
instr = self.pseudos[thing.name]
instr = self.pseudo_instrs[thing.name]
popped = pushed = None
# Calculate stack effect, and check that it's the the same
# for all targets.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp