2023-03-04 00:59:21 -04:00
|
|
|
// This file is generated by Tools/cases_generator/generate_cases.py
|
|
|
|
// from:
|
|
|
|
// Python/bytecodes.c
|
2023-01-05 17:01:07 -04:00
|
|
|
// Do not edit!
|
2023-01-25 16:41:03 -04:00
|
|
|
|
2023-06-11 18:31:59 -03:00
|
|
|
|
|
|
|
#define IS_PSEUDO_INSTR(OP) \
|
|
|
|
((OP) == STORE_FAST_MAYBE_NULL) || \
|
|
|
|
((OP) == LOAD_SUPER_METHOD) || \
|
|
|
|
((OP) == LOAD_ZERO_SUPER_METHOD) || \
|
|
|
|
((OP) == LOAD_ZERO_SUPER_ATTR) || \
|
|
|
|
((OP) == LOAD_METHOD) || \
|
|
|
|
((OP) == JUMP) || \
|
|
|
|
((OP) == JUMP_NO_INTERRUPT) || \
|
|
|
|
((OP) == SETUP_FINALLY) || \
|
|
|
|
((OP) == SETUP_CLEANUP) || \
|
|
|
|
((OP) == SETUP_WITH) || \
|
|
|
|
((OP) == POP_BLOCK) || \
|
|
|
|
0
|
|
|
|
|
2023-03-31 14:17:59 -03:00
|
|
|
#ifndef NEED_OPCODE_METADATA
|
2023-02-08 20:23:19 -04:00
|
|
|
extern int _PyOpcode_num_popped(int opcode, int oparg, bool jump);
|
|
|
|
#else
|
|
|
|
int
|
2023-02-01 15:38:06 -04:00
|
|
|
_PyOpcode_num_popped(int opcode, int oparg, bool jump) {
|
2023-01-25 16:41:03 -04:00
|
|
|
switch(opcode) {
|
|
|
|
case NOP:
|
|
|
|
return 0;
|
|
|
|
case RESUME:
|
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RESUME:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_CLOSURE:
|
|
|
|
return 0;
|
|
|
|
case LOAD_FAST_CHECK:
|
|
|
|
return 0;
|
|
|
|
case LOAD_FAST:
|
|
|
|
return 0;
|
2023-05-09 14:02:14 -03:00
|
|
|
case LOAD_FAST_AND_CLEAR:
|
|
|
|
return 0;
|
2023-06-05 07:07:04 -03:00
|
|
|
case LOAD_FAST_LOAD_FAST:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_CONST:
|
|
|
|
return 0;
|
|
|
|
case STORE_FAST:
|
|
|
|
return 1;
|
2023-06-11 18:31:59 -03:00
|
|
|
case STORE_FAST_MAYBE_NULL:
|
|
|
|
return 1;
|
2023-06-05 07:07:04 -03:00
|
|
|
case STORE_FAST_LOAD_FAST:
|
|
|
|
return 1;
|
|
|
|
case STORE_FAST_STORE_FAST:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_TOP:
|
|
|
|
return 1;
|
|
|
|
case PUSH_NULL:
|
|
|
|
return 0;
|
|
|
|
case END_FOR:
|
2023-05-31 12:09:23 -03:00
|
|
|
return 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_END_FOR:
|
|
|
|
return 2;
|
|
|
|
case END_SEND:
|
|
|
|
return 2;
|
|
|
|
case INSTRUMENTED_END_SEND:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNARY_NEGATIVE:
|
|
|
|
return 1;
|
|
|
|
case UNARY_NOT:
|
|
|
|
return 1;
|
|
|
|
case UNARY_INVERT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_OP_MULTIPLY_INT:
|
|
|
|
return 2;
|
2023-05-31 12:09:23 -03:00
|
|
|
case BINARY_OP_ADD_INT:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 2;
|
|
|
|
case BINARY_OP_SUBTRACT_INT:
|
|
|
|
return 2;
|
2023-05-31 12:09:23 -03:00
|
|
|
case BINARY_OP_MULTIPLY_FLOAT:
|
|
|
|
return 2;
|
|
|
|
case BINARY_OP_ADD_FLOAT:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BINARY_OP_SUBTRACT_FLOAT:
|
|
|
|
return 2;
|
|
|
|
case BINARY_OP_ADD_UNICODE:
|
|
|
|
return 2;
|
|
|
|
case BINARY_OP_INPLACE_ADD_UNICODE:
|
|
|
|
return 2;
|
|
|
|
case BINARY_SUBSCR:
|
|
|
|
return 2;
|
|
|
|
case BINARY_SLICE:
|
|
|
|
return 3;
|
|
|
|
case STORE_SLICE:
|
|
|
|
return 4;
|
|
|
|
case BINARY_SUBSCR_LIST_INT:
|
|
|
|
return 2;
|
|
|
|
case BINARY_SUBSCR_TUPLE_INT:
|
|
|
|
return 2;
|
|
|
|
case BINARY_SUBSCR_DICT:
|
|
|
|
return 2;
|
|
|
|
case BINARY_SUBSCR_GETITEM:
|
|
|
|
return 2;
|
|
|
|
case LIST_APPEND:
|
|
|
|
return (oparg-1) + 2;
|
|
|
|
case SET_ADD:
|
|
|
|
return (oparg-1) + 2;
|
|
|
|
case STORE_SUBSCR:
|
|
|
|
return 3;
|
|
|
|
case STORE_SUBSCR_LIST_INT:
|
|
|
|
return 3;
|
|
|
|
case STORE_SUBSCR_DICT:
|
|
|
|
return 3;
|
|
|
|
case DELETE_SUBSCR:
|
|
|
|
return 2;
|
|
|
|
case CALL_INTRINSIC_1:
|
|
|
|
return 1;
|
2023-02-14 07:54:13 -04:00
|
|
|
case CALL_INTRINSIC_2:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case RAISE_VARARGS:
|
2023-01-25 18:29:56 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case INTERPRETER_EXIT:
|
|
|
|
return 1;
|
|
|
|
case RETURN_VALUE:
|
|
|
|
return 1;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RETURN_VALUE:
|
|
|
|
return 1;
|
2023-02-07 18:32:21 -04:00
|
|
|
case RETURN_CONST:
|
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RETURN_CONST:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_AITER:
|
|
|
|
return 1;
|
|
|
|
case GET_ANEXT:
|
|
|
|
return 1;
|
|
|
|
case GET_AWAITABLE:
|
|
|
|
return 1;
|
|
|
|
case SEND:
|
2023-02-03 07:30:21 -04:00
|
|
|
return 2;
|
2023-02-13 07:24:55 -04:00
|
|
|
case SEND_GEN:
|
|
|
|
return 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_YIELD_VALUE:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case YIELD_VALUE:
|
|
|
|
return 1;
|
|
|
|
case POP_EXCEPT:
|
|
|
|
return 1;
|
|
|
|
case RERAISE:
|
2023-02-02 06:02:57 -04:00
|
|
|
return oparg + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case END_ASYNC_FOR:
|
2023-01-31 14:47:50 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CLEANUP_THROW:
|
2023-02-02 06:02:57 -04:00
|
|
|
return 3;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ASSERTION_ERROR:
|
|
|
|
return 0;
|
|
|
|
case LOAD_BUILD_CLASS:
|
|
|
|
return 0;
|
|
|
|
case STORE_NAME:
|
|
|
|
return 1;
|
|
|
|
case DELETE_NAME:
|
|
|
|
return 0;
|
|
|
|
case UNPACK_SEQUENCE:
|
2023-02-07 16:37:43 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_TWO_TUPLE:
|
2023-02-07 16:37:43 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_TUPLE:
|
2023-02-07 19:44:37 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_LIST:
|
2023-02-07 19:44:37 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_EX:
|
2023-02-07 16:37:43 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case STORE_ATTR:
|
|
|
|
return 2;
|
|
|
|
case DELETE_ATTR:
|
|
|
|
return 1;
|
|
|
|
case STORE_GLOBAL:
|
|
|
|
return 1;
|
|
|
|
case DELETE_GLOBAL:
|
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_LOCALS:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_NAME:
|
2023-05-31 12:09:23 -03:00
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_FROM_DICT_OR_GLOBALS:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_GLOBAL:
|
2023-02-01 17:12:49 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_GLOBAL_MODULE:
|
2023-02-01 17:12:49 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_GLOBAL_BUILTIN:
|
2023-02-01 17:12:49 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case DELETE_FAST:
|
|
|
|
return 0;
|
|
|
|
case MAKE_CELL:
|
|
|
|
return 0;
|
|
|
|
case DELETE_DEREF:
|
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_FROM_DICT_OR_DEREF:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_DEREF:
|
|
|
|
return 0;
|
|
|
|
case STORE_DEREF:
|
|
|
|
return 1;
|
|
|
|
case COPY_FREE_VARS:
|
|
|
|
return 0;
|
|
|
|
case BUILD_STRING:
|
|
|
|
return oparg;
|
|
|
|
case BUILD_TUPLE:
|
|
|
|
return oparg;
|
|
|
|
case BUILD_LIST:
|
|
|
|
return oparg;
|
|
|
|
case LIST_EXTEND:
|
|
|
|
return (oparg-1) + 2;
|
|
|
|
case SET_UPDATE:
|
|
|
|
return (oparg-1) + 2;
|
|
|
|
case BUILD_SET:
|
|
|
|
return oparg;
|
|
|
|
case BUILD_MAP:
|
|
|
|
return oparg*2;
|
|
|
|
case SETUP_ANNOTATIONS:
|
|
|
|
return 0;
|
|
|
|
case BUILD_CONST_KEY_MAP:
|
|
|
|
return oparg + 1;
|
|
|
|
case DICT_UPDATE:
|
|
|
|
return 1;
|
|
|
|
case DICT_MERGE:
|
|
|
|
return 1;
|
|
|
|
case MAP_ADD:
|
|
|
|
return 2;
|
2023-05-16 13:29:00 -03:00
|
|
|
case INSTRUMENTED_LOAD_SUPER_ATTR:
|
|
|
|
return 3;
|
2023-04-24 19:22:14 -03:00
|
|
|
case LOAD_SUPER_ATTR:
|
|
|
|
return 3;
|
2023-06-11 18:31:59 -03:00
|
|
|
case LOAD_SUPER_METHOD:
|
|
|
|
return 3;
|
|
|
|
case LOAD_ZERO_SUPER_METHOD:
|
|
|
|
return 3;
|
|
|
|
case LOAD_ZERO_SUPER_ATTR:
|
|
|
|
return 3;
|
2023-05-11 11:08:13 -03:00
|
|
|
case LOAD_SUPER_ATTR_ATTR:
|
|
|
|
return 3;
|
2023-04-25 14:45:51 -03:00
|
|
|
case LOAD_SUPER_ATTR_METHOD:
|
|
|
|
return 3;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR:
|
2023-01-29 21:28:39 -04:00
|
|
|
return 1;
|
2023-06-11 18:31:59 -03:00
|
|
|
case LOAD_METHOD:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_INSTANCE_VALUE:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_MODULE:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_WITH_HINT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_SLOT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_CLASS:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_PROPERTY:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case STORE_ATTR_INSTANCE_VALUE:
|
|
|
|
return 2;
|
|
|
|
case STORE_ATTR_WITH_HINT:
|
|
|
|
return 2;
|
|
|
|
case STORE_ATTR_SLOT:
|
|
|
|
return 2;
|
|
|
|
case COMPARE_OP:
|
|
|
|
return 2;
|
2023-03-23 19:25:09 -03:00
|
|
|
case COMPARE_OP_FLOAT:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 2;
|
2023-03-23 19:25:09 -03:00
|
|
|
case COMPARE_OP_INT:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 2;
|
2023-03-23 19:25:09 -03:00
|
|
|
case COMPARE_OP_STR:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 2;
|
|
|
|
case IS_OP:
|
|
|
|
return 2;
|
|
|
|
case CONTAINS_OP:
|
|
|
|
return 2;
|
|
|
|
case CHECK_EG_MATCH:
|
|
|
|
return 2;
|
|
|
|
case CHECK_EXC_MATCH:
|
|
|
|
return 2;
|
|
|
|
case IMPORT_NAME:
|
|
|
|
return 2;
|
|
|
|
case IMPORT_FROM:
|
|
|
|
return 1;
|
|
|
|
case JUMP_FORWARD:
|
|
|
|
return 0;
|
|
|
|
case JUMP_BACKWARD:
|
|
|
|
return 0;
|
2023-06-11 18:31:59 -03:00
|
|
|
case JUMP:
|
|
|
|
return 0;
|
|
|
|
case JUMP_NO_INTERRUPT:
|
|
|
|
return 0;
|
2023-06-02 07:46:18 -03:00
|
|
|
case ENTER_EXECUTOR:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_FALSE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_TRUE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_NOT_NONE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_NONE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case JUMP_BACKWARD_NO_INTERRUPT:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_LEN:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case MATCH_CLASS:
|
|
|
|
return 3;
|
|
|
|
case MATCH_MAPPING:
|
|
|
|
return 1;
|
|
|
|
case MATCH_SEQUENCE:
|
|
|
|
return 1;
|
|
|
|
case MATCH_KEYS:
|
|
|
|
return 2;
|
|
|
|
case GET_ITER:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_YIELD_FROM_ITER:
|
2023-02-03 07:30:21 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 1;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_FOR_ITER:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_LIST:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_TUPLE:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_RANGE:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_GEN:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BEFORE_ASYNC_WITH:
|
2023-01-31 14:47:50 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BEFORE_WITH:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case WITH_EXCEPT_START:
|
|
|
|
return 4;
|
2023-06-11 18:31:59 -03:00
|
|
|
case SETUP_FINALLY:
|
|
|
|
return 0;
|
|
|
|
case SETUP_CLEANUP:
|
|
|
|
return 0;
|
|
|
|
case SETUP_WITH:
|
|
|
|
return 0;
|
|
|
|
case POP_BLOCK:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case PUSH_EXC_INFO:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_WITH_VALUES:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_NO_DICT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_LAZY_DICT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case KW_NAMES:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_CALL:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
|
|
|
case CALL_BOUND_METHOD_EXACT_ARGS:
|
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_PY_EXACT_ARGS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_PY_WITH_DEFAULTS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_TYPE_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_STR_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_TUPLE_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_BUILTIN_CLASS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_BUILTIN_O:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_BUILTIN_FAST:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_BUILTIN_FAST_WITH_KEYWORDS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_LEN:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_ISINSTANCE:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_LIST_APPEND:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_O:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_FAST:
|
2023-02-08 15:40:10 -04:00
|
|
|
return oparg + 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_CALL_FUNCTION_EX:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_FUNCTION_EX:
|
2023-02-08 00:03:22 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 3;
|
2023-01-25 16:41:03 -04:00
|
|
|
case MAKE_FUNCTION:
|
2023-06-13 05:51:05 -03:00
|
|
|
return 1;
|
|
|
|
case SET_FUNCTION_ATTRIBUTE:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case RETURN_GENERATOR:
|
2023-02-03 07:30:21 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BUILD_SLICE:
|
2023-02-03 10:40:45 -04:00
|
|
|
return ((oparg == 3) ? 1 : 0) + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FORMAT_VALUE:
|
2023-02-07 21:35:55 -04:00
|
|
|
return (((oparg & FVS_MASK) == FVS_HAVE_SPEC) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case COPY:
|
2023-02-06 18:45:18 -04:00
|
|
|
return (oparg-1) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BINARY_OP:
|
|
|
|
return 2;
|
|
|
|
case SWAP:
|
2023-02-06 18:45:18 -04:00
|
|
|
return (oparg-2) + 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_INSTRUCTION:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_JUMP_FORWARD:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_JUMP_BACKWARD:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_TRUE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_FALSE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_NONE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_NOT_NONE:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case EXTENDED_ARG:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CACHE:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case RESERVED:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
default:
|
2023-02-08 20:23:19 -04:00
|
|
|
return -1;
|
2023-01-25 16:41:03 -04:00
|
|
|
}
|
|
|
|
}
|
2023-01-25 18:29:56 -04:00
|
|
|
#endif
|
2023-01-25 16:41:03 -04:00
|
|
|
|
2023-03-31 14:17:59 -03:00
|
|
|
#ifndef NEED_OPCODE_METADATA
|
2023-02-08 20:23:19 -04:00
|
|
|
extern int _PyOpcode_num_pushed(int opcode, int oparg, bool jump);
|
|
|
|
#else
|
|
|
|
int
|
2023-02-01 15:38:06 -04:00
|
|
|
_PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
|
2023-01-25 16:41:03 -04:00
|
|
|
switch(opcode) {
|
|
|
|
case NOP:
|
|
|
|
return 0;
|
|
|
|
case RESUME:
|
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RESUME:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_CLOSURE:
|
|
|
|
return 1;
|
|
|
|
case LOAD_FAST_CHECK:
|
|
|
|
return 1;
|
|
|
|
case LOAD_FAST:
|
|
|
|
return 1;
|
2023-05-09 14:02:14 -03:00
|
|
|
case LOAD_FAST_AND_CLEAR:
|
|
|
|
return 1;
|
2023-06-05 07:07:04 -03:00
|
|
|
case LOAD_FAST_LOAD_FAST:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_CONST:
|
|
|
|
return 1;
|
|
|
|
case STORE_FAST:
|
|
|
|
return 0;
|
2023-06-11 18:31:59 -03:00
|
|
|
case STORE_FAST_MAYBE_NULL:
|
|
|
|
return 0;
|
2023-06-05 07:07:04 -03:00
|
|
|
case STORE_FAST_LOAD_FAST:
|
|
|
|
return 1;
|
|
|
|
case STORE_FAST_STORE_FAST:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_TOP:
|
|
|
|
return 0;
|
|
|
|
case PUSH_NULL:
|
|
|
|
return 1;
|
|
|
|
case END_FOR:
|
2023-05-31 12:09:23 -03:00
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_END_FOR:
|
|
|
|
return 0;
|
|
|
|
case END_SEND:
|
|
|
|
return 1;
|
|
|
|
case INSTRUMENTED_END_SEND:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNARY_NEGATIVE:
|
|
|
|
return 1;
|
|
|
|
case UNARY_NOT:
|
|
|
|
return 1;
|
|
|
|
case UNARY_INVERT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_OP_MULTIPLY_INT:
|
|
|
|
return 1;
|
2023-05-31 12:09:23 -03:00
|
|
|
case BINARY_OP_ADD_INT:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 1;
|
|
|
|
case BINARY_OP_SUBTRACT_INT:
|
|
|
|
return 1;
|
2023-05-31 12:09:23 -03:00
|
|
|
case BINARY_OP_MULTIPLY_FLOAT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_OP_ADD_FLOAT:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BINARY_OP_SUBTRACT_FLOAT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_OP_ADD_UNICODE:
|
|
|
|
return 1;
|
|
|
|
case BINARY_OP_INPLACE_ADD_UNICODE:
|
|
|
|
return 0;
|
|
|
|
case BINARY_SUBSCR:
|
|
|
|
return 1;
|
|
|
|
case BINARY_SLICE:
|
|
|
|
return 1;
|
|
|
|
case STORE_SLICE:
|
|
|
|
return 0;
|
|
|
|
case BINARY_SUBSCR_LIST_INT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_SUBSCR_TUPLE_INT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_SUBSCR_DICT:
|
|
|
|
return 1;
|
|
|
|
case BINARY_SUBSCR_GETITEM:
|
|
|
|
return 1;
|
|
|
|
case LIST_APPEND:
|
|
|
|
return (oparg-1) + 1;
|
|
|
|
case SET_ADD:
|
|
|
|
return (oparg-1) + 1;
|
|
|
|
case STORE_SUBSCR:
|
|
|
|
return 0;
|
|
|
|
case STORE_SUBSCR_LIST_INT:
|
|
|
|
return 0;
|
|
|
|
case STORE_SUBSCR_DICT:
|
|
|
|
return 0;
|
|
|
|
case DELETE_SUBSCR:
|
|
|
|
return 0;
|
|
|
|
case CALL_INTRINSIC_1:
|
|
|
|
return 1;
|
2023-02-14 07:54:13 -04:00
|
|
|
case CALL_INTRINSIC_2:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case RAISE_VARARGS:
|
2023-01-25 18:29:56 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case INTERPRETER_EXIT:
|
|
|
|
return 0;
|
|
|
|
case RETURN_VALUE:
|
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RETURN_VALUE:
|
|
|
|
return 0;
|
2023-02-07 18:32:21 -04:00
|
|
|
case RETURN_CONST:
|
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_RETURN_CONST:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_AITER:
|
|
|
|
return 1;
|
|
|
|
case GET_ANEXT:
|
|
|
|
return 2;
|
|
|
|
case GET_AWAITABLE:
|
|
|
|
return 1;
|
|
|
|
case SEND:
|
2023-02-13 07:24:55 -04:00
|
|
|
return 2;
|
|
|
|
case SEND_GEN:
|
2023-05-11 08:52:06 -03:00
|
|
|
return 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_YIELD_VALUE:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case YIELD_VALUE:
|
|
|
|
return 1;
|
|
|
|
case POP_EXCEPT:
|
|
|
|
return 0;
|
|
|
|
case RERAISE:
|
2023-02-02 06:02:57 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case END_ASYNC_FOR:
|
2023-01-31 14:47:50 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CLEANUP_THROW:
|
2023-02-13 07:24:55 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ASSERTION_ERROR:
|
|
|
|
return 1;
|
|
|
|
case LOAD_BUILD_CLASS:
|
|
|
|
return 1;
|
|
|
|
case STORE_NAME:
|
|
|
|
return 0;
|
|
|
|
case DELETE_NAME:
|
|
|
|
return 0;
|
|
|
|
case UNPACK_SEQUENCE:
|
2023-02-07 16:37:43 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_TWO_TUPLE:
|
2023-02-07 19:44:37 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_TUPLE:
|
2023-02-07 19:44:37 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_SEQUENCE_LIST:
|
2023-02-07 19:44:37 -04:00
|
|
|
return oparg;
|
2023-01-25 16:41:03 -04:00
|
|
|
case UNPACK_EX:
|
2023-02-07 16:37:43 -04:00
|
|
|
return (oparg & 0xFF) + (oparg >> 8) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case STORE_ATTR:
|
|
|
|
return 0;
|
|
|
|
case DELETE_ATTR:
|
|
|
|
return 0;
|
|
|
|
case STORE_GLOBAL:
|
|
|
|
return 0;
|
|
|
|
case DELETE_GLOBAL:
|
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_LOCALS:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_NAME:
|
2023-05-31 12:09:23 -03:00
|
|
|
return 1;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_FROM_DICT_OR_GLOBALS:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 1;
|
|
|
|
case LOAD_GLOBAL:
|
2023-02-01 17:12:49 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_GLOBAL_MODULE:
|
2023-02-01 17:12:49 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_GLOBAL_BUILTIN:
|
2023-02-01 17:12:49 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case DELETE_FAST:
|
|
|
|
return 0;
|
|
|
|
case MAKE_CELL:
|
|
|
|
return 0;
|
|
|
|
case DELETE_DEREF:
|
|
|
|
return 0;
|
2023-05-16 00:36:23 -03:00
|
|
|
case LOAD_FROM_DICT_OR_DEREF:
|
2023-01-25 16:41:03 -04:00
|
|
|
return 1;
|
|
|
|
case LOAD_DEREF:
|
|
|
|
return 1;
|
|
|
|
case STORE_DEREF:
|
|
|
|
return 0;
|
|
|
|
case COPY_FREE_VARS:
|
|
|
|
return 0;
|
|
|
|
case BUILD_STRING:
|
|
|
|
return 1;
|
|
|
|
case BUILD_TUPLE:
|
|
|
|
return 1;
|
|
|
|
case BUILD_LIST:
|
|
|
|
return 1;
|
|
|
|
case LIST_EXTEND:
|
|
|
|
return (oparg-1) + 1;
|
|
|
|
case SET_UPDATE:
|
|
|
|
return (oparg-1) + 1;
|
|
|
|
case BUILD_SET:
|
|
|
|
return 1;
|
|
|
|
case BUILD_MAP:
|
|
|
|
return 1;
|
|
|
|
case SETUP_ANNOTATIONS:
|
|
|
|
return 0;
|
|
|
|
case BUILD_CONST_KEY_MAP:
|
|
|
|
return 1;
|
|
|
|
case DICT_UPDATE:
|
|
|
|
return 0;
|
|
|
|
case DICT_MERGE:
|
|
|
|
return 0;
|
|
|
|
case MAP_ADD:
|
|
|
|
return 0;
|
2023-05-16 13:29:00 -03:00
|
|
|
case INSTRUMENTED_LOAD_SUPER_ATTR:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-04-24 19:22:14 -03:00
|
|
|
case LOAD_SUPER_ATTR:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-06-11 18:31:59 -03:00
|
|
|
case LOAD_SUPER_METHOD:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
|
|
|
case LOAD_ZERO_SUPER_METHOD:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
|
|
|
case LOAD_ZERO_SUPER_ATTR:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-05-11 11:08:13 -03:00
|
|
|
case LOAD_SUPER_ATTR_ATTR:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-04-25 14:45:51 -03:00
|
|
|
case LOAD_SUPER_ATTR_METHOD:
|
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR:
|
2023-01-29 21:28:39 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-06-11 18:31:59 -03:00
|
|
|
case LOAD_METHOD:
|
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_INSTANCE_VALUE:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_MODULE:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_WITH_HINT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_SLOT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_CLASS:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_PROPERTY:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case STORE_ATTR_INSTANCE_VALUE:
|
|
|
|
return 0;
|
|
|
|
case STORE_ATTR_WITH_HINT:
|
|
|
|
return 0;
|
|
|
|
case STORE_ATTR_SLOT:
|
|
|
|
return 0;
|
|
|
|
case COMPARE_OP:
|
|
|
|
return 1;
|
2023-03-23 19:25:09 -03:00
|
|
|
case COMPARE_OP_FLOAT:
|
|
|
|
return 1;
|
|
|
|
case COMPARE_OP_INT:
|
|
|
|
return 1;
|
|
|
|
case COMPARE_OP_STR:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case IS_OP:
|
|
|
|
return 1;
|
|
|
|
case CONTAINS_OP:
|
|
|
|
return 1;
|
|
|
|
case CHECK_EG_MATCH:
|
|
|
|
return 2;
|
|
|
|
case CHECK_EXC_MATCH:
|
|
|
|
return 2;
|
|
|
|
case IMPORT_NAME:
|
|
|
|
return 1;
|
|
|
|
case IMPORT_FROM:
|
|
|
|
return 2;
|
|
|
|
case JUMP_FORWARD:
|
|
|
|
return 0;
|
|
|
|
case JUMP_BACKWARD:
|
|
|
|
return 0;
|
2023-06-11 18:31:59 -03:00
|
|
|
case JUMP:
|
|
|
|
return 0;
|
|
|
|
case JUMP_NO_INTERRUPT:
|
|
|
|
return 0;
|
2023-06-02 07:46:18 -03:00
|
|
|
case ENTER_EXECUTOR:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_FALSE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_TRUE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_NOT_NONE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case POP_JUMP_IF_NONE:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case JUMP_BACKWARD_NO_INTERRUPT:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_LEN:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case MATCH_CLASS:
|
|
|
|
return 1;
|
|
|
|
case MATCH_MAPPING:
|
|
|
|
return 2;
|
|
|
|
case MATCH_SEQUENCE:
|
|
|
|
return 2;
|
|
|
|
case MATCH_KEYS:
|
|
|
|
return 3;
|
|
|
|
case GET_ITER:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case GET_YIELD_FROM_ITER:
|
2023-02-03 07:30:21 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_FOR_ITER:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_LIST:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_TUPLE:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_RANGE:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FOR_ITER_GEN:
|
2023-02-07 12:28:28 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BEFORE_ASYNC_WITH:
|
2023-01-31 14:47:50 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BEFORE_WITH:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case WITH_EXCEPT_START:
|
|
|
|
return 5;
|
2023-06-11 18:31:59 -03:00
|
|
|
case SETUP_FINALLY:
|
|
|
|
return 0;
|
|
|
|
case SETUP_CLEANUP:
|
|
|
|
return 0;
|
|
|
|
case SETUP_WITH:
|
|
|
|
return 0;
|
|
|
|
case POP_BLOCK:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case PUSH_EXC_INFO:
|
2023-02-01 15:38:06 -04:00
|
|
|
return 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_WITH_VALUES:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_NO_DICT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case LOAD_ATTR_METHOD_LAZY_DICT:
|
2023-02-01 14:56:52 -04:00
|
|
|
return ((oparg & 1) ? 1 : 0) + 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case KW_NAMES:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_CALL:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
|
|
|
case CALL_BOUND_METHOD_EXACT_ARGS:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_PY_EXACT_ARGS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_PY_WITH_DEFAULTS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_TYPE_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_STR_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_TUPLE_1:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_BUILTIN_CLASS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_BUILTIN_O:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_BUILTIN_FAST:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_BUILTIN_FAST_WITH_KEYWORDS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_LEN:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_ISINSTANCE:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_LIST_APPEND:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_O:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_NO_KW_METHOD_DESCRIPTOR_FAST:
|
2023-02-08 15:40:10 -04:00
|
|
|
return 1;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_CALL_FUNCTION_EX:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CALL_FUNCTION_EX:
|
2023-02-08 00:03:22 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case MAKE_FUNCTION:
|
2023-02-03 10:40:45 -04:00
|
|
|
return 1;
|
2023-06-13 05:51:05 -03:00
|
|
|
case SET_FUNCTION_ATTRIBUTE:
|
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case RETURN_GENERATOR:
|
2023-02-03 07:30:21 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BUILD_SLICE:
|
2023-02-03 10:40:45 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case FORMAT_VALUE:
|
2023-02-07 21:35:55 -04:00
|
|
|
return 1;
|
2023-01-25 16:41:03 -04:00
|
|
|
case COPY:
|
2023-02-06 18:45:18 -04:00
|
|
|
return (oparg-1) + 2;
|
2023-01-25 16:41:03 -04:00
|
|
|
case BINARY_OP:
|
|
|
|
return 1;
|
|
|
|
case SWAP:
|
2023-02-06 18:45:18 -04:00
|
|
|
return (oparg-2) + 2;
|
2023-04-12 08:04:55 -03:00
|
|
|
case INSTRUMENTED_INSTRUCTION:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_JUMP_FORWARD:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_JUMP_BACKWARD:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_TRUE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_FALSE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_NONE:
|
|
|
|
return 0;
|
|
|
|
case INSTRUMENTED_POP_JUMP_IF_NOT_NONE:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case EXTENDED_ARG:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
case CACHE:
|
2023-01-31 06:23:15 -04:00
|
|
|
return 0;
|
2023-04-12 08:04:55 -03:00
|
|
|
case RESERVED:
|
|
|
|
return 0;
|
2023-01-25 16:41:03 -04:00
|
|
|
default:
|
2023-02-08 20:23:19 -04:00
|
|
|
return -1;
|
2023-01-25 16:41:03 -04:00
|
|
|
}
|
|
|
|
}
|
2023-01-25 18:29:56 -04:00
|
|
|
#endif
|
2023-02-08 20:23:19 -04:00
|
|
|
|
2023-06-08 08:35:34 -03:00
|
|
|
enum InstructionFormat { INSTR_FMT_IB, INSTR_FMT_IBC, INSTR_FMT_IBC00, INSTR_FMT_IBC000, INSTR_FMT_IBC00000000, INSTR_FMT_IX, INSTR_FMT_IXC, INSTR_FMT_IXC000 };
|
2023-06-13 17:42:03 -03:00
|
|
|
#define HAS_ARG_FLAG (1)
|
|
|
|
#define HAS_CONST_FLAG (2)
|
|
|
|
#define HAS_NAME_FLAG (4)
|
|
|
|
#define OPCODE_HAS_ARG(OP) (_PyOpcode_opcode_metadata[(OP)].flags & (HAS_ARG_FLAG))
|
|
|
|
#define OPCODE_HAS_CONST(OP) (_PyOpcode_opcode_metadata[(OP)].flags & (HAS_CONST_FLAG))
|
|
|
|
#define OPCODE_HAS_NAME(OP) (_PyOpcode_opcode_metadata[(OP)].flags & (HAS_NAME_FLAG))
|
2023-01-25 16:41:03 -04:00
|
|
|
struct opcode_metadata {
|
2023-01-05 17:01:07 -04:00
|
|
|
bool valid_entry;
|
2023-01-09 19:53:01 -04:00
|
|
|
enum InstructionFormat instr_format;
|
2023-06-13 17:42:03 -03:00
|
|
|
int flags;
|
2023-02-08 20:23:19 -04:00
|
|
|
};
|
|
|
|
|
2023-06-11 18:31:59 -03:00
|
|
|
#define OPCODE_METADATA_FMT(OP) (_PyOpcode_opcode_metadata[(OP)].instr_format)
|
|
|
|
#define SAME_OPCODE_METADATA(OP1, OP2) \
|
|
|
|
(OPCODE_METADATA_FMT(OP1) == OPCODE_METADATA_FMT(OP2))
|
|
|
|
|
2023-03-31 14:17:59 -03:00
|
|
|
#ifndef NEED_OPCODE_METADATA
|
2023-06-11 18:31:59 -03:00
|
|
|
extern const struct opcode_metadata _PyOpcode_opcode_metadata[512];
|
2023-02-08 20:23:19 -04:00
|
|
|
#else
|
2023-06-11 18:31:59 -03:00
|
|
|
const struct opcode_metadata _PyOpcode_opcode_metadata[512] = {
|
2023-06-13 17:42:03 -03:00
|
|
|
[NOP] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[RESUME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_RESUME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_CLOSURE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_FAST_CHECK] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_FAST_AND_CLEAR] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_FAST_LOAD_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_CONST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
|
|
|
|
[STORE_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_FAST_MAYBE_NULL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_FAST_LOAD_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_FAST_STORE_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_TOP] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[PUSH_NULL] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[END_FOR] = { true, INSTR_FMT_IB, 0 },
|
|
|
|
[INSTRUMENTED_END_FOR] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[END_SEND] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[INSTRUMENTED_END_SEND] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[UNARY_NEGATIVE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[UNARY_NOT] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[UNARY_INVERT] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[BINARY_OP_MULTIPLY_INT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_ADD_INT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_SUBTRACT_INT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_MULTIPLY_FLOAT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_ADD_FLOAT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_SUBTRACT_FLOAT] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_ADD_UNICODE] = { true, INSTR_FMT_IBC, 0 },
|
|
|
|
[BINARY_OP_INPLACE_ADD_UNICODE] = { true, INSTR_FMT_IB, 0 },
|
|
|
|
[BINARY_SUBSCR] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[BINARY_SLICE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[STORE_SLICE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[BINARY_SUBSCR_LIST_INT] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[BINARY_SUBSCR_TUPLE_INT] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[BINARY_SUBSCR_DICT] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[BINARY_SUBSCR_GETITEM] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[LIST_APPEND] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[SET_ADD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_SUBSCR] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[STORE_SUBSCR_LIST_INT] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[STORE_SUBSCR_DICT] = { true, INSTR_FMT_IXC, 0 },
|
|
|
|
[DELETE_SUBSCR] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[CALL_INTRINSIC_1] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[CALL_INTRINSIC_2] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[RAISE_VARARGS] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INTERPRETER_EXIT] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[RETURN_VALUE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[INSTRUMENTED_RETURN_VALUE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[RETURN_CONST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
|
|
|
|
[INSTRUMENTED_RETURN_CONST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
|
|
|
|
[GET_AITER] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[GET_ANEXT] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[GET_AWAITABLE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[SEND] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[SEND_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_EXCEPT] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[RERAISE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[END_ASYNC_FOR] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[CLEANUP_THROW] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[LOAD_ASSERTION_ERROR] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[LOAD_BUILD_CLASS] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[STORE_NAME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[DELETE_NAME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[UNPACK_SEQUENCE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[UNPACK_SEQUENCE_TWO_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[UNPACK_SEQUENCE_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[UNPACK_SEQUENCE_LIST] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[UNPACK_EX] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_ATTR] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[DELETE_ATTR] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[STORE_GLOBAL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[DELETE_GLOBAL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_LOCALS] = { true, INSTR_FMT_IB, 0 },
|
|
|
|
[LOAD_NAME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_FROM_DICT_OR_GLOBALS] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_GLOBAL] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_GLOBAL_MODULE] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_GLOBAL_BUILTIN] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG },
|
|
|
|
[DELETE_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[MAKE_CELL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[DELETE_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_FROM_DICT_OR_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LOAD_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[STORE_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[COPY_FREE_VARS] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BUILD_STRING] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BUILD_TUPLE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BUILD_LIST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[LIST_EXTEND] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[SET_UPDATE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BUILD_SET] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BUILD_MAP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[SETUP_ANNOTATIONS] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[BUILD_CONST_KEY_MAP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[DICT_UPDATE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[DICT_MERGE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[MAP_ADD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_LOAD_SUPER_ATTR] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_SUPER_ATTR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_SUPER_METHOD] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_ZERO_SUPER_METHOD] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_ZERO_SUPER_ATTR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_SUPER_ATTR_ATTR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_SUPER_ATTR_METHOD] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_ATTR] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_METHOD] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_MODULE] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[LOAD_ATTR_SLOT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_CLASS] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_PROPERTY] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[STORE_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IXC000, 0 },
|
|
|
|
[STORE_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[STORE_ATTR_SLOT] = { true, INSTR_FMT_IXC000, 0 },
|
|
|
|
[COMPARE_OP] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[COMPARE_OP_FLOAT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[COMPARE_OP_INT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[COMPARE_OP_STR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[IS_OP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[CONTAINS_OP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[CHECK_EG_MATCH] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[CHECK_EXC_MATCH] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[IMPORT_NAME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[IMPORT_FROM] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG },
|
|
|
|
[JUMP_FORWARD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[JUMP_BACKWARD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[JUMP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[JUMP_NO_INTERRUPT] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[ENTER_EXECUTOR] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_JUMP_IF_FALSE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_JUMP_IF_TRUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_JUMP_IF_NOT_NONE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[POP_JUMP_IF_NONE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[JUMP_BACKWARD_NO_INTERRUPT] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[GET_LEN] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[MATCH_CLASS] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[MATCH_MAPPING] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[MATCH_SEQUENCE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[MATCH_KEYS] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[GET_ITER] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[GET_YIELD_FROM_ITER] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[FOR_ITER] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_FOR_ITER] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[FOR_ITER_LIST] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[FOR_ITER_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[FOR_ITER_RANGE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[FOR_ITER_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[BEFORE_ASYNC_WITH] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[BEFORE_WITH] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[WITH_EXCEPT_START] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[SETUP_FINALLY] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[SETUP_CLEANUP] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[SETUP_WITH] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[POP_BLOCK] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[PUSH_EXC_INFO] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[LOAD_ATTR_METHOD_WITH_VALUES] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_METHOD_NO_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[LOAD_ATTR_METHOD_LAZY_DICT] = { true, INSTR_FMT_IBC00000000, HAS_ARG_FLAG },
|
|
|
|
[KW_NAMES] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
|
|
|
|
[INSTRUMENTED_CALL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[CALL] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_BOUND_METHOD_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_PY_EXACT_ARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_PY_WITH_DEFAULTS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_TYPE_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_STR_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_TUPLE_1] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_BUILTIN_CLASS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_BUILTIN_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_BUILTIN_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_LEN] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_ISINSTANCE] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_LIST_APPEND] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_METHOD_DESCRIPTOR_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[CALL_NO_KW_METHOD_DESCRIPTOR_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_CALL_FUNCTION_EX] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[CALL_FUNCTION_EX] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[MAKE_FUNCTION] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[SET_FUNCTION_ATTRIBUTE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[RETURN_GENERATOR] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[BUILD_SLICE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[FORMAT_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[COPY] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[BINARY_OP] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
|
|
|
|
[SWAP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_INSTRUCTION] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[INSTRUMENTED_JUMP_FORWARD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_JUMP_BACKWARD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_POP_JUMP_IF_TRUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_POP_JUMP_IF_FALSE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_POP_JUMP_IF_NONE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[INSTRUMENTED_POP_JUMP_IF_NOT_NONE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[EXTENDED_ARG] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
|
|
|
|
[CACHE] = { true, INSTR_FMT_IX, 0 },
|
|
|
|
[RESERVED] = { true, INSTR_FMT_IX, 0 },
|
2023-01-05 17:01:07 -04:00
|
|
|
};
|
2023-02-08 20:23:19 -04:00
|
|
|
#endif
|