summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorKen Jin <kenjin@python.org>2024-02-20 11:30:49 (GMT)
committerGitHub <noreply@github.com>2024-02-20 11:30:49 (GMT)
commitdcba21f905ef170b2cd0a6433b6fe6bcb4316a67 (patch)
tree8b883ade9f3d2778b742545073dc9d959d594ff5 /Include
parenta2bb8ad14409c7ecb8dea437b0e281eb1f65b5d8 (diff)
downloadcpython-dcba21f905ef170b2cd0a6433b6fe6bcb4316a67.zip
cpython-dcba21f905ef170b2cd0a6433b6fe6bcb4316a67.tar.gz
cpython-dcba21f905ef170b2cd0a6433b6fe6bcb4316a67.tar.bz2
gh-115687: Split up guards from COMPARE_OP (GH-115688)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_opcode_metadata.h12
-rw-r--r--Include/internal/pycore_uop_ids.h194
-rw-r--r--Include/internal/pycore_uop_metadata.h4
3 files changed, 105 insertions, 105 deletions
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index f45e5f1..ab34366 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -999,9 +999,9 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[268] = {
[CHECK_EXC_MATCH] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[CLEANUP_THROW] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[COMPARE_OP] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [COMPARE_OP_FLOAT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
- [COMPARE_OP_INT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
- [COMPARE_OP_STR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG },
+ [COMPARE_OP_FLOAT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [COMPARE_OP_INT] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
+ [COMPARE_OP_STR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_ESCAPES_FLAG },
[CONTAINS_OP] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[CONVERT_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG },
[COPY] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_PURE_FLAG },
@@ -1221,9 +1221,9 @@ _PyOpcode_macro_expansion[256] = {
[CHECK_EG_MATCH] = { .nuops = 1, .uops = { { _CHECK_EG_MATCH, 0, 0 } } },
[CHECK_EXC_MATCH] = { .nuops = 1, .uops = { { _CHECK_EXC_MATCH, 0, 0 } } },
[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 } } },
- [COMPARE_OP_STR] = { .nuops = 1, .uops = { { _COMPARE_OP_STR, 0, 0 } } },
+ [COMPARE_OP_FLOAT] = { .nuops = 2, .uops = { { _GUARD_BOTH_FLOAT, 0, 0 }, { _COMPARE_OP_FLOAT, 0, 0 } } },
+ [COMPARE_OP_INT] = { .nuops = 2, .uops = { { _GUARD_BOTH_INT, 0, 0 }, { _COMPARE_OP_INT, 0, 0 } } },
+ [COMPARE_OP_STR] = { .nuops = 2, .uops = { { _GUARD_BOTH_UNICODE, 0, 0 }, { _COMPARE_OP_STR, 0, 0 } } },
[CONTAINS_OP] = { .nuops = 1, .uops = { { _CONTAINS_OP, 0, 0 } } },
[CONVERT_VALUE] = { .nuops = 1, .uops = { { _CONVERT_VALUE, 0, 0 } } },
[COPY] = { .nuops = 1, .uops = { { _COPY, 0, 0 } } },
diff --git a/Include/internal/pycore_uop_ids.h b/Include/internal/pycore_uop_ids.h
index e098852..3c133d9 100644
--- a/Include/internal/pycore_uop_ids.h
+++ b/Include/internal/pycore_uop_ids.h
@@ -72,9 +72,9 @@ extern "C" {
#define _CHECK_VALIDITY_AND_SET_IP 324
#define _COLD_EXIT 325
#define _COMPARE_OP 326
-#define _COMPARE_OP_FLOAT COMPARE_OP_FLOAT
-#define _COMPARE_OP_INT COMPARE_OP_INT
-#define _COMPARE_OP_STR COMPARE_OP_STR
+#define _COMPARE_OP_FLOAT 327
+#define _COMPARE_OP_INT 328
+#define _COMPARE_OP_STR 329
#define _CONTAINS_OP CONTAINS_OP
#define _CONVERT_VALUE CONVERT_VALUE
#define _COPY COPY
@@ -89,41 +89,41 @@ extern "C" {
#define _DICT_UPDATE DICT_UPDATE
#define _END_SEND END_SEND
#define _EXIT_INIT_CHECK EXIT_INIT_CHECK
-#define _FATAL_ERROR 327
+#define _FATAL_ERROR 330
#define _FORMAT_SIMPLE FORMAT_SIMPLE
#define _FORMAT_WITH_SPEC FORMAT_WITH_SPEC
-#define _FOR_ITER 328
+#define _FOR_ITER 331
#define _FOR_ITER_GEN FOR_ITER_GEN
-#define _FOR_ITER_TIER_TWO 329
+#define _FOR_ITER_TIER_TWO 332
#define _GET_AITER GET_AITER
#define _GET_ANEXT GET_ANEXT
#define _GET_AWAITABLE GET_AWAITABLE
#define _GET_ITER GET_ITER
#define _GET_LEN GET_LEN
#define _GET_YIELD_FROM_ITER GET_YIELD_FROM_ITER
-#define _GUARD_BOTH_FLOAT 330
-#define _GUARD_BOTH_INT 331
-#define _GUARD_BOTH_UNICODE 332
-#define _GUARD_BUILTINS_VERSION 333
-#define _GUARD_DORV_VALUES 334
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 335
-#define _GUARD_GLOBALS_VERSION 336
-#define _GUARD_IS_FALSE_POP 337
-#define _GUARD_IS_NONE_POP 338
-#define _GUARD_IS_NOT_NONE_POP 339
-#define _GUARD_IS_TRUE_POP 340
-#define _GUARD_KEYS_VERSION 341
-#define _GUARD_NOT_EXHAUSTED_LIST 342
-#define _GUARD_NOT_EXHAUSTED_RANGE 343
-#define _GUARD_NOT_EXHAUSTED_TUPLE 344
-#define _GUARD_TYPE_VERSION 345
-#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 346
-#define _INIT_CALL_PY_EXACT_ARGS 347
-#define _INIT_CALL_PY_EXACT_ARGS_0 348
-#define _INIT_CALL_PY_EXACT_ARGS_1 349
-#define _INIT_CALL_PY_EXACT_ARGS_2 350
-#define _INIT_CALL_PY_EXACT_ARGS_3 351
-#define _INIT_CALL_PY_EXACT_ARGS_4 352
+#define _GUARD_BOTH_FLOAT 333
+#define _GUARD_BOTH_INT 334
+#define _GUARD_BOTH_UNICODE 335
+#define _GUARD_BUILTINS_VERSION 336
+#define _GUARD_DORV_VALUES 337
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 338
+#define _GUARD_GLOBALS_VERSION 339
+#define _GUARD_IS_FALSE_POP 340
+#define _GUARD_IS_NONE_POP 341
+#define _GUARD_IS_NOT_NONE_POP 342
+#define _GUARD_IS_TRUE_POP 343
+#define _GUARD_KEYS_VERSION 344
+#define _GUARD_NOT_EXHAUSTED_LIST 345
+#define _GUARD_NOT_EXHAUSTED_RANGE 346
+#define _GUARD_NOT_EXHAUSTED_TUPLE 347
+#define _GUARD_TYPE_VERSION 348
+#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 349
+#define _INIT_CALL_PY_EXACT_ARGS 350
+#define _INIT_CALL_PY_EXACT_ARGS_0 351
+#define _INIT_CALL_PY_EXACT_ARGS_1 352
+#define _INIT_CALL_PY_EXACT_ARGS_2 353
+#define _INIT_CALL_PY_EXACT_ARGS_3 354
+#define _INIT_CALL_PY_EXACT_ARGS_4 355
#define _INSTRUMENTED_CALL INSTRUMENTED_CALL
#define _INSTRUMENTED_CALL_FUNCTION_EX INSTRUMENTED_CALL_FUNCTION_EX
#define _INSTRUMENTED_CALL_KW INSTRUMENTED_CALL_KW
@@ -140,65 +140,65 @@ extern "C" {
#define _INSTRUMENTED_RETURN_CONST INSTRUMENTED_RETURN_CONST
#define _INSTRUMENTED_RETURN_VALUE INSTRUMENTED_RETURN_VALUE
#define _INSTRUMENTED_YIELD_VALUE INSTRUMENTED_YIELD_VALUE
-#define _INTERNAL_INCREMENT_OPT_COUNTER 353
-#define _IS_NONE 354
+#define _INTERNAL_INCREMENT_OPT_COUNTER 356
+#define _IS_NONE 357
#define _IS_OP IS_OP
-#define _ITER_CHECK_LIST 355
-#define _ITER_CHECK_RANGE 356
-#define _ITER_CHECK_TUPLE 357
-#define _ITER_JUMP_LIST 358
-#define _ITER_JUMP_RANGE 359
-#define _ITER_JUMP_TUPLE 360
-#define _ITER_NEXT_LIST 361
-#define _ITER_NEXT_RANGE 362
-#define _ITER_NEXT_TUPLE 363
-#define _JUMP_TO_TOP 364
+#define _ITER_CHECK_LIST 358
+#define _ITER_CHECK_RANGE 359
+#define _ITER_CHECK_TUPLE 360
+#define _ITER_JUMP_LIST 361
+#define _ITER_JUMP_RANGE 362
+#define _ITER_JUMP_TUPLE 363
+#define _ITER_NEXT_LIST 364
+#define _ITER_NEXT_RANGE 365
+#define _ITER_NEXT_TUPLE 366
+#define _JUMP_TO_TOP 367
#define _LIST_APPEND LIST_APPEND
#define _LIST_EXTEND LIST_EXTEND
#define _LOAD_ASSERTION_ERROR LOAD_ASSERTION_ERROR
-#define _LOAD_ATTR 365
-#define _LOAD_ATTR_CLASS 366
-#define _LOAD_ATTR_CLASS_0 367
-#define _LOAD_ATTR_CLASS_1 368
+#define _LOAD_ATTR 368
+#define _LOAD_ATTR_CLASS 369
+#define _LOAD_ATTR_CLASS_0 370
+#define _LOAD_ATTR_CLASS_1 371
#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
-#define _LOAD_ATTR_INSTANCE_VALUE 369
-#define _LOAD_ATTR_INSTANCE_VALUE_0 370
-#define _LOAD_ATTR_INSTANCE_VALUE_1 371
-#define _LOAD_ATTR_METHOD_LAZY_DICT 372
-#define _LOAD_ATTR_METHOD_NO_DICT 373
-#define _LOAD_ATTR_METHOD_WITH_VALUES 374
-#define _LOAD_ATTR_MODULE 375
-#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 376
-#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 377
+#define _LOAD_ATTR_INSTANCE_VALUE 372
+#define _LOAD_ATTR_INSTANCE_VALUE_0 373
+#define _LOAD_ATTR_INSTANCE_VALUE_1 374
+#define _LOAD_ATTR_METHOD_LAZY_DICT 375
+#define _LOAD_ATTR_METHOD_NO_DICT 376
+#define _LOAD_ATTR_METHOD_WITH_VALUES 377
+#define _LOAD_ATTR_MODULE 378
+#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 379
+#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 380
#define _LOAD_ATTR_PROPERTY LOAD_ATTR_PROPERTY
-#define _LOAD_ATTR_SLOT 378
-#define _LOAD_ATTR_SLOT_0 379
-#define _LOAD_ATTR_SLOT_1 380
-#define _LOAD_ATTR_WITH_HINT 381
+#define _LOAD_ATTR_SLOT 381
+#define _LOAD_ATTR_SLOT_0 382
+#define _LOAD_ATTR_SLOT_1 383
+#define _LOAD_ATTR_WITH_HINT 384
#define _LOAD_BUILD_CLASS LOAD_BUILD_CLASS
#define _LOAD_CONST LOAD_CONST
-#define _LOAD_CONST_INLINE 382
-#define _LOAD_CONST_INLINE_BORROW 383
-#define _LOAD_CONST_INLINE_BORROW_WITH_NULL 384
-#define _LOAD_CONST_INLINE_WITH_NULL 385
+#define _LOAD_CONST_INLINE 385
+#define _LOAD_CONST_INLINE_BORROW 386
+#define _LOAD_CONST_INLINE_BORROW_WITH_NULL 387
+#define _LOAD_CONST_INLINE_WITH_NULL 388
#define _LOAD_DEREF LOAD_DEREF
-#define _LOAD_FAST 386
-#define _LOAD_FAST_0 387
-#define _LOAD_FAST_1 388
-#define _LOAD_FAST_2 389
-#define _LOAD_FAST_3 390
-#define _LOAD_FAST_4 391
-#define _LOAD_FAST_5 392
-#define _LOAD_FAST_6 393
-#define _LOAD_FAST_7 394
+#define _LOAD_FAST 389
+#define _LOAD_FAST_0 390
+#define _LOAD_FAST_1 391
+#define _LOAD_FAST_2 392
+#define _LOAD_FAST_3 393
+#define _LOAD_FAST_4 394
+#define _LOAD_FAST_5 395
+#define _LOAD_FAST_6 396
+#define _LOAD_FAST_7 397
#define _LOAD_FAST_AND_CLEAR LOAD_FAST_AND_CLEAR
#define _LOAD_FAST_CHECK LOAD_FAST_CHECK
#define _LOAD_FAST_LOAD_FAST LOAD_FAST_LOAD_FAST
#define _LOAD_FROM_DICT_OR_DEREF LOAD_FROM_DICT_OR_DEREF
#define _LOAD_FROM_DICT_OR_GLOBALS LOAD_FROM_DICT_OR_GLOBALS
-#define _LOAD_GLOBAL 395
-#define _LOAD_GLOBAL_BUILTINS 396
-#define _LOAD_GLOBAL_MODULE 397
+#define _LOAD_GLOBAL 398
+#define _LOAD_GLOBAL_BUILTINS 399
+#define _LOAD_GLOBAL_MODULE 400
#define _LOAD_LOCALS LOAD_LOCALS
#define _LOAD_NAME LOAD_NAME
#define _LOAD_SUPER_ATTR_ATTR LOAD_SUPER_ATTR_ATTR
@@ -212,46 +212,46 @@ extern "C" {
#define _MATCH_SEQUENCE MATCH_SEQUENCE
#define _NOP NOP
#define _POP_EXCEPT POP_EXCEPT
-#define _POP_FRAME 398
-#define _POP_JUMP_IF_FALSE 399
-#define _POP_JUMP_IF_TRUE 400
+#define _POP_FRAME 401
+#define _POP_JUMP_IF_FALSE 402
+#define _POP_JUMP_IF_TRUE 403
#define _POP_TOP POP_TOP
#define _PUSH_EXC_INFO PUSH_EXC_INFO
-#define _PUSH_FRAME 401
+#define _PUSH_FRAME 404
#define _PUSH_NULL PUSH_NULL
#define _RESUME_CHECK RESUME_CHECK
-#define _SAVE_RETURN_OFFSET 402
-#define _SEND 403
+#define _SAVE_RETURN_OFFSET 405
+#define _SEND 406
#define _SEND_GEN SEND_GEN
#define _SETUP_ANNOTATIONS SETUP_ANNOTATIONS
#define _SET_ADD SET_ADD
#define _SET_FUNCTION_ATTRIBUTE SET_FUNCTION_ATTRIBUTE
#define _SET_UPDATE SET_UPDATE
-#define _START_EXECUTOR 404
-#define _STORE_ATTR 405
-#define _STORE_ATTR_INSTANCE_VALUE 406
-#define _STORE_ATTR_SLOT 407
+#define _START_EXECUTOR 407
+#define _STORE_ATTR 408
+#define _STORE_ATTR_INSTANCE_VALUE 409
+#define _STORE_ATTR_SLOT 410
#define _STORE_ATTR_WITH_HINT STORE_ATTR_WITH_HINT
#define _STORE_DEREF STORE_DEREF
-#define _STORE_FAST 408
-#define _STORE_FAST_0 409
-#define _STORE_FAST_1 410
-#define _STORE_FAST_2 411
-#define _STORE_FAST_3 412
-#define _STORE_FAST_4 413
-#define _STORE_FAST_5 414
-#define _STORE_FAST_6 415
-#define _STORE_FAST_7 416
+#define _STORE_FAST 411
+#define _STORE_FAST_0 412
+#define _STORE_FAST_1 413
+#define _STORE_FAST_2 414
+#define _STORE_FAST_3 415
+#define _STORE_FAST_4 416
+#define _STORE_FAST_5 417
+#define _STORE_FAST_6 418
+#define _STORE_FAST_7 419
#define _STORE_FAST_LOAD_FAST STORE_FAST_LOAD_FAST
#define _STORE_FAST_STORE_FAST STORE_FAST_STORE_FAST
#define _STORE_GLOBAL STORE_GLOBAL
#define _STORE_NAME STORE_NAME
#define _STORE_SLICE STORE_SLICE
-#define _STORE_SUBSCR 417
+#define _STORE_SUBSCR 420
#define _STORE_SUBSCR_DICT STORE_SUBSCR_DICT
#define _STORE_SUBSCR_LIST_INT STORE_SUBSCR_LIST_INT
#define _SWAP SWAP
-#define _TO_BOOL 418
+#define _TO_BOOL 421
#define _TO_BOOL_ALWAYS_TRUE TO_BOOL_ALWAYS_TRUE
#define _TO_BOOL_BOOL TO_BOOL_BOOL
#define _TO_BOOL_INT TO_BOOL_INT
@@ -262,12 +262,12 @@ extern "C" {
#define _UNARY_NEGATIVE UNARY_NEGATIVE
#define _UNARY_NOT UNARY_NOT
#define _UNPACK_EX UNPACK_EX
-#define _UNPACK_SEQUENCE 419
+#define _UNPACK_SEQUENCE 422
#define _UNPACK_SEQUENCE_LIST UNPACK_SEQUENCE_LIST
#define _UNPACK_SEQUENCE_TUPLE UNPACK_SEQUENCE_TUPLE
#define _UNPACK_SEQUENCE_TWO_TUPLE UNPACK_SEQUENCE_TWO_TUPLE
#define _WITH_EXCEPT_START WITH_EXCEPT_START
-#define MAX_UOP_ID 419
+#define MAX_UOP_ID 422
#ifdef __cplusplus
}
diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h
index c9def0e..35340fe 100644
--- a/Include/internal/pycore_uop_metadata.h
+++ b/Include/internal/pycore_uop_metadata.h
@@ -149,9 +149,9 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_STORE_ATTR_INSTANCE_VALUE] = HAS_ESCAPES_FLAG,
[_STORE_ATTR_SLOT] = HAS_ESCAPES_FLAG,
[_COMPARE_OP] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
- [_COMPARE_OP_FLOAT] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
+ [_COMPARE_OP_FLOAT] = HAS_ARG_FLAG | HAS_ESCAPES_FLAG,
[_COMPARE_OP_INT] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
- [_COMPARE_OP_STR] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
+ [_COMPARE_OP_STR] = HAS_ARG_FLAG | HAS_ESCAPES_FLAG,
[_IS_OP] = HAS_ARG_FLAG,
[_CONTAINS_OP] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_CHECK_EG_MATCH] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,