GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — GH-100982: Add `COMPARE_AND_BRANCH` instruction by markshannon · Pull Request #100983 · python/cpython Conversation
|
| jrel_op('JUMP_BACKWARD', 140) # Number of words to skip (backwards) | ||
|
|
||
| def_op('COMPARE_AND_BRANCH', 141) # Comparison and jump | ||
| hascompare.append(141) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This opcode needs to be in hasjrel as well.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The problem is that dis sees COMPARE_AND_BRANCH, then POP_JUMP_IF_. The POP_JUMP_IF_ is where we jump from.
So marking COMPARE_AND_BRANCH as a jump confuses dis, it thinks the operator is a jump offset. COMPARE_AND_BRANCH is effectively a superinstruction.
I could special case COMPARE_AND_BRANCH in dis, but I think it might be better to wait for proper support for longer instructions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.