Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
GH-100982: Add COMPARE_AND_BRANCH instruction#100983
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
e5059b2482777c358393dc5c1764944147cef3fe45447f63e7d33508776ba545b01cc5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -189,6 +189,8 @@ def pseudo_op(name, op, real_ops): | ||
| def_op('DELETE_DEREF', 139) | ||
| hasfree.append(139) | ||
| jrel_op('JUMP_BACKWARD', 140) # Number of words to skip (backwards) | ||
| def_op('COMPARE_AND_BRANCH', 141) # Comparison and jump | ||
| hascompare.append(141) | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This opcode needs to be in hasjrel as well. MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that I could special case | ||
| def_op('CALL_FUNCTION_EX', 142) # Flags | ||
| @@ -309,10 +311,10 @@ def pseudo_op(name, op, real_ops): | ||
| "CALL_NO_KW_TUPLE_1", | ||
| "CALL_NO_KW_TYPE_1", | ||
| ], | ||
| "COMPARE_OP": [ | ||
| "COMPARE_OP_FLOAT_JUMP", | ||
| "COMPARE_OP_INT_JUMP", | ||
| "COMPARE_OP_STR_JUMP", | ||
| "COMPARE_AND_BRANCH": [ | ||
| "COMPARE_AND_BRANCH_FLOAT", | ||
| "COMPARE_AND_BRANCH_INT", | ||
| "COMPARE_AND_BRANCH_STR", | ||
| ], | ||
| "FOR_ITER": [ | ||
| "FOR_ITER_LIST", | ||
| @@ -392,6 +394,9 @@ def pseudo_op(name, op, real_ops): | ||
| "COMPARE_OP":{ | ||
| "counter": 1, | ||
| }, | ||
| "COMPARE_AND_BRANCH":{ | ||
| "counter": 1, | ||
| }, | ||
| "BINARY_SUBSCR":{ | ||
| "counter": 1, | ||
| "type_version": 2, | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Adds a new :opcode:`COMPARE_AND_BRANCH` instruction. This is a bit more | ||
| efficient when performing a comparison immediately followed by a branch, and | ||
| restores the design intent of PEP 659 that specializations are local to a | ||
| single instruction. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.