-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Changes from all commits
e5059b2
482777c
358393d
c5c1764
944147c
ef3fe45
447f63e
7d33508
776ba54
5b01cc5
File filter
Filter by extension
Conversations
Jump to
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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) | ||
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. 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.