summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_genobject.h2
-rw-r--r--Include/internal/pycore_intrinsics.h5
-rw-r--r--Include/internal/pycore_opcode.h56
-rw-r--r--Include/opcode.h117
4 files changed, 90 insertions, 90 deletions
diff --git a/Include/internal/pycore_genobject.h b/Include/internal/pycore_genobject.h
index 42db0d8..dc60b4c 100644
--- a/Include/internal/pycore_genobject.h
+++ b/Include/internal/pycore_genobject.h
@@ -10,7 +10,7 @@ extern "C" {
extern PyObject *_PyGen_yf(PyGenObject *);
extern PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
-extern PyObject *_PyAsyncGenValueWrapperNew(PyObject *);
+extern PyObject *_PyAsyncGenValueWrapperNew(PyThreadState *state, PyObject *);
/* runtime lifecycle */
diff --git a/Include/internal/pycore_intrinsics.h b/Include/internal/pycore_intrinsics.h
index 92f06c7..1da618f 100644
--- a/Include/internal/pycore_intrinsics.h
+++ b/Include/internal/pycore_intrinsics.h
@@ -2,8 +2,11 @@
#define INTRINSIC_PRINT 1
#define INTRINSIC_IMPORT_STAR 2
#define INTRINSIC_STOPITERATION_ERROR 3
+#define INTRINSIC_ASYNC_GEN_WRAP 4
+#define INTRINSIC_UNARY_POSITIVE 5
+#define INTRINSIC_LIST_TO_TUPLE 6
-#define MAX_INTRINSIC_1 3
+#define MAX_INTRINSIC_1 6
typedef PyObject *(*instrinsic_func1)(PyThreadState* tstate, PyObject *value);
diff --git a/Include/internal/pycore_opcode.h b/Include/internal/pycore_opcode.h
index e952690..8fdf121 100644
--- a/Include/internal/pycore_opcode.h
+++ b/Include/internal/pycore_opcode.h
@@ -54,7 +54,6 @@ const uint8_t _PyOpcode_Caches[256] = {
};
const uint8_t _PyOpcode_Deopt[256] = {
- [ASYNC_GEN_WRAP] = ASYNC_GEN_WRAP,
[BEFORE_ASYNC_WITH] = BEFORE_ASYNC_WITH,
[BEFORE_WITH] = BEFORE_WITH,
[BINARY_OP] = BINARY_OP,
@@ -145,7 +144,6 @@ const uint8_t _PyOpcode_Deopt[256] = {
[KW_NAMES] = KW_NAMES,
[LIST_APPEND] = LIST_APPEND,
[LIST_EXTEND] = LIST_EXTEND,
- [LIST_TO_TUPLE] = LIST_TO_TUPLE,
[LOAD_ASSERTION_ERROR] = LOAD_ASSERTION_ERROR,
[LOAD_ATTR] = LOAD_ATTR,
[LOAD_ATTR_CLASS] = LOAD_ATTR,
@@ -216,7 +214,6 @@ const uint8_t _PyOpcode_Deopt[256] = {
[UNARY_INVERT] = UNARY_INVERT,
[UNARY_NEGATIVE] = UNARY_NEGATIVE,
[UNARY_NOT] = UNARY_NOT,
- [UNARY_POSITIVE] = UNARY_POSITIVE,
[UNPACK_EX] = UNPACK_EX,
[UNPACK_SEQUENCE] = UNPACK_SEQUENCE,
[UNPACK_SEQUENCE_LIST] = UNPACK_SEQUENCE,
@@ -239,13 +236,12 @@ static const char *const _PyOpcode_OpName[263] = {
[BINARY_OP_ADD_UNICODE] = "BINARY_OP_ADD_UNICODE",
[BINARY_OP_INPLACE_ADD_UNICODE] = "BINARY_OP_INPLACE_ADD_UNICODE",
[NOP] = "NOP",
- [UNARY_POSITIVE] = "UNARY_POSITIVE",
+ [BINARY_OP_MULTIPLY_FLOAT] = "BINARY_OP_MULTIPLY_FLOAT",
[UNARY_NEGATIVE] = "UNARY_NEGATIVE",
[UNARY_NOT] = "UNARY_NOT",
- [BINARY_OP_MULTIPLY_FLOAT] = "BINARY_OP_MULTIPLY_FLOAT",
[BINARY_OP_MULTIPLY_INT] = "BINARY_OP_MULTIPLY_INT",
- [UNARY_INVERT] = "UNARY_INVERT",
[BINARY_OP_SUBTRACT_FLOAT] = "BINARY_OP_SUBTRACT_FLOAT",
+ [UNARY_INVERT] = "UNARY_INVERT",
[BINARY_OP_SUBTRACT_INT] = "BINARY_OP_SUBTRACT_INT",
[BINARY_SUBSCR_DICT] = "BINARY_SUBSCR_DICT",
[BINARY_SUBSCR_GETITEM] = "BINARY_SUBSCR_GETITEM",
@@ -254,20 +250,20 @@ static const char *const _PyOpcode_OpName[263] = {
[CALL_PY_EXACT_ARGS] = "CALL_PY_EXACT_ARGS",
[CALL_PY_WITH_DEFAULTS] = "CALL_PY_WITH_DEFAULTS",
[CALL_BOUND_METHOD_EXACT_ARGS] = "CALL_BOUND_METHOD_EXACT_ARGS",
+ [CALL_BUILTIN_CLASS] = "CALL_BUILTIN_CLASS",
[BINARY_SUBSCR] = "BINARY_SUBSCR",
[BINARY_SLICE] = "BINARY_SLICE",
[STORE_SLICE] = "STORE_SLICE",
- [CALL_BUILTIN_CLASS] = "CALL_BUILTIN_CLASS",
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = "CALL_BUILTIN_FAST_WITH_KEYWORDS",
+ [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = "CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS",
[GET_LEN] = "GET_LEN",
[MATCH_MAPPING] = "MATCH_MAPPING",
[MATCH_SEQUENCE] = "MATCH_SEQUENCE",
[MATCH_KEYS] = "MATCH_KEYS",
- [CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS] = "CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS",
+ [CALL_NO_KW_BUILTIN_FAST] = "CALL_NO_KW_BUILTIN_FAST",
[PUSH_EXC_INFO] = "PUSH_EXC_INFO",
[CHECK_EXC_MATCH] = "CHECK_EXC_MATCH",
[CHECK_EG_MATCH] = "CHECK_EG_MATCH",
- [CALL_NO_KW_BUILTIN_FAST] = "CALL_NO_KW_BUILTIN_FAST",
[CALL_NO_KW_BUILTIN_O] = "CALL_NO_KW_BUILTIN_O",
[CALL_NO_KW_ISINSTANCE] = "CALL_NO_KW_ISINSTANCE",
[CALL_NO_KW_LEN] = "CALL_NO_KW_LEN",
@@ -278,6 +274,7 @@ static const char *const _PyOpcode_OpName[263] = {
[CALL_NO_KW_STR_1] = "CALL_NO_KW_STR_1",
[CALL_NO_KW_TUPLE_1] = "CALL_NO_KW_TUPLE_1",
[CALL_NO_KW_TYPE_1] = "CALL_NO_KW_TYPE_1",
+ [COMPARE_OP_FLOAT_JUMP] = "COMPARE_OP_FLOAT_JUMP",
[WITH_EXCEPT_START] = "WITH_EXCEPT_START",
[GET_AITER] = "GET_AITER",
[GET_ANEXT] = "GET_ANEXT",
@@ -285,38 +282,38 @@ static const char *const _PyOpcode_OpName[263] = {
[BEFORE_WITH] = "BEFORE_WITH",
[END_ASYNC_FOR] = "END_ASYNC_FOR",
[CLEANUP_THROW] = "CLEANUP_THROW",
- [COMPARE_OP_FLOAT_JUMP] = "COMPARE_OP_FLOAT_JUMP",
[COMPARE_OP_INT_JUMP] = "COMPARE_OP_INT_JUMP",
[COMPARE_OP_STR_JUMP] = "COMPARE_OP_STR_JUMP",
[FOR_ITER_LIST] = "FOR_ITER_LIST",
+ [FOR_ITER_TUPLE] = "FOR_ITER_TUPLE",
[STORE_SUBSCR] = "STORE_SUBSCR",
[DELETE_SUBSCR] = "DELETE_SUBSCR",
- [FOR_ITER_TUPLE] = "FOR_ITER_TUPLE",
[FOR_ITER_RANGE] = "FOR_ITER_RANGE",
[FOR_ITER_GEN] = "FOR_ITER_GEN",
[LOAD_ATTR_CLASS] = "LOAD_ATTR_CLASS",
[LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN] = "LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN",
[LOAD_ATTR_INSTANCE_VALUE] = "LOAD_ATTR_INSTANCE_VALUE",
+ [LOAD_ATTR_MODULE] = "LOAD_ATTR_MODULE",
[GET_ITER] = "GET_ITER",
[GET_YIELD_FROM_ITER] = "GET_YIELD_FROM_ITER",
- [LOAD_ATTR_MODULE] = "LOAD_ATTR_MODULE",
- [LOAD_BUILD_CLASS] = "LOAD_BUILD_CLASS",
[LOAD_ATTR_PROPERTY] = "LOAD_ATTR_PROPERTY",
+ [LOAD_BUILD_CLASS] = "LOAD_BUILD_CLASS",
[LOAD_ATTR_SLOT] = "LOAD_ATTR_SLOT",
+ [LOAD_ATTR_WITH_HINT] = "LOAD_ATTR_WITH_HINT",
[LOAD_ASSERTION_ERROR] = "LOAD_ASSERTION_ERROR",
[RETURN_GENERATOR] = "RETURN_GENERATOR",
- [LOAD_ATTR_WITH_HINT] = "LOAD_ATTR_WITH_HINT",
[LOAD_ATTR_METHOD_LAZY_DICT] = "LOAD_ATTR_METHOD_LAZY_DICT",
[LOAD_ATTR_METHOD_NO_DICT] = "LOAD_ATTR_METHOD_NO_DICT",
[LOAD_ATTR_METHOD_WITH_VALUES] = "LOAD_ATTR_METHOD_WITH_VALUES",
[LOAD_CONST__LOAD_FAST] = "LOAD_CONST__LOAD_FAST",
[LOAD_FAST__LOAD_CONST] = "LOAD_FAST__LOAD_CONST",
- [LIST_TO_TUPLE] = "LIST_TO_TUPLE",
- [RETURN_VALUE] = "RETURN_VALUE",
[LOAD_FAST__LOAD_FAST] = "LOAD_FAST__LOAD_FAST",
- [SETUP_ANNOTATIONS] = "SETUP_ANNOTATIONS",
[LOAD_GLOBAL_BUILTIN] = "LOAD_GLOBAL_BUILTIN",
- [ASYNC_GEN_WRAP] = "ASYNC_GEN_WRAP",
+ [RETURN_VALUE] = "RETURN_VALUE",
+ [LOAD_GLOBAL_MODULE] = "LOAD_GLOBAL_MODULE",
+ [SETUP_ANNOTATIONS] = "SETUP_ANNOTATIONS",
+ [STORE_ATTR_INSTANCE_VALUE] = "STORE_ATTR_INSTANCE_VALUE",
+ [STORE_ATTR_SLOT] = "STORE_ATTR_SLOT",
[PREP_RERAISE_STAR] = "PREP_RERAISE_STAR",
[POP_EXCEPT] = "POP_EXCEPT",
[STORE_NAME] = "STORE_NAME",
@@ -342,7 +339,7 @@ static const char *const _PyOpcode_OpName[263] = {
[JUMP_FORWARD] = "JUMP_FORWARD",
[JUMP_IF_FALSE_OR_POP] = "JUMP_IF_FALSE_OR_POP",
[JUMP_IF_TRUE_OR_POP] = "JUMP_IF_TRUE_OR_POP",
- [LOAD_GLOBAL_MODULE] = "LOAD_GLOBAL_MODULE",
+ [STORE_ATTR_WITH_HINT] = "STORE_ATTR_WITH_HINT",
[POP_JUMP_IF_FALSE] = "POP_JUMP_IF_FALSE",
[POP_JUMP_IF_TRUE] = "POP_JUMP_IF_TRUE",
[LOAD_GLOBAL] = "LOAD_GLOBAL",
@@ -350,7 +347,7 @@ static const char *const _PyOpcode_OpName[263] = {
[CONTAINS_OP] = "CONTAINS_OP",
[RERAISE] = "RERAISE",
[COPY] = "COPY",
- [STORE_ATTR_INSTANCE_VALUE] = "STORE_ATTR_INSTANCE_VALUE",
+ [STORE_FAST__LOAD_FAST] = "STORE_FAST__LOAD_FAST",
[BINARY_OP] = "BINARY_OP",
[SEND] = "SEND",
[LOAD_FAST] = "LOAD_FAST",
@@ -370,9 +367,9 @@ static const char *const _PyOpcode_OpName[263] = {
[STORE_DEREF] = "STORE_DEREF",
[DELETE_DEREF] = "DELETE_DEREF",
[JUMP_BACKWARD] = "JUMP_BACKWARD",
- [STORE_ATTR_SLOT] = "STORE_ATTR_SLOT",
+ [STORE_FAST__STORE_FAST] = "STORE_FAST__STORE_FAST",
[CALL_FUNCTION_EX] = "CALL_FUNCTION_EX",
- [STORE_ATTR_WITH_HINT] = "STORE_ATTR_WITH_HINT",
+ [STORE_SUBSCR_DICT] = "STORE_SUBSCR_DICT",
[EXTENDED_ARG] = "EXTENDED_ARG",
[LIST_APPEND] = "LIST_APPEND",
[SET_ADD] = "SET_ADD",
@@ -382,20 +379,20 @@ static const char *const _PyOpcode_OpName[263] = {
[YIELD_VALUE] = "YIELD_VALUE",
[RESUME] = "RESUME",
[MATCH_CLASS] = "MATCH_CLASS",
- [STORE_FAST__LOAD_FAST] = "STORE_FAST__LOAD_FAST",
- [STORE_FAST__STORE_FAST] = "STORE_FAST__STORE_FAST",
+ [STORE_SUBSCR_LIST_INT] = "STORE_SUBSCR_LIST_INT",
+ [UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
[FORMAT_VALUE] = "FORMAT_VALUE",
[BUILD_CONST_KEY_MAP] = "BUILD_CONST_KEY_MAP",
[BUILD_STRING] = "BUILD_STRING",
- [STORE_SUBSCR_DICT] = "STORE_SUBSCR_DICT",
- [STORE_SUBSCR_LIST_INT] = "STORE_SUBSCR_LIST_INT",
- [UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
[UNPACK_SEQUENCE_TUPLE] = "UNPACK_SEQUENCE_TUPLE",
+ [UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
+ [160] = "<160>",
+ [161] = "<161>",
[LIST_EXTEND] = "LIST_EXTEND",
[SET_UPDATE] = "SET_UPDATE",
[DICT_MERGE] = "DICT_MERGE",
[DICT_UPDATE] = "DICT_UPDATE",
- [UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
+ [166] = "<166>",
[167] = "<167>",
[168] = "<168>",
[169] = "<169>",
@@ -496,6 +493,9 @@ static const char *const _PyOpcode_OpName[263] = {
#endif
#define EXTRA_CASES \
+ case 160: \
+ case 161: \
+ case 166: \
case 167: \
case 168: \
case 169: \
diff --git a/Include/opcode.h b/Include/opcode.h
index 44b7725..fcc46a3 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -14,7 +14,6 @@ extern "C" {
#define INTERPRETER_EXIT 3
#define END_FOR 4
#define NOP 9
-#define UNARY_POSITIVE 10
#define UNARY_NEGATIVE 11
#define UNARY_NOT 12
#define UNARY_INVERT 15
@@ -42,10 +41,8 @@ extern "C" {
#define LOAD_BUILD_CLASS 71
#define LOAD_ASSERTION_ERROR 74
#define RETURN_GENERATOR 75
-#define LIST_TO_TUPLE 82
#define RETURN_VALUE 83
#define SETUP_ANNOTATIONS 85
-#define ASYNC_GEN_WRAP 87
#define PREP_RERAISE_STAR 88
#define POP_EXCEPT 89
#define HAVE_ARGUMENT 90
@@ -131,63 +128,63 @@ extern "C" {
#define BINARY_OP_ADD_INT 6
#define BINARY_OP_ADD_UNICODE 7
#define BINARY_OP_INPLACE_ADD_UNICODE 8
-#define BINARY_OP_MULTIPLY_FLOAT 13
-#define BINARY_OP_MULTIPLY_INT 14
-#define BINARY_OP_SUBTRACT_FLOAT 16
-#define BINARY_OP_SUBTRACT_INT 17
-#define BINARY_SUBSCR_DICT 18
-#define BINARY_SUBSCR_GETITEM 19
-#define BINARY_SUBSCR_LIST_INT 20
-#define BINARY_SUBSCR_TUPLE_INT 21
-#define CALL_PY_EXACT_ARGS 22
-#define CALL_PY_WITH_DEFAULTS 23
-#define CALL_BOUND_METHOD_EXACT_ARGS 24
-#define CALL_BUILTIN_CLASS 28
-#define CALL_BUILTIN_FAST_WITH_KEYWORDS 29
-#define CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 34
-#define CALL_NO_KW_BUILTIN_FAST 38
-#define CALL_NO_KW_BUILTIN_O 39
-#define CALL_NO_KW_ISINSTANCE 40
-#define CALL_NO_KW_LEN 41
-#define CALL_NO_KW_LIST_APPEND 42
-#define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 43
-#define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 44
-#define CALL_NO_KW_METHOD_DESCRIPTOR_O 45
-#define CALL_NO_KW_STR_1 46
-#define CALL_NO_KW_TUPLE_1 47
-#define CALL_NO_KW_TYPE_1 48
-#define COMPARE_OP_FLOAT_JUMP 56
-#define COMPARE_OP_INT_JUMP 57
-#define COMPARE_OP_STR_JUMP 58
-#define FOR_ITER_LIST 59
-#define FOR_ITER_TUPLE 62
-#define FOR_ITER_RANGE 63
-#define FOR_ITER_GEN 64
-#define LOAD_ATTR_CLASS 65
-#define LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN 66
-#define LOAD_ATTR_INSTANCE_VALUE 67
-#define LOAD_ATTR_MODULE 70
-#define LOAD_ATTR_PROPERTY 72
-#define LOAD_ATTR_SLOT 73
-#define LOAD_ATTR_WITH_HINT 76
-#define LOAD_ATTR_METHOD_LAZY_DICT 77
-#define LOAD_ATTR_METHOD_NO_DICT 78
-#define LOAD_ATTR_METHOD_WITH_VALUES 79
-#define LOAD_CONST__LOAD_FAST 80
-#define LOAD_FAST__LOAD_CONST 81
-#define LOAD_FAST__LOAD_FAST 84
-#define LOAD_GLOBAL_BUILTIN 86
-#define LOAD_GLOBAL_MODULE 113
-#define STORE_ATTR_INSTANCE_VALUE 121
-#define STORE_ATTR_SLOT 141
-#define STORE_ATTR_WITH_HINT 143
-#define STORE_FAST__LOAD_FAST 153
-#define STORE_FAST__STORE_FAST 154
-#define STORE_SUBSCR_DICT 158
-#define STORE_SUBSCR_LIST_INT 159
-#define UNPACK_SEQUENCE_LIST 160
-#define UNPACK_SEQUENCE_TUPLE 161
-#define UNPACK_SEQUENCE_TWO_TUPLE 166
+#define BINARY_OP_MULTIPLY_FLOAT 10
+#define BINARY_OP_MULTIPLY_INT 13
+#define BINARY_OP_SUBTRACT_FLOAT 14
+#define BINARY_OP_SUBTRACT_INT 16
+#define BINARY_SUBSCR_DICT 17
+#define BINARY_SUBSCR_GETITEM 18
+#define BINARY_SUBSCR_LIST_INT 19
+#define BINARY_SUBSCR_TUPLE_INT 20
+#define CALL_PY_EXACT_ARGS 21
+#define CALL_PY_WITH_DEFAULTS 22
+#define CALL_BOUND_METHOD_EXACT_ARGS 23
+#define CALL_BUILTIN_CLASS 24
+#define CALL_BUILTIN_FAST_WITH_KEYWORDS 28
+#define CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 29
+#define CALL_NO_KW_BUILTIN_FAST 34
+#define CALL_NO_KW_BUILTIN_O 38
+#define CALL_NO_KW_ISINSTANCE 39
+#define CALL_NO_KW_LEN 40
+#define CALL_NO_KW_LIST_APPEND 41
+#define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 42
+#define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 43
+#define CALL_NO_KW_METHOD_DESCRIPTOR_O 44
+#define CALL_NO_KW_STR_1 45
+#define CALL_NO_KW_TUPLE_1 46
+#define CALL_NO_KW_TYPE_1 47
+#define COMPARE_OP_FLOAT_JUMP 48
+#define COMPARE_OP_INT_JUMP 56
+#define COMPARE_OP_STR_JUMP 57
+#define FOR_ITER_LIST 58
+#define FOR_ITER_TUPLE 59
+#define FOR_ITER_RANGE 62
+#define FOR_ITER_GEN 63
+#define LOAD_ATTR_CLASS 64
+#define LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN 65
+#define LOAD_ATTR_INSTANCE_VALUE 66
+#define LOAD_ATTR_MODULE 67
+#define LOAD_ATTR_PROPERTY 70
+#define LOAD_ATTR_SLOT 72
+#define LOAD_ATTR_WITH_HINT 73
+#define LOAD_ATTR_METHOD_LAZY_DICT 76
+#define LOAD_ATTR_METHOD_NO_DICT 77
+#define LOAD_ATTR_METHOD_WITH_VALUES 78
+#define LOAD_CONST__LOAD_FAST 79
+#define LOAD_FAST__LOAD_CONST 80
+#define LOAD_FAST__LOAD_FAST 81
+#define LOAD_GLOBAL_BUILTIN 82
+#define LOAD_GLOBAL_MODULE 84
+#define STORE_ATTR_INSTANCE_VALUE 86
+#define STORE_ATTR_SLOT 87
+#define STORE_ATTR_WITH_HINT 113
+#define STORE_FAST__LOAD_FAST 121
+#define STORE_FAST__STORE_FAST 141
+#define STORE_SUBSCR_DICT 143
+#define STORE_SUBSCR_LIST_INT 153
+#define UNPACK_SEQUENCE_LIST 154
+#define UNPACK_SEQUENCE_TUPLE 158
+#define UNPACK_SEQUENCE_TWO_TUPLE 159
#define DO_TRACING 255
#define HAS_ARG(op) ((((op) >= HAVE_ARGUMENT) && (!IS_PSEUDO_OPCODE(op)))\