8000 gh-106529: Cleanups split off gh-112134 by gvanrossum · Pull Request #112214 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-106529: Cleanups split off gh-112134 #112214

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clean up flags.py
  • Loading branch information
gvanrossum committed Nov 17, 2023
commit aef042acba32cb5f7cd3db484c222f1411fcfc90
7 changes: 3 additions & 4 deletions Tools/cases_generator/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

def makes_escaping_api_call(instr: parsing.InstDef) -> bool:
if "CALL_INTRINSIC" in instr.name:
return True;
return True
tkns = iter(instr.tokens)
for tkn in tkns:
if tkn.kind != lx.IDENTIFIER:
Expand All @@ -79,6 +79,7 @@ def makes_escaping_api_call(instr: parsing.InstDef) -> bool:
return True
return False


@dataclasses.dataclass
class InstructionFlags:
"""Construct and manipulate instruction flags"""
Expand Down Expand Up @@ -124,9 +125,7 @@ def fromInstruction(instr: parsing.InstDef) -> "InstructionFlags":
or variable_used(instr, "exception_unwind")
or variable_used(instr, "resume_with_error")
),
HAS_ESCAPES_FLAG=(
makes_escaping_api_call(instr)
),
HAS_ESCAPES_FLAG=makes_escaping_api_call(instr),
)

@staticmethod
Expand Down
0