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-100762: Fix optimization in gen_close #111069
Conversation
yf is NULL in gen_close in the cases where it is not DECREFed
yf is NULL in gen_close in the cases where it is not DECREFedyf is NULL in the cases where it is not DECREFed
|
This looks good. Just change the test. |
|
One minor efficiency improvement that could be made is to not call |
yf is NULL in the cases where it is not DECREFed

In f02fa64 lines 383-389 were added, with returns that do not decref
yf. I think this is ok becauseyfis always NULL in these cases. Adding the assertions.Also, the optimization for the case of exception_handler_depth== 1 is not working because
op.codeis checked instead ofop.arg.