-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-109979: Auto-generate the target for DEOPT_IF() #110193
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
Conversation
Reviewers (@markshannon, @brandtbucher): There's one slightly unpleasant thing in this PR. All of the To fix this, I would have to switch to AST-based substitutions, which is a much more complicated refactor than I feel like taking on right now. |
|
In Python/bytecodes.c, you now write ``` DEOPT_IF(condition); ``` The code generator expands this to ``` DEOPT_IF(condition, opcode); ``` where `opcode` is the name of the unspecialized instruction. This works inside macro expansions too. **CAVEAT:** The entire `DEOPT_IF(condition)` statement must be on a single line. If it isn't, the substitution will fail; an error will be printed by the code generator and the C compiler will report some errors.
Uh oh!
There was an error while loading. Please reload this page.