diff options
author | Mark Shannon <mark@hotpy.org> | 2023-09-07 13:39:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 13:39:03 (GMT) |
commit | 0858328ca2457ae95715eb93e347d5c0547bec6f (patch) | |
tree | 35c18050d74c747699f30e9862fd4a63fb14eaa7 /Lib/_opcode_metadata.py | |
parent | d485551c9d1792ff3539eef1d6374bd4c01dcd5d (diff) | |
download | cpython-0858328ca2457ae95715eb93e347d5c0547bec6f.zip cpython-0858328ca2457ae95715eb93e347d5c0547bec6f.tar.gz cpython-0858328ca2457ae95715eb93e347d5c0547bec6f.tar.bz2 |
GH-108614: Add `RESUME_CHECK` instruction (GH-108630)
Diffstat (limited to 'Lib/_opcode_metadata.py')
-rw-r--r-- | Lib/_opcode_metadata.py | 286 |
1 files changed, 145 insertions, 141 deletions
diff --git a/Lib/_opcode_metadata.py b/Lib/_opcode_metadata.py index b02aa77..20975ff 100644 --- a/Lib/_opcode_metadata.py +++ b/Lib/_opcode_metadata.py @@ -4,6 +4,9 @@ # Do not edit! _specializations = { + "RESUME": [ + "RESUME_CHECK", + ], "TO_BOOL": [ "TO_BOOL_ALWAYS_TRUE", "TO_BOOL_BOOL", @@ -117,62 +120,63 @@ _specialized_opmap = { 'BINARY_SUBSCR_LIST_INT': 15, 'BINARY_SUBSCR_STR_INT': 16, 'BINARY_SUBSCR_TUPLE_INT': 18, - 'STORE_ATTR_INSTANCE_VALUE': 50, - 'STORE_ATTR_SLOT': 51, - 'STORE_SUBSCR_DICT': 54, - 'STORE_SUBSCR_LIST_INT': 55, - 'TO_BOOL_ALWAYS_TRUE': 57, - 'TO_BOOL_BOOL': 58, - 'TO_BOOL_INT': 59, - 'TO_BOOL_LIST': 60, - 'TO_BOOL_NONE': 61, - 'TO_BOOL_STR': 62, - 'CALL_BOUND_METHOD_EXACT_ARGS': 76, - 'CALL_BUILTIN_CLASS': 77, - 'CALL_BUILTIN_FAST_WITH_KEYWORDS': 78, - 'CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS': 82, - 'CALL_NO_KW_ALLOC_AND_ENTER_INIT': 83, - 'CALL_NO_KW_BUILTIN_FAST': 84, - 'CALL_NO_KW_BUILTIN_O': 85, - 'CALL_NO_KW_ISINSTANCE': 86, - 'CALL_NO_KW_LEN': 87, - 'CALL_NO_KW_LIST_APPEND': 88, - 'CALL_NO_KW_METHOD_DESCRIPTOR_FAST': 89, - 'CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS': 90, - 'CALL_NO_KW_METHOD_DESCRIPTOR_O': 91, - 'CALL_NO_KW_STR_1': 92, - 'CALL_NO_KW_TUPLE_1': 93, - 'CALL_NO_KW_TYPE_1': 94, - 'CALL_PY_EXACT_ARGS': 95, - 'CALL_PY_WITH_DEFAULTS': 96, - 'COMPARE_OP_FLOAT': 98, - 'COMPARE_OP_INT': 99, - 'COMPARE_OP_STR': 100, - 'FOR_ITER_GEN': 115, - 'FOR_ITER_LIST': 116, - 'FOR_ITER_RANGE': 117, - 'FOR_ITER_TUPLE': 118, - 'LOAD_ATTR_CLASS': 130, - 'LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN': 131, - 'LOAD_ATTR_INSTANCE_VALUE': 132, - 'LOAD_ATTR_METHOD_LAZY_DICT': 133, - 'LOAD_ATTR_METHOD_NO_DICT': 134, - 'LOAD_ATTR_METHOD_WITH_VALUES': 135, - 'LOAD_ATTR_MODULE': 136, - 'LOAD_ATTR_NONDESCRIPTOR_NO_DICT': 137, - 'LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES': 138, - 'LOAD_ATTR_PROPERTY': 139, - 'LOAD_ATTR_SLOT': 140, - 'LOAD_ATTR_WITH_HINT': 141, - 'LOAD_GLOBAL_BUILTIN': 151, - 'LOAD_GLOBAL_MODULE': 152, - 'LOAD_SUPER_ATTR_ATTR': 155, - 'LOAD_SUPER_ATTR_METHOD': 156, - 'SEND_GEN': 169, - 'STORE_ATTR_WITH_HINT': 174, - 'UNPACK_SEQUENCE_LIST': 184, - 'UNPACK_SEQUENCE_TUPLE': 185, - 'UNPACK_SEQUENCE_TWO_TUPLE': 186, + 'RESUME_CHECK': 47, + 'STORE_ATTR_INSTANCE_VALUE': 51, + 'STORE_ATTR_SLOT': 52, + 'STORE_SUBSCR_DICT': 55, + 'STORE_SUBSCR_LIST_INT': 56, + 'TO_BOOL_ALWAYS_TRUE': 58, + 'TO_BOOL_BOOL': 59, + 'TO_BOOL_INT': 60, + 'TO_BOOL_LIST': 61, + 'TO_BOOL_NONE': 62, + 'TO_BOOL_STR': 63, + 'CALL_BOUND_METHOD_EXACT_ARGS': 77, + 'CALL_BUILTIN_CLASS': 78, + 'CALL_BUILTIN_FAST_WITH_KEYWORDS': 79, + 'CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS': 83, + 'CALL_NO_KW_ALLOC_AND_ENTER_INIT': 84, + 'CALL_NO_KW_BUILTIN_FAST': 85, + 'CALL_NO_KW_BUILTIN_O': 86, + 'CALL_NO_KW_ISINSTANCE': 87, + 'CALL_NO_KW_LEN': 88, + 'CALL_NO_KW_LIST_APPEND': 89, + 'CALL_NO_KW_METHOD_DESCRIPTOR_FAST': 90, + 'CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS': 91, + 'CALL_NO_KW_METHOD_DESCRIPTOR_O': 92, + 'CALL_NO_KW_STR_1': 93, + 'CALL_NO_KW_TUPLE_1': 94, + 'CALL_NO_KW_TYPE_1': 95, + 'CALL_PY_EXACT_ARGS': 96, + 'CALL_PY_WITH_DEFAULTS': 97, + 'COMPARE_OP_FLOAT': 99, + 'COMPARE_OP_INT': 100, + 'COMPARE_OP_STR': 101, + 'FOR_ITER_GEN': 116, + 'FOR_ITER_LIST': 117, + 'FOR_ITER_RANGE': 118, + 'FOR_ITER_TUPLE': 119, + 'LOAD_ATTR_CLASS': 131, + 'LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN': 132, + 'LOAD_ATTR_INSTANCE_VALUE': 133, + 'LOAD_ATTR_METHOD_LAZY_DICT': 134, + 'LOAD_ATTR_METHOD_NO_DICT': 135, + 'LOAD_ATTR_METHOD_WITH_VALUES': 136, + 'LOAD_ATTR_MODULE': 137, + 'LOAD_ATTR_NONDESCRIPTOR_NO_DICT': 138, + 'LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES': 139, + 'LOAD_ATTR_PROPERTY': 140, + 'LOAD_ATTR_SLOT': 141, + 'LOAD_ATTR_WITH_HINT': 142, + 'LOAD_GLOBAL_BUILTIN': 152, + 'LOAD_GLOBAL_MODULE': 153, + 'LOAD_SUPER_ATTR_ATTR': 156, + 'LOAD_SUPER_ATTR_METHOD': 157, + 'SEND_GEN': 170, + 'STORE_ATTR_WITH_HINT': 175, + 'UNPACK_SEQUENCE_LIST': 185, + 'UNPACK_SEQUENCE_TUPLE': 186, + 'UNPACK_SEQUENCE_TWO_TUPLE': 187, } opmap = { @@ -210,91 +214,91 @@ opmap = { 'POP_TOP': 44, 'PUSH_EXC_INFO': 45, 'PUSH_NULL': 46, - 'RETURN_GENERATOR': 47, - 'RETURN_VALUE': 48, - 'SETUP_ANNOTATIONS': 49, - 'STORE_SLICE': 52, - 'STORE_SUBSCR': 53, - 'TO_BOOL': 56, - 'UNARY_INVERT': 63, - 'UNARY_NEGATIVE': 64, - 'UNARY_NOT': 65, - 'WITH_EXCEPT_START': 66, - 'BINARY_OP': 67, - 'BUILD_CONST_KEY_MAP': 68, - 'BUILD_LIST': 69, - 'BUILD_MAP': 70, - 'BUILD_SET': 71, - 'BUILD_SLICE': 72, - 'BUILD_STRING': 73, - 'BUILD_TUPLE': 74, - 'CALL': 75, - 'CALL_FUNCTION_EX': 79, - 'CALL_INTRINSIC_1': 80, - 'CALL_INTRINSIC_2': 81, - 'COMPARE_OP': 97, - 'CONTAINS_OP': 101, - 'CONVERT_VALUE': 102, - 'COPY': 103, - 'COPY_FREE_VARS': 104, - 'DELETE_ATTR': 105, - 'DELETE_DEREF': 106, - 'DELETE_FAST': 107, - 'DELETE_GLOBAL': 108, - 'DELETE_NAME': 109, - 'DICT_MERGE': 110, - 'DICT_UPDATE': 111, - 'ENTER_EXECUTOR': 112, - 'EXTENDED_ARG': 113, - 'FOR_ITER': 114, - 'GET_AWAITABLE': 119, - 'IMPORT_FROM': 120, - 'IMPORT_NAME': 121, - 'IS_OP': 122, - 'JUMP_BACKWARD': 123, - 'JUMP_BACKWARD_NO_INTERRUPT': 124, - 'JUMP_FORWARD': 125, - 'KW_NAMES': 126, - 'LIST_APPEND': 127, - 'LIST_EXTEND': 128, - 'LOAD_ATTR': 129, - 'LOAD_CONST': 142, - 'LOAD_DEREF': 143, - 'LOAD_FAST': 144, - 'LOAD_FAST_AND_CLEAR': 145, - 'LOAD_FAST_CHECK': 146, - 'LOAD_FAST_LOAD_FAST': 147, - 'LOAD_FROM_DICT_OR_DEREF': 148, - 'LOAD_FROM_DICT_OR_GLOBALS': 149, - 'LOAD_GLOBAL': 150, - 'LOAD_NAME': 153, - 'LOAD_SUPER_ATTR': 154, - 'MAKE_CELL': 157, - 'MAP_ADD': 158, - 'MATCH_CLASS': 159, - 'POP_JUMP_IF_FALSE': 160, - 'POP_JUMP_IF_NONE': 161, - 'POP_JUMP_IF_NOT_NONE': 162, - 'POP_JUMP_IF_TRUE': 163, - 'RAISE_VARARGS': 164, - 'RERAISE': 165, + 'RETURN_GENERATOR': 48, + 'RETURN_VALUE': 49, + 'SETUP_ANNOTATIONS': 50, + 'STORE_SLICE': 53, + 'STORE_SUBSCR': 54, + 'TO_BOOL': 57, + 'UNARY_INVERT': 64, + 'UNARY_NEGATIVE': 65, + 'UNARY_NOT': 66, + 'WITH_EXCEPT_START': 67, + 'BINARY_OP': 68, + 'BUILD_CONST_KEY_MAP': 69, + 'BUILD_LIST': 70, + 'BUILD_MAP': 71, + 'BUILD_SET': 72, + 'BUILD_SLICE': 73, + 'BUILD_STRING': 74, + 'BUILD_TUPLE': 75, + 'CALL': 76, + 'CALL_FUNCTION_EX': 80, + 'CALL_INTRINSIC_1': 81, + 'CALL_INTRINSIC_2': 82, + 'COMPARE_OP': 98, + 'CONTAINS_OP': 102, + 'CONVERT_VALUE': 103, + 'COPY': 104, + 'COPY_FREE_VARS': 105, + 'DELETE_ATTR': 106, + 'DELETE_DEREF': 107, + 'DELETE_FAST': 108, + 'DELETE_GLOBAL': 109, + 'DELETE_NAME': 110, + 'DICT_MERGE': 111, + 'DICT_UPDATE': 112, + 'ENTER_EXECUTOR': 113, + 'EXTENDED_ARG': 114, + 'FOR_ITER': 115, + 'GET_AWAITABLE': 120, + 'IMPORT_FROM': 121, + 'IMPORT_NAME': 122, + 'IS_OP': 123, + 'JUMP_BACKWARD': 124, + 'JUMP_BACKWARD_NO_INTERRUPT': 125, + 'JUMP_FORWARD': 126, + 'KW_NAMES': 127, + 'LIST_APPEND': 128, + 'LIST_EXTEND': 129, + 'LOAD_ATTR': 130, + 'LOAD_CONST': 143, + 'LOAD_DEREF': 144, + 'LOAD_FAST': 145, + 'LOAD_FAST_AND_CLEAR': 146, + 'LOAD_FAST_CHECK': 147, + 'LOAD_FAST_LOAD_FAST': 148, + 'LOAD_FROM_DICT_OR_DEREF': 149, + 'LOAD_FROM_DICT_OR_GLOBALS': 150, + 'LOAD_GLOBAL': 151, + 'LOAD_NAME': 154, + 'LOAD_SUPER_ATTR': 155, + 'MAKE_CELL': 158, + 'MAP_ADD': 159, + 'MATCH_CLASS': 160, + 'POP_JUMP_IF_FALSE': 161, + 'POP_JUMP_IF_NONE': 162, + 'POP_JUMP_IF_NOT_NONE': 163, + 'POP_JUMP_IF_TRUE': 164, + 'RAISE_VARARGS': 165, 'RESUME': 166, - 'RETURN_CONST': 167, - 'SEND': 168, - 'SET_ADD': 170, - 'SET_FUNCTION_ATTRIBUTE': 171, - 'SET_UPDATE': 172, - 'STORE_ATTR': 173, - 'STORE_DEREF': 175, - 'STORE_FAST': 176, - 'STORE_FAST_LOAD_FAST': 177, - 'STORE_FAST_STORE_FAST': 178, - 'STORE_GLOBAL': 179, - 'STORE_NAME': 180, - 'SWAP': 181, - 'UNPACK_EX': 182, - 'UNPACK_SEQUENCE': 183, - 'YIELD_VALUE': 187, + 'RERAISE': 167, + 'RETURN_CONST': 168, + 'SEND': 169, + 'SET_ADD': 171, + 'SET_FUNCTION_ATTRIBUTE': 172, + 'SET_UPDATE': 173, + 'STORE_ATTR': 174, + 'STORE_DEREF': 176, + 'STORE_FAST': 177, + 'STORE_FAST_LOAD_FAST': 178, + 'STORE_FAST_STORE_FAST': 179, + 'STORE_GLOBAL': 180, + 'STORE_NAME': 181, + 'SWAP': 182, + 'UNPACK_EX': 183, + 'UNPACK_SEQUENCE': 184, + 'YIELD_VALUE': 188, 'INSTRUMENTED_RESUME': 237, 'INSTRUMENTED_END_FOR': 238, 'INSTRUMENTED_END_SEND': 239, @@ -327,4 +331,4 @@ opmap = { 'STORE_FAST_MAYBE_NULL': 267, } MIN_INSTRUMENTED_OPCODE = 237 -HAVE_ARGUMENT = 67 +HAVE_ARGUMENT = 68 |