summaryrefslogtreecommitdiffstats
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorBrandt Bucher <brandt@python.org>2021-10-27 09:45:35 (GMT)
committerGitHub <noreply@github.com>2021-10-27 09:45:35 (GMT)
commit82a662e5216a9b3969054c540a759a9493468510 (patch)
tree51bf9b433828dfd6d58f172097cf06202b54df9a /Include/opcode.h
parent19a6c41e56f129a67e2a3c96464ba893a97236f7 (diff)
downloadcpython-82a662e5216a9b3969054c540a759a9493468510.zip
cpython-82a662e5216a9b3969054c540a759a9493468510.tar.gz
cpython-82a662e5216a9b3969054c540a759a9493468510.tar.bz2
bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922)
* Refactor mapping patterns and speed up class patterns. * Simplify MATCH_KEYS and MATCH_CLASS. * Add COPY opcode.
Diffstat (limited to 'Include/opcode.h')
-rw-r--r--Include/opcode.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index f8c02b8..87ed32c 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -34,7 +34,6 @@ extern "C" {
#define MATCH_MAPPING 31
#define MATCH_SEQUENCE 32
#define MATCH_KEYS 33
-#define COPY_DICT_WITHOUT_KEYS 34
#define PUSH_EXC_INFO 35
#define POP_EXCEPT_AND_RERAISE 37
#define WITH_EXCEPT_START 49
@@ -104,6 +103,7 @@ extern "C" {
#define IS_OP 117
#define CONTAINS_OP 118
#define RERAISE 119
+#define COPY 120
#define JUMP_IF_NOT_EXC_MATCH 121
#define LOAD_FAST 124
#define STORE_FAST 125
@@ -142,24 +142,24 @@ extern "C" {
#define BINARY_ADD_UNICODE 14
#define BINARY_ADD_UNICODE_INPLACE_FAST 18
#define BINARY_MULTIPLY_ADAPTIVE 21
-#define BINARY_MULTIPLY_INT 36
-#define BINARY_MULTIPLY_FLOAT 38
-#define BINARY_SUBSCR_ADAPTIVE 39
-#define BINARY_SUBSCR_LIST_INT 40
-#define BINARY_SUBSCR_TUPLE_INT 41
-#define BINARY_SUBSCR_DICT 42
-#define CALL_FUNCTION_ADAPTIVE 43
-#define CALL_FUNCTION_BUILTIN_O 44
-#define CALL_FUNCTION_BUILTIN_FAST 45
-#define CALL_FUNCTION_LEN 46
-#define CALL_FUNCTION_ISINSTANCE 47
-#define CALL_FUNCTION_PY_SIMPLE 48
-#define JUMP_ABSOLUTE_QUICK 58
-#define LOAD_ATTR_ADAPTIVE 80
-#define LOAD_ATTR_INSTANCE_VALUE 81
-#define LOAD_ATTR_WITH_HINT 87
-#define LOAD_ATTR_SLOT 88
-#define LOAD_ATTR_MODULE 120
+#define BINARY_MULTIPLY_INT 34
+#define BINARY_MULTIPLY_FLOAT 36
+#define BINARY_SUBSCR_ADAPTIVE 38
+#define BINARY_SUBSCR_LIST_INT 39
+#define BINARY_SUBSCR_TUPLE_INT 40
+#define BINARY_SUBSCR_DICT 41
+#define CALL_FUNCTION_ADAPTIVE 42
+#define CALL_FUNCTION_BUILTIN_O 43
+#define CALL_FUNCTION_BUILTIN_FAST 44
+#define CALL_FUNCTION_LEN 45
+#define CALL_FUNCTION_ISINSTANCE 46
+#define CALL_FUNCTION_PY_SIMPLE 47
+#define JUMP_ABSOLUTE_QUICK 48
+#define LOAD_ATTR_ADAPTIVE 58
+#define LOAD_ATTR_INSTANCE_VALUE 80
+#define LOAD_ATTR_WITH_HINT 81
+#define LOAD_ATTR_SLOT 87
+#define LOAD_ATTR_MODULE 88
#define LOAD_GLOBAL_ADAPTIVE 122
#define LOAD_GLOBAL_MODULE 123
#define LOAD_GLOBAL_BUILTIN 127