GH-100982: Add COMPARE_AND_BRANCH instruction (GH-100983)

This commit is contained in:
Mark Shannon 2023-01-16 12:35:21 +00:00 committed by GitHub
parent b1a74a182d
commit 7b14c2ef19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 273 additions and 245 deletions

View file

@ -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,