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
bpo-45773: Stop "optimizing" certain jump patterns #29505
Conversation
I'm not sure about the comments // It's okay if inst->i_target == target->i_target., or the asserts assert(inst->i_target != target->i_target);
I'm not saying that they are incorrect, but it is not obvious why they are true.
Could you elaborate?
Something else to consider is to create a jump_thread function which gets all the checks if one place (different targets, compatible line numbers). It should return 1 if successful.
We could then replace code from line 8253 to 8256 with i -= jump_thread(inst, target);
|
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be poked with soft cushions! |
|
I figured I'd give your If you think this is outside the scope of this PR, though, I can revert the latest changes and propose them separately. |
I agree, this does clean things up. |
|
Thanks @brandtbucher for the PR |
|
Sorry, @brandtbucher, I could not cleanly backport this to |
|
GH-29526 is a backport of this pull request to the 3.10 branch. |


https://bugs.python.org/issue45773