-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
gh-107901: add the HAS_EVAL_BREAK instruction flag #108375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how the flags framework is so easily extensible.
Tools/cases_generator/flags.py
Outdated
@@ -53,10 +55,11 @@ def names(self, value: bool | None = None) -> list[str]: | |||
return list(dataclasses.asdict(self).keys()) | |||
return [n for n, v in dataclasses.asdict(self).items() if v == value] | |||
|
|||
def bitmap(self) -> int: | |||
def bitmap(self, ignore: list[str] = []) -> int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a mutable default sets alarm bells off in my head, even though you're safe in this case. Maybe make it an abstract set?
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
|
|
This is motivated by #107901, which implies we need to make sure that all instructions the have an eval breaker check also have a line number.
I'm not adding that assertion here because it will fail, so that's going to require more work.