-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state #111648
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'd like to avoid the extra branch in YIELD_VALUE
.
Other than that, looks good.
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. |
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.
Looks good.
… compiler and frame state (python#111648)
… compiler and frame state (python#111648)
This splits the SUSPENDED frame state into SUSPENDED and SUSPENDED_YIELD_FROM, adds an oparg to YIELD_VALUE to indicate whether it's in a yield-from or await (so it can set the state correctly). With this,
_PyGen_yf
has a lot less work to do.📚 Documentation preview 📚: https://cpython-previews--111648.org.readthedocs.build/