summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-08-14 11:04:05 (GMT)
committerGitHub <noreply@github.com>2024-08-14 11:04:05 (GMT)
commiteec7bdaf01a5c1f89265565876964c825ea334fc (patch)
tree1a7b9c7a1631c0dad9cbf7304c1355dc19b65fdb /Include
parent315a933a5b3ae4379077096b6852f85a81a7d75f (diff)
downloadcpython-eec7bdaf01a5c1f89265565876964c825ea334fc.zip
cpython-eec7bdaf01a5c1f89265565876964c825ea334fc.tar.gz
cpython-eec7bdaf01a5c1f89265565876964c825ea334fc.tar.bz2
GH-120024: Remove `CHECK_EVAL_BREAKER` macro. (GH-122968)
* Factor some instructions into micro-ops to isolate CHECK_EVAL_BREAKER for escape analysis * Eliminate CHECK_EVAL_BREAKER macro
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_opcode_metadata.h14
-rw-r--r--Include/internal/pycore_uop_ids.h252
-rw-r--r--Include/internal/pycore_uop_metadata.h10
-rw-r--r--Include/opcode_ids.h37
4 files changed, 163 insertions, 150 deletions
diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index c056ff1..c3cdbc3 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -469,6 +469,8 @@ int _PyOpcode_num_popped(int opcode, int oparg) {
return 5;
case YIELD_VALUE:
return 1;
+ case _DO_CALL_FUNCTION_EX:
+ return 3 + (oparg & 1);
default:
return -1;
}
@@ -916,6 +918,8 @@ int _PyOpcode_num_pushed(int opcode, int oparg) {
return 6;
case YIELD_VALUE:
return 1;
+ case _DO_CALL_FUNCTION_EX:
+ return 1;
default:
return -1;
}
@@ -1085,7 +1089,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[264] = {
[INSTRUMENTED_END_SEND] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG },
[INSTRUMENTED_FOR_ITER] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[INSTRUMENTED_INSTRUCTION] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
- [INSTRUMENTED_JUMP_BACKWARD] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG },
+ [INSTRUMENTED_JUMP_BACKWARD] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[INSTRUMENTED_JUMP_FORWARD] = { true, INSTR_FMT_IB, HAS_ARG_FLAG },
[INSTRUMENTED_LINE] = { true, INSTR_FMT_IX, HAS_ESCAPES_FLAG },
[INSTRUMENTED_LOAD_SUPER_ATTR] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG },
@@ -1155,7 +1159,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[264] = {
[RAISE_VARARGS] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[RERAISE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[RESERVED] = { true, INSTR_FMT_IX, 0 },
- [RESUME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
+ [RESUME] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[RESUME_CHECK] = { true, INSTR_FMT_IX, HAS_DEOPT_FLAG },
[RETURN_CONST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_CONST_FLAG },
[RETURN_GENERATOR] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
@@ -1198,6 +1202,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[264] = {
[UNPACK_SEQUENCE_TWO_TUPLE] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG | HAS_DEOPT_FLAG },
[WITH_EXCEPT_START] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ESCAPES_FLAG },
+ [_DO_CALL_FUNCTION_EX] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
[JUMP] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
[JUMP_NO_INTERRUPT] = { true, -1, HAS_ARG_FLAG | HAS_JUMP_FLAG },
[LOAD_CLOSURE] = { true, -1, HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_PURE_FLAG },
@@ -1613,13 +1618,13 @@ const char *_PyOpcode_OpName[264] = {
[UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
[WITH_EXCEPT_START] = "WITH_EXCEPT_START",
[YIELD_VALUE] = "YIELD_VALUE",
+ [_DO_CALL_FUNCTION_EX] = "_DO_CALL_FUNCTION_EX",
};
#endif
extern const uint8_t _PyOpcode_Caches[256];
#ifdef NEED_OPCODE_METADATA
const uint8_t _PyOpcode_Caches[256] = {
- [JUMP_BACKWARD] = 1,
[TO_BOOL] = 3,
[BINARY_SUBSCR] = 1,
[STORE_SUBSCR] = 1,
@@ -1631,6 +1636,7 @@ const uint8_t _PyOpcode_Caches[256] = {
[LOAD_ATTR] = 9,
[COMPARE_OP] = 1,
[CONTAINS_OP] = 1,
+ [JUMP_BACKWARD] = 1,
[POP_JUMP_IF_TRUE] = 1,
[POP_JUMP_IF_FALSE] = 1,
[POP_JUMP_IF_NONE] = 1,
@@ -1854,12 +1860,12 @@ const uint8_t _PyOpcode_Deopt[256] = {
[UNPACK_SEQUENCE_TWO_TUPLE] = UNPACK_SEQUENCE,
[WITH_EXCEPT_START] = WITH_EXCEPT_START,
[YIELD_VALUE] = YIELD_VALUE,
+ [_DO_CALL_FUNCTION_EX] = _DO_CALL_FUNCTION_EX,
};
#endif // NEED_OPCODE_METADATA
#define EXTRA_CASES \
- case 116: \
case 117: \
case 118: \
case 119: \
diff --git a/Include/internal/pycore_uop_ids.h b/Include/internal/pycore_uop_ids.h
index 27d7f96..74c7cc9 100644
--- a/Include/internal/pycore_uop_ids.h
+++ b/Include/internal/pycore_uop_ids.h
@@ -39,11 +39,9 @@ extern "C" {
#define _CALL_BUILTIN_FAST 315
#define _CALL_BUILTIN_FAST_WITH_KEYWORDS 316
#define _CALL_BUILTIN_O 317
-#define _CALL_FUNCTION_EX CALL_FUNCTION_EX
#define _CALL_INTRINSIC_1 CALL_INTRINSIC_1
#define _CALL_INTRINSIC_2 CALL_INTRINSIC_2
#define _CALL_ISINSTANCE CALL_ISINSTANCE
-#define _CALL_KW CALL_KW
#define _CALL_LEN CALL_LEN
#define _CALL_LIST_APPEND CALL_LIST_APPEND
#define _CALL_METHOD_DESCRIPTOR_FAST 318
@@ -69,15 +67,16 @@ extern "C" {
#define _CHECK_METHOD_VERSION 335
#define _CHECK_PEP_523 336
#define _CHECK_PERIODIC 337
-#define _CHECK_STACK_SPACE 338
-#define _CHECK_STACK_SPACE_OPERAND 339
-#define _CHECK_VALIDITY 340
-#define _CHECK_VALIDITY_AND_SET_IP 341
-#define _COMPARE_OP 342
-#define _COMPARE_OP_FLOAT 343
-#define _COMPARE_OP_INT 344
-#define _COMPARE_OP_STR 345
-#define _CONTAINS_OP 346
+#define _CHECK_PERIODIC_IF_NOT_YIELD_FROM 338
+#define _CHECK_STACK_SPACE 339
+#define _CHECK_STACK_SPACE_OPERAND 340
+#define _CHECK_VALIDITY 341
+#define _CHECK_VALIDITY_AND_SET_IP 342
+#define _COMPARE_OP 343
+#define _COMPARE_OP_FLOAT 344
+#define _COMPARE_OP_INT 345
+#define _COMPARE_OP_STR 346
+#define _CONTAINS_OP 347
#define _CONTAINS_OP_DICT CONTAINS_OP_DICT
#define _CONTAINS_OP_SET CONTAINS_OP_SET
#define _CONVERT_VALUE CONVERT_VALUE
@@ -89,61 +88,61 @@ extern "C" {
#define _DELETE_GLOBAL DELETE_GLOBAL
#define _DELETE_NAME DELETE_NAME
#define _DELETE_SUBSCR DELETE_SUBSCR
-#define _DEOPT 347
+#define _DEOPT 348
#define _DICT_MERGE DICT_MERGE
#define _DICT_UPDATE DICT_UPDATE
-#define _DO_CALL 348
-#define _DYNAMIC_EXIT 349
+#define _DO_CALL 349
+#define _DO_CALL_KW 350
+#define _DYNAMIC_EXIT 351
#define _END_SEND END_SEND
-#define _ERROR_POP_N 350
+#define _ERROR_POP_N 352
#define _EXIT_INIT_CHECK EXIT_INIT_CHECK
-#define _EXPAND_METHOD 351
-#define _FATAL_ERROR 352
+#define _EXPAND_METHOD 353
+#define _FATAL_ERROR 354
#define _FORMAT_SIMPLE FORMAT_SIMPLE
#define _FORMAT_WITH_SPEC FORMAT_WITH_SPEC
-#define _FOR_ITER 353
-#define _FOR_ITER_GEN_FRAME 354
-#define _FOR_ITER_TIER_TWO 355
+#define _FOR_ITER 355
+#define _FOR_ITER_GEN_FRAME 356
+#define _FOR_ITER_TIER_TWO 357
#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 356
-#define _GUARD_BOTH_INT 357
-#define _GUARD_BOTH_UNICODE 358
-#define _GUARD_BUILTINS_VERSION 359
-#define _GUARD_DORV_NO_DICT 360
-#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 361
-#define _GUARD_GLOBALS_VERSION 362
-#define _GUARD_IS_FALSE_POP 363
-#define _GUARD_IS_NONE_POP 364
-#define _GUARD_IS_NOT_NONE_POP 365
-#define _GUARD_IS_TRUE_POP 366
-#define _GUARD_KEYS_VERSION 367
-#define _GUARD_NOS_FLOAT 368
-#define _GUARD_NOS_INT 369
-#define _GUARD_NOT_EXHAUSTED_LIST 370
-#define _GUARD_NOT_EXHAUSTED_RANGE 371
-#define _GUARD_NOT_EXHAUSTED_TUPLE 372
-#define _GUARD_TOS_FLOAT 373
-#define _GUARD_TOS_INT 374
-#define _GUARD_TYPE_VERSION 375
+#define _GUARD_BOTH_FLOAT 358
+#define _GUARD_BOTH_INT 359
+#define _GUARD_BOTH_UNICODE 360
+#define _GUARD_BUILTINS_VERSION 361
+#define _GUARD_DORV_NO_DICT 362
+#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 363
+#define _GUARD_GLOBALS_VERSION 364
+#define _GUARD_IS_FALSE_POP 365
+#define _GUARD_IS_NONE_POP 366
+#define _GUARD_IS_NOT_NONE_POP 367
+#define _GUARD_IS_TRUE_POP 368
+#define _GUARD_KEYS_VERSION 369
+#define _GUARD_NOS_FLOAT 370
+#define _GUARD_NOS_INT 371
+#define _GUARD_NOT_EXHAUSTED_LIST 372
+#define _GUARD_NOT_EXHAUSTED_RANGE 373
+#define _GUARD_NOT_EXHAUSTED_TUPLE 374
+#define _GUARD_TOS_FLOAT 375
+#define _GUARD_TOS_INT 376
+#define _GUARD_TYPE_VERSION 377
#define _IMPORT_FROM IMPORT_FROM
#define _IMPORT_NAME IMPORT_NAME
-#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 376
-#define _INIT_CALL_PY_EXACT_ARGS 377
-#define _INIT_CALL_PY_EXACT_ARGS_0 378
-#define _INIT_CALL_PY_EXACT_ARGS_1 379
-#define _INIT_CALL_PY_EXACT_ARGS_2 380
-#define _INIT_CALL_PY_EXACT_ARGS_3 381
-#define _INIT_CALL_PY_EXACT_ARGS_4 382
+#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS 378
+#define _INIT_CALL_PY_EXACT_ARGS 379
+#define _INIT_CALL_PY_EXACT_ARGS_0 380
+#define _INIT_CALL_PY_EXACT_ARGS_1 381
+#define _INIT_CALL_PY_EXACT_ARGS_2 382
+#define _INIT_CALL_PY_EXACT_ARGS_3 383
+#define _INIT_CALL_PY_EXACT_ARGS_4 384
#define _INSTRUMENTED_CALL_FUNCTION_EX INSTRUMENTED_CALL_FUNCTION_EX
#define _INSTRUMENTED_CALL_KW INSTRUMENTED_CALL_KW
#define _INSTRUMENTED_FOR_ITER INSTRUMENTED_FOR_ITER
#define _INSTRUMENTED_INSTRUCTION INSTRUMENTED_INSTRUCTION
-#define _INSTRUMENTED_JUMP_BACKWARD INSTRUMENTED_JUMP_BACKWARD
#define _INSTRUMENTED_JUMP_FORWARD INSTRUMENTED_JUMP_FORWARD
#define _INSTRUMENTED_LINE INSTRUMENTED_LINE
#define _INSTRUMENTED_LOAD_SUPER_ATTR INSTRUMENTED_LOAD_SUPER_ATTR
@@ -151,66 +150,65 @@ extern "C" {
#define _INSTRUMENTED_POP_JUMP_IF_NONE INSTRUMENTED_POP_JUMP_IF_NONE
#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE INSTRUMENTED_POP_JUMP_IF_NOT_NONE
#define _INSTRUMENTED_POP_JUMP_IF_TRUE INSTRUMENTED_POP_JUMP_IF_TRUE
-#define _INSTRUMENTED_RESUME INSTRUMENTED_RESUME
-#define _INTERNAL_INCREMENT_OPT_COUNTER 383
-#define _IS_NONE 384
+#define _INTERNAL_INCREMENT_OPT_COUNTER 385
+#define _IS_NONE 386
#define _IS_OP IS_OP
-#define _ITER_CHECK_LIST 385
-#define _ITER_CHECK_RANGE 386
-#define _ITER_CHECK_TUPLE 387
-#define _ITER_JUMP_LIST 388
-#define _ITER_JUMP_RANGE 389
-#define _ITER_JUMP_TUPLE 390
-#define _ITER_NEXT_LIST 391
-#define _ITER_NEXT_RANGE 392
-#define _ITER_NEXT_TUPLE 393
-#define _JUMP_TO_TOP 394
+#define _ITER_CHECK_LIST 387
+#define _ITER_CHECK_RANGE 388
+#define _ITER_CHECK_TUPLE 389
+#define _ITER_JUMP_LIST 390
+#define _ITER_JUMP_RANGE 391
+#define _ITER_JUMP_TUPLE 392
+#define _ITER_NEXT_LIST 393
+#define _ITER_NEXT_RANGE 394
+#define _ITER_NEXT_TUPLE 395
+#define _JUMP_TO_TOP 396
#define _LIST_APPEND LIST_APPEND
#define _LIST_EXTEND LIST_EXTEND
-#define _LOAD_ATTR 395
-#define _LOAD_ATTR_CLASS 396
-#define _LOAD_ATTR_CLASS_0 397
-#define _LOAD_ATTR_CLASS_1 398
+#define _LOAD_ATTR 397
+#define _LOAD_ATTR_CLASS 398
+#define _LOAD_ATTR_CLASS_0 399
+#define _LOAD_ATTR_CLASS_1 400
#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
-#define _LOAD_ATTR_INSTANCE_VALUE 399
-#define _LOAD_ATTR_INSTANCE_VALUE_0 400
-#define _LOAD_ATTR_INSTANCE_VALUE_1 401
-#define _LOAD_ATTR_METHOD_LAZY_DICT 402
-#define _LOAD_ATTR_METHOD_NO_DICT 403
-#define _LOAD_ATTR_METHOD_WITH_VALUES 404
-#define _LOAD_ATTR_MODULE 405
-#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 406
-#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 407
-#define _LOAD_ATTR_PROPERTY_FRAME 408
-#define _LOAD_ATTR_SLOT 409
-#define _LOAD_ATTR_SLOT_0 410
-#define _LOAD_ATTR_SLOT_1 411
-#define _LOAD_ATTR_WITH_HINT 412
+#define _LOAD_ATTR_INSTANCE_VALUE 401
+#define _LOAD_ATTR_INSTANCE_VALUE_0 402
+#define _LOAD_ATTR_INSTANCE_VALUE_1 403
+#define _LOAD_ATTR_METHOD_LAZY_DICT 404
+#define _LOAD_ATTR_METHOD_NO_DICT 405
+#define _LOAD_ATTR_METHOD_WITH_VALUES 406
+#define _LOAD_ATTR_MODULE 407
+#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 408
+#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 409
+#define _LOAD_ATTR_PROPERTY_FRAME 410
+#define _LOAD_ATTR_SLOT 411
+#define _LOAD_ATTR_SLOT_0 412
+#define _LOAD_ATTR_SLOT_1 413
+#define _LOAD_ATTR_WITH_HINT 414
#define _LOAD_BUILD_CLASS LOAD_BUILD_CLASS
#define _LOAD_COMMON_CONSTANT LOAD_COMMON_CONSTANT
#define _LOAD_CONST LOAD_CONST
-#define _LOAD_CONST_INLINE 413
-#define _LOAD_CONST_INLINE_BORROW 414
-#define _LOAD_CONST_INLINE_BORROW_WITH_NULL 415
-#define _LOAD_CONST_INLINE_WITH_NULL 416
+#define _LOAD_CONST_INLINE 415
+#define _LOAD_CONST_INLINE_BORROW 416
+#define _LOAD_CONST_INLINE_BORROW_WITH_NULL 417
+#define _LOAD_CONST_INLINE_WITH_NULL 418
#define _LOAD_DEREF LOAD_DEREF
-#define _LOAD_FAST 417
-#define _LOAD_FAST_0 418
-#define _LOAD_FAST_1 419
-#define _LOAD_FAST_2 420
-#define _LOAD_FAST_3 421
-#define _LOAD_FAST_4 422
-#define _LOAD_FAST_5 423
-#define _LOAD_FAST_6 424
-#define _LOAD_FAST_7 425
+#define _LOAD_FAST 419
+#define _LOAD_FAST_0 420
+#define _LOAD_FAST_1 421
+#define _LOAD_FAST_2 422
+#define _LOAD_FAST_3 423
+#define _LOAD_FAST_4 424
+#define _LOAD_FAST_5 425
+#define _LOAD_FAST_6 426
+#define _LOAD_FAST_7 427
#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 426
-#define _LOAD_GLOBAL_BUILTINS 427
-#define _LOAD_GLOBAL_MODULE 428
+#define _LOAD_GLOBAL 428
+#define _LOAD_GLOBAL_BUILTINS 429
+#define _LOAD_GLOBAL_MODULE 430
#define _LOAD_LOCALS LOAD_LOCALS
#define _LOAD_NAME LOAD_NAME
#define _LOAD_SPECIAL LOAD_SPECIAL
@@ -223,55 +221,58 @@ extern "C" {
#define _MATCH_KEYS MATCH_KEYS
#define _MATCH_MAPPING MATCH_MAPPING
#define _MATCH_SEQUENCE MATCH_SEQUENCE
-#define _MAYBE_EXPAND_METHOD 429
-#define _MONITOR_CALL 430
+#define _MAYBE_EXPAND_METHOD 431
+#define _MONITOR_CALL 432
+#define _MONITOR_JUMP_BACKWARD 433
+#define _MONITOR_RESUME 434
#define _NOP NOP
#define _POP_EXCEPT POP_EXCEPT
-#define _POP_JUMP_IF_FALSE 431
-#define _POP_JUMP_IF_TRUE 432
+#define _POP_JUMP_IF_FALSE 435
+#define _POP_JUMP_IF_TRUE 436
#define _POP_TOP POP_TOP
-#define _POP_TOP_LOAD_CONST_INLINE_BORROW 433
+#define _POP_TOP_LOAD_CONST_INLINE_BORROW 437
#define _PUSH_EXC_INFO PUSH_EXC_INFO
-#define _PUSH_FRAME 434
+#define _PUSH_FRAME 438
#define _PUSH_NULL PUSH_NULL
-#define _PY_FRAME_GENERAL 435
-#define _REPLACE_WITH_TRUE 436
+#define _PY_FRAME_GENERAL 439
+#define _QUICKEN_RESUME 440
+#define _REPLACE_WITH_TRUE 441
#define _RESUME_CHECK RESUME_CHECK
#define _RETURN_GENERATOR RETURN_GENERATOR
#define _RETURN_VALUE RETURN_VALUE
-#define _SAVE_RETURN_OFFSET 437
-#define _SEND 438
-#define _SEND_GEN_FRAME 439
+#define _SAVE_RETURN_OFFSET 442
+#define _SEND 443
+#define _SEND_GEN_FRAME 444
#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 440
-#define _STORE_ATTR 441
-#define _STORE_ATTR_INSTANCE_VALUE 442
-#define _STORE_ATTR_SLOT 443
-#define _STORE_ATTR_WITH_HINT 444
+#define _START_EXECUTOR 445
+#define _STORE_ATTR 446
+#define _STORE_ATTR_INSTANCE_VALUE 447
+#define _STORE_ATTR_SLOT 448
+#define _STORE_ATTR_WITH_HINT 449
#define _STORE_DEREF STORE_DEREF
-#define _STORE_FAST 445
-#define _STORE_FAST_0 446
-#define _STORE_FAST_1 447
-#define _STORE_FAST_2 448
-#define _STORE_FAST_3 449
-#define _STORE_FAST_4 450
-#define _STORE_FAST_5 451
-#define _STORE_FAST_6 452
-#define _STORE_FAST_7 453
+#define _STORE_FAST 450
+#define _STORE_FAST_0 451
+#define _STORE_FAST_1 452
+#define _STORE_FAST_2 453
+#define _STORE_FAST_3 454
+#define _STORE_FAST_4 455
+#define _STORE_FAST_5 456
+#define _STORE_FAST_6 457
+#define _STORE_FAST_7 458
#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 454
+#define _STORE_SUBSCR 459
#define _STORE_SUBSCR_DICT STORE_SUBSCR_DICT
#define _STORE_SUBSCR_LIST_INT STORE_SUBSCR_LIST_INT
#define _SWAP SWAP
-#define _TIER2_RESUME_CHECK 455
-#define _TO_BOOL 456
+#define _TIER2_RESUME_CHECK 460
+#define _TO_BOOL 461
#define _TO_BOOL_BOOL TO_BOOL_BOOL
#define _TO_BOOL_INT TO_BOOL_INT
#define _TO_BOOL_LIST TO_BOOL_LIST
@@ -281,13 +282,14 @@ extern "C" {
#define _UNARY_NEGATIVE UNARY_NEGATIVE
#define _UNARY_NOT UNARY_NOT
#define _UNPACK_EX UNPACK_EX
-#define _UNPACK_SEQUENCE 457
+#define _UNPACK_SEQUENCE 462
#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 _YIELD_VALUE YIELD_VALUE
-#define MAX_UOP_ID 457
+#define __DO_CALL_FUNCTION_EX _DO_CALL_FUNCTION_EX
+#define MAX_UOP_ID 462
#ifdef __cplusplus
}
diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h
index f5c6664..ef9e7de 100644
--- a/Include/internal/pycore_uop_metadata.h
+++ b/Include/internal/pycore_uop_metadata.h
@@ -20,6 +20,8 @@ extern int _PyUop_num_popped(int opcode, int oparg);
#ifdef NEED_OPCODE_METADATA
const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_NOP] = HAS_PURE_FLAG,
+ [_CHECK_PERIODIC] = HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
+ [_CHECK_PERIODIC_IF_NOT_YIELD_FROM] = HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_RESUME_CHECK] = HAS_DEOPT_FLAG,
[_LOAD_FAST_CHECK] = HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
[_LOAD_FAST_0] = HAS_LOCAL_FLAG | HAS_PURE_FLAG,
@@ -202,7 +204,6 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
[_CHECK_ATTR_METHOD_LAZY_DICT] = HAS_DEOPT_FLAG,
[_LOAD_ATTR_METHOD_LAZY_DICT] = HAS_ARG_FLAG,
[_MAYBE_EXPAND_METHOD] = HAS_ARG_FLAG,
- [_CHECK_PERIODIC] = HAS_EVAL_BREAK_FLAG,
[_PY_FRAME_GENERAL] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
[_CHECK_FUNCTION_VERSION] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
[_CHECK_METHOD_VERSION] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
@@ -334,6 +335,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
[_CHECK_METHOD_VERSION] = "_CHECK_METHOD_VERSION",
[_CHECK_PEP_523] = "_CHECK_PEP_523",
[_CHECK_PERIODIC] = "_CHECK_PERIODIC",
+ [_CHECK_PERIODIC_IF_NOT_YIELD_FROM] = "_CHECK_PERIODIC_IF_NOT_YIELD_FROM",
[_CHECK_STACK_SPACE] = "_CHECK_STACK_SPACE",
[_CHECK_STACK_SPACE_OPERAND] = "_CHECK_STACK_SPACE_OPERAND",
[_CHECK_VALIDITY] = "_CHECK_VALIDITY",
@@ -536,6 +538,10 @@ int _PyUop_num_popped(int opcode, int oparg)
switch(opcode) {
case _NOP:
return 0;
+ case _CHECK_PERIODIC:
+ return 0;
+ case _CHECK_PERIODIC_IF_NOT_YIELD_FROM:
+ return 0;
case _RESUME_CHECK:
return 0;
case _LOAD_FAST_CHECK:
@@ -900,8 +906,6 @@ int _PyUop_num_popped(int opcode, int oparg)
return 1;
case _MAYBE_EXPAND_METHOD:
return 2 + oparg;
- case _CHECK_PERIODIC:
- return 0;
case _PY_FRAME_GENERAL:
return 2 + oparg;
case _CHECK_FUNCTION_VERSION:
diff --git a/Include/opcode_ids.h b/Include/opcode_ids.h
index 3353e80..95984a9 100644
--- a/Include/opcode_ids.h
+++ b/Include/opcode_ids.h
@@ -126,6 +126,7 @@ extern "C" {
#define UNPACK_EX 113
#define UNPACK_SEQUENCE 114
#define YIELD_VALUE 115
+#define _DO_CALL_FUNCTION_EX 116
#define RESUME 149
#define BINARY_OP_ADD_FLOAT 150
#define BINARY_OP_ADD_INT 151
@@ -200,24 +201,24 @@ extern "C" {
#define UNPACK_SEQUENCE_LIST 220
#define UNPACK_SEQUENCE_TUPLE 221
#define UNPACK_SEQUENCE_TWO_TUPLE 222
-#define INSTRUMENTED_RESUME 236
-#define INSTRUMENTED_END_FOR 237
-#define INSTRUMENTED_END_SEND 238
-#define INSTRUMENTED_LOAD_SUPER_ATTR 239
-#define INSTRUMENTED_FOR_ITER 240
-#define INSTRUMENTED_CALL_KW 241
-#define INSTRUMENTED_CALL_FUNCTION_EX 242
-#define INSTRUMENTED_INSTRUCTION 243
-#define INSTRUMENTED_JUMP_FORWARD 244
-#define INSTRUMENTED_JUMP_BACKWARD 245
-#define INSTRUMENTED_POP_JUMP_IF_TRUE 246
-#define INSTRUMENTED_POP_JUMP_IF_FALSE 247
-#define INSTRUMENTED_POP_JUMP_IF_NONE 248
-#define INSTRUMENTED_POP_JUMP_IF_NOT_NONE 249
-#define INSTRUMENTED_RETURN_VALUE 250
-#define INSTRUMENTED_RETURN_CONST 251
-#define INSTRUMENTED_YIELD_VALUE 252
-#define INSTRUMENTED_CALL 253
+#define INSTRUMENTED_END_FOR 236
+#define INSTRUMENTED_END_SEND 237
+#define INSTRUMENTED_LOAD_SUPER_ATTR 238
+#define INSTRUMENTED_FOR_ITER 239
+#define INSTRUMENTED_CALL_KW 240
+#define INSTRUMENTED_CALL_FUNCTION_EX 241
+#define INSTRUMENTED_INSTRUCTION 242
+#define INSTRUMENTED_JUMP_FORWARD 243
+#define INSTRUMENTED_POP_JUMP_IF_TRUE 244
+#define INSTRUMENTED_POP_JUMP_IF_FALSE 245
+#define INSTRUMENTED_POP_JUMP_IF_NONE 246
+#define INSTRUMENTED_POP_JUMP_IF_NOT_NONE 247
+#define INSTRUMENTED_RESUME 248
+#define INSTRUMENTED_RETURN_VALUE 249
+#define INSTRUMENTED_RETURN_CONST 250
+#define INSTRUMENTED_YIELD_VALUE 251
+#define INSTRUMENTED_CALL 252
+#define INSTRUMENTED_JUMP_BACKWARD 253
#define INSTRUMENTED_LINE 254
#define ENTER_EXECUTOR 255
#define JUMP 256