summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-10-03 22:37:21 (GMT)
committerGitHub <noreply@github.com>2023-10-03 22:37:21 (GMT)
commit625ecbe92eb69d2850c2e6dbe9538e9b1a098baa (patch)
tree95234975fc8ce7118483dc5ced844d5d4827fd1a /Include
parenta376a72bd92cd7c9930467dd1aba40045fb75e3b (diff)
downloadcpython-625ecbe92eb69d2850c2e6dbe9538e9b1a098baa.zip
cpython-625ecbe92eb69d2850c2e6dbe9538e9b1a098baa.tar.gz
cpython-625ecbe92eb69d2850c2e6dbe9538e9b1a098baa.tar.bz2
gh-109979: Unify _GUARD_TYPE_VERSION{,_STORE} (#110301)
Now the target for `DEOPT_IF()` is auto-filled, we don't need a separate `_GUARD_TYPE_VERSION_STORE` uop.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_opcode_metadata.h71
1 files changed, 32 insertions, 39 deletions
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index 16c1637..431a914 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -49,37 +49,36 @@
#define _LOAD_ATTR_SLOT 321
#define _GUARD_DORV_VALUES 322
#define _STORE_ATTR_INSTANCE_VALUE 323
-#define _GUARD_TYPE_VERSION_STORE 324
-#define _STORE_ATTR_SLOT 325
-#define _IS_NONE 326
-#define _ITER_CHECK_LIST 327
-#define _ITER_JUMP_LIST 328
-#define _IS_ITER_EXHAUSTED_LIST 329
-#define _ITER_NEXT_LIST 330
-#define _ITER_CHECK_TUPLE 331
-#define _ITER_JUMP_TUPLE 332
-#define _IS_ITER_EXHAUSTED_TUPLE 333
-#define _ITER_NEXT_TUPLE 334
-#define _ITER_CHECK_RANGE 335
-#define _ITER_JUMP_RANGE 336
-#define _IS_ITER_EXHAUSTED_RANGE 337
-#define _ITER_NEXT_RANGE 338
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 339
-#define _GUARD_KEYS_VERSION 340
-#define _LOAD_ATTR_METHOD_WITH_VALUES 341
-#define _LOAD_ATTR_METHOD_NO_DICT 342
-#define _CHECK_CALL_BOUND_METHOD_EXACT_ARGS 343
-#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 344
-#define _CHECK_PEP_523 345
-#define _CHECK_FUNCTION_EXACT_ARGS 346
-#define _CHECK_STACK_SPACE 347
-#define _INIT_CALL_PY_EXACT_ARGS 348
-#define _PUSH_FRAME 349
-#define _POP_JUMP_IF_FALSE 350
-#define _POP_JUMP_IF_TRUE 351
-#define _JUMP_TO_TOP 352
-#define _SAVE_CURRENT_IP 353
-#define _INSERT 354
+#define _STORE_ATTR_SLOT 324
+#define _IS_NONE 325
+#define _ITER_CHECK_LIST 326
+#define _ITER_JUMP_LIST 327
+#define _IS_ITER_EXHAUSTED_LIST 328
+#define _ITER_NEXT_LIST 329
+#define _ITER_CHECK_TUPLE 330
+#define _ITER_JUMP_TUPLE 331
+#define _IS_ITER_EXHAUSTED_TUPLE 332
+#define _ITER_NEXT_TUPLE 333
+#define _ITER_CHECK_RANGE 334
+#define _ITER_JUMP_RANGE 335
+#define _IS_ITER_EXHAUSTED_RANGE 336
+#define _ITER_NEXT_RANGE 337
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 338
+#define _GUARD_KEYS_VERSION 339
+#define _LOAD_ATTR_METHOD_WITH_VALUES 340
+#define _LOAD_ATTR_METHOD_NO_DICT 341
+#define _CHECK_CALL_BOUND_METHOD_EXACT_ARGS 342
+#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 343
+#define _CHECK_PEP_523 344
+#define _CHECK_FUNCTION_EXACT_ARGS 345
+#define _CHECK_STACK_SPACE 346
+#define _INIT_CALL_PY_EXACT_ARGS 347
+#define _PUSH_FRAME 348
+#define _POP_JUMP_IF_FALSE 349
+#define _POP_JUMP_IF_TRUE 350
+#define _JUMP_TO_TOP 351
+#define _SAVE_CURRENT_IP 352
+#define _INSERT 353
extern int _PyOpcode_num_popped(int opcode, int oparg, bool jump);
#ifdef NEED_OPCODE_METADATA
@@ -383,8 +382,6 @@ int _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
return 2;
case STORE_ATTR_WITH_HINT:
return 2;
- case _GUARD_TYPE_VERSION_STORE:
- return 1;
case _STORE_ATTR_SLOT:
return 2;
case STORE_ATTR_SLOT:
@@ -941,8 +938,6 @@ int _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
return 0;
case STORE_ATTR_WITH_HINT:
return 0;
- case _GUARD_TYPE_VERSION_STORE:
- return 1;
case _STORE_ATTR_SLOT:
return 0;
case STORE_ATTR_SLOT:
@@ -1413,7 +1408,6 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[OPCODE_METADATA_SIZE] = {
[_STORE_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IXC, 0 },
[STORE_ATTR_INSTANCE_VALUE] = { true, INSTR_FMT_IXC000, HAS_DEOPT_FLAG },
[STORE_ATTR_WITH_HINT] = { true, INSTR_FMT_IBC000, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG },
- [_GUARD_TYPE_VERSION_STORE] = { true, INSTR_FMT_IXC0, HAS_DEOPT_FLAG },
[_STORE_ATTR_SLOT] = { true, INSTR_FMT_IXC, 0 },
[STORE_ATTR_SLOT] = { true, INSTR_FMT_IXC000, HAS_DEOPT_FLAG },
[COMPARE_OP] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_ERROR_FLAG },
@@ -1638,8 +1632,8 @@ const struct opcode_macro_expansion _PyOpcode_macro_expansion[OPCODE_MACRO_EXPAN
[LOAD_ATTR] = { .nuops = 1, .uops = { { LOAD_ATTR, 0, 0 } } },
[LOAD_ATTR_INSTANCE_VALUE] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_MANAGED_OBJECT_HAS_VALUES, 0, 0 }, { _LOAD_ATTR_INSTANCE_VALUE, 1, 3 } } },
[LOAD_ATTR_SLOT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_SLOT, 1, 3 } } },
- [STORE_ATTR_INSTANCE_VALUE] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION_STORE, 2, 1 }, { _GUARD_DORV_VALUES, 0, 0 }, { _STORE_ATTR_INSTANCE_VALUE, 1, 3 } } },
- [STORE_ATTR_SLOT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION_STORE, 2, 1 }, { _STORE_ATTR_SLOT, 1, 3 } } },
+ [STORE_ATTR_INSTANCE_VALUE] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES, 0, 0 }, { _STORE_ATTR_INSTANCE_VALUE, 1, 3 } } },
+ [STORE_ATTR_SLOT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _STORE_ATTR_SLOT, 1, 3 } } },
[COMPARE_OP] = { .nuops = 1, .uops = { { COMPARE_OP, 0, 0 } } },
[COMPARE_OP_FLOAT] = { .nuops = 1, .uops = { { COMPARE_OP_FLOAT, 0, 0 } } },
[COMPARE_OP_INT] = { .nuops = 1, .uops = { { COMPARE_OP_INT, 0, 0 } } },
@@ -1714,7 +1708,6 @@ const char * const _PyOpcode_uop_name[OPCODE_UOP_NAME_SIZE] = {
[_LOAD_ATTR_SLOT] = "_LOAD_ATTR_SLOT",
[_GUARD_DORV_VALUES] = "_GUARD_DORV_VALUES",
[_STORE_ATTR_INSTANCE_VALUE] = "_STORE_ATTR_INSTANCE_VALUE",
- [_GUARD_TYPE_VERSION_STORE] = "_GUARD_TYPE_VERSION_STORE",
[_STORE_ATTR_SLOT] = "_STORE_ATTR_SLOT",
[_IS_NONE] = "_IS_NONE",
[_ITER_CHECK_LIST] = "_ITER_CHECK_LIST",