diff options
author | Mark Shannon <mark@hotpy.org> | 2023-01-16 12:35:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-16 12:35:21 (GMT) |
commit | 7b14c2ef194b6eed79670aa9d7e29ab8e2256a56 (patch) | |
tree | 794188d49a9f359cfa7663c25be587634f070f22 /Lib/opcode.py | |
parent | b1a74a182d8762bda51838401ac92b6ebad9632a (diff) | |
download | cpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.zip cpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.tar.gz cpython-7b14c2ef194b6eed79670aa9d7e29ab8e2256a56.tar.bz2 |
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r-- | Lib/opcode.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py index 414faa3..46051b2 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -189,6 +189,8 @@ hasfree.append(138) 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) def_op('CALL_FUNCTION_EX', 142) # Flags @@ -309,10 +311,10 @@ _specializations = { "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 @@ _cache_format = { "COMPARE_OP": { "counter": 1, }, + "COMPARE_AND_BRANCH": { + "counter": 1, + }, "BINARY_SUBSCR": { "counter": 1, "type_version": 2, |