gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative#32215
gh-91276: Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative#32215iritkatriel merged 7 commits intopython:mainfrom
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