-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative #32215
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
Are you completely sure it is impossible for the compiler to generate a backwards branch for these instructions? I can't produce a case now, but I can create a case that could jump backwards with the right compiler change.
compiles to:
The compiler could, in theory, retarget the branch at instruction 18 so that it jumps to 8. |
We could handle this in the assembler, I guess.
Would become
As long as backward jumps are rare (and they will be), then this wouldn't add any real overhead. |
I put an assertion and all tests passed. But yeah, we can make it more rubust as you suggest. |
There is the problem of how to test this, since we don't know how to currently make the compiler create a backwards jump with this opcode. |
Closing and reopening to kick the bots. |
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit ec65324 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 2dfe713 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Buildbots are happy. |
https://bugs.python.org/issue47120