From a3dc7849a3a171f9615f233fce5300f983db6908 Mon Sep 17 00:00:00 2001 From: Brij Kapadia <97006829+brijkapadia@users.noreply.github.com> Date: Tue, 30 Jun 2026 14:04:56 -0400 Subject: [PATCH 1/5] gh-145857: Replace `DELETE_GLOBAL` with `PUSH_NULL; STORE_GLOBAL` (GH-146314) --- Doc/library/dis.rst | 5 - Doc/tools/removed-ids.txt | 1 + Include/internal/pycore_magic_number.h | 3 +- Include/internal/pycore_opcode_metadata.h | 10 +- Include/internal/pycore_uop_ids.h | 1588 ++++++++--------- Include/internal/pycore_uop_metadata.h | 15 - Include/opcode_ids.h | 113 +- Lib/_opcode_metadata.py | 113 +- Lib/test/test_compiler_codegen.py | 12 + ...-03-23-00-45-44.gh-issue-145857.dB66WV.rst | 1 + Modules/_testinternalcapi/test_cases.c.h | 68 +- Modules/_testinternalcapi/test_targets.h | 9 +- Programs/test_frozenmain.h | 20 +- Python/bytecodes.c | 28 +- Python/codegen.c | 5 +- Python/executor_cases.c.h | 69 +- Python/generated_cases.c.h | 68 +- Python/opcode_targets.h | 9 +- Python/optimizer_cases.c.h | 4 - 19 files changed, 1046 insertions(+), 1095 deletions(-) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2026-03-23-00-45-44.gh-issue-145857.dB66WV.rst diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 294604c70642ec..9196d09b6a6a58 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1111,11 +1111,6 @@ iterations of the loop. Works as :opcode:`STORE_NAME`, but stores the name as a global. -.. opcode:: DELETE_GLOBAL (namei) - - Deletes a global name. - - .. opcode:: LOAD_CONST (consti) Pushes ``co_consts[consti]`` onto the stack. diff --git a/Doc/tools/removed-ids.txt b/Doc/tools/removed-ids.txt index d5dc3854c5ccaa..a01681ee9d0fc6 100644 --- a/Doc/tools/removed-ids.txt +++ b/Doc/tools/removed-ids.txt @@ -6,6 +6,7 @@ c-api/file.html: deprecated-api # Removed sections library/asyncio-task.html: terminating-a-task-group +library/dis.html: opcode-DELETE_GLOBAL library/dis.html: opcode-DELETE_NAME library/asyncio-llapi-index.html: event-loop-policies diff --git a/Include/internal/pycore_magic_number.h b/Include/internal/pycore_magic_number.h index 3530da1109a42e..74703dcdbcdd6f 100644 --- a/Include/internal/pycore_magic_number.h +++ b/Include/internal/pycore_magic_number.h @@ -300,6 +300,7 @@ Known values: Python 3.16a0 3700 (Initial version) Python 3.16a0 3701 (Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT) Python 3.16a1 3702 (Replace DELETE_NAME with PUSH_NULL; STORE_NAME) + Python 3.16a1 3703 (Replace DELETE_GLOBAL with PUSH_NULL; STORE_GLOBAL) Python 3.17 will start with 3750 @@ -313,7 +314,7 @@ PC/launcher.c must also be updated. */ -#define PYC_MAGIC_NUMBER 3702 +#define PYC_MAGIC_NUMBER 3703 /* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes (little-endian) and then appending b'\r\n'. */ #define PYC_MAGIC_NUMBER_TOKEN \ diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h index 09a56608e25ee8..04d39f72a27621 100644 --- a/Include/internal/pycore_opcode_metadata.h +++ b/Include/internal/pycore_opcode_metadata.h @@ -184,8 +184,6 @@ int _PyOpcode_num_popped(int opcode, int oparg) { return 0; case DELETE_FAST: return 0; - case DELETE_GLOBAL: - return 0; case DELETE_SUBSCR: return 2; case DICT_MERGE: @@ -683,8 +681,6 @@ int _PyOpcode_num_pushed(int opcode, int oparg) { return 0; case DELETE_FAST: return 0; - case DELETE_GLOBAL: - return 0; case DELETE_SUBSCR: return 0; case DICT_MERGE: @@ -1181,7 +1177,6 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[267] = { [DELETE_ATTR] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [DELETE_DEREF] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG }, [DELETE_FAST] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, - [DELETE_GLOBAL] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG }, [DELETE_SUBSCR] = { true, INSTR_FMT_IX, HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, [DICT_MERGE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG }, [DICT_UPDATE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG }, @@ -1433,7 +1428,6 @@ _PyOpcode_macro_expansion[256] = { [DELETE_ATTR] = { .nuops = 1, .uops = { { _DELETE_ATTR, OPARG_SIMPLE, 0 } } }, [DELETE_DEREF] = { .nuops = 1, .uops = { { _DELETE_DEREF, OPARG_SIMPLE, 0 } } }, [DELETE_FAST] = { .nuops = 1, .uops = { { _DELETE_FAST, OPARG_SIMPLE, 0 } } }, - [DELETE_GLOBAL] = { .nuops = 1, .uops = { { _DELETE_GLOBAL, OPARG_SIMPLE, 0 } } }, [DELETE_SUBSCR] = { .nuops = 1, .uops = { { _DELETE_SUBSCR, OPARG_SIMPLE, 0 } } }, [DICT_MERGE] = { .nuops = 2, .uops = { { _DICT_MERGE, OPARG_SIMPLE, 0 }, { _POP_TOP, OPARG_SIMPLE, 0 } } }, [DICT_UPDATE] = { .nuops = 2, .uops = { { _DICT_UPDATE, OPARG_SIMPLE, 0 }, { _POP_TOP, OPARG_SIMPLE, 0 } } }, @@ -1637,7 +1631,6 @@ const char *_PyOpcode_OpName[267] = { [DELETE_ATTR] = "DELETE_ATTR", [DELETE_DEREF] = "DELETE_DEREF", [DELETE_FAST] = "DELETE_FAST", - [DELETE_GLOBAL] = "DELETE_GLOBAL", [DELETE_SUBSCR] = "DELETE_SUBSCR", [DICT_MERGE] = "DICT_MERGE", [DICT_UPDATE] = "DICT_UPDATE", @@ -1841,6 +1834,7 @@ const uint8_t _PyOpcode_Caches[256] = { PyAPI_DATA(const uint8_t) _PyOpcode_Deopt[256]; #ifdef NEED_OPCODE_METADATA const uint8_t _PyOpcode_Deopt[256] = { + [118] = 118, [119] = 119, [120] = 120, [121] = 121, @@ -1937,7 +1931,6 @@ const uint8_t _PyOpcode_Deopt[256] = { [DELETE_ATTR] = DELETE_ATTR, [DELETE_DEREF] = DELETE_DEREF, [DELETE_FAST] = DELETE_FAST, - [DELETE_GLOBAL] = DELETE_GLOBAL, [DELETE_SUBSCR] = DELETE_SUBSCR, [DICT_MERGE] = DICT_MERGE, [DICT_UPDATE] = DICT_UPDATE, @@ -2102,6 +2095,7 @@ const uint8_t _PyOpcode_Deopt[256] = { #endif // NEED_OPCODE_METADATA #define EXTRA_CASES \ + case 118: \ case 119: \ case 120: \ case 121: \ diff --git a/Include/internal/pycore_uop_ids.h b/Include/internal/pycore_uop_ids.h index 9345b4d4f036aa..617b56cc286bd4 100644 --- a/Include/internal/pycore_uop_ids.h +++ b/Include/internal/pycore_uop_ids.h @@ -123,7 +123,6 @@ extern "C" { #define _DELETE_ATTR DELETE_ATTR #define _DELETE_DEREF DELETE_DEREF #define _DELETE_FAST DELETE_FAST -#define _DELETE_GLOBAL DELETE_GLOBAL #define _DELETE_SUBSCR DELETE_SUBSCR #define _DEOPT 399 #define _DICT_MERGE 400 @@ -649,800 +648,799 @@ extern "C" { #define _DELETE_ATTR_r10 862 #define _DELETE_DEREF_r00 863 #define _DELETE_FAST_r00 864 -#define _DELETE_GLOBAL_r00 865 -#define _DELETE_SUBSCR_r20 866 -#define _DEOPT_r00 867 -#define _DEOPT_r10 868 -#define _DEOPT_r20 869 -#define _DEOPT_r30 870 -#define _DICT_MERGE_r11 871 -#define _DICT_UPDATE_r11 872 -#define _DO_CALL_r01 873 -#define _DO_CALL_FUNCTION_EX_r31 874 -#define _DO_CALL_KW_r11 875 -#define _DYNAMIC_EXIT_r00 876 -#define _DYNAMIC_EXIT_r10 877 -#define _DYNAMIC_EXIT_r20 878 -#define _DYNAMIC_EXIT_r30 879 -#define _END_FOR_r10 880 -#define _END_SEND_r31 881 -#define _ERROR_POP_N_r00 882 -#define _EXIT_INIT_CHECK_r10 883 -#define _EXIT_TRACE_r00 884 -#define _EXIT_TRACE_r10 885 -#define _EXIT_TRACE_r20 886 -#define _EXIT_TRACE_r30 887 -#define _EXPAND_METHOD_r00 888 -#define _EXPAND_METHOD_KW_r11 889 -#define _FATAL_ERROR_r00 890 -#define _FATAL_ERROR_r11 891 -#define _FATAL_ERROR_r22 892 -#define _FATAL_ERROR_r33 893 -#define _FORMAT_SIMPLE_r11 894 -#define _FORMAT_WITH_SPEC_r21 895 -#define _FOR_ITER_r23 896 -#define _FOR_ITER_GEN_FRAME_r03 897 -#define _FOR_ITER_GEN_FRAME_r13 898 -#define _FOR_ITER_GEN_FRAME_r23 899 -#define _FOR_ITER_TIER_TWO_r23 900 -#define _FOR_ITER_VIRTUAL_r23 901 -#define _FOR_ITER_VIRTUAL_TIER_TWO_r23 902 -#define _GET_AITER_r11 903 -#define _GET_ANEXT_r12 904 -#define _GET_AWAITABLE_r11 905 -#define _GET_ITER_r12 906 -#define _GET_ITER_TRAD_r12 907 -#define _GET_LEN_r12 908 -#define _GUARD_3OS_ASYNC_GEN_ASEND_r03 909 -#define _GUARD_3OS_ASYNC_GEN_ASEND_r13 910 -#define _GUARD_3OS_ASYNC_GEN_ASEND_r23 911 -#define _GUARD_3OS_ASYNC_GEN_ASEND_r33 912 -#define _GUARD_BINARY_OP_EXTEND_r22 913 -#define _GUARD_BINARY_OP_EXTEND_LHS_r02 914 -#define _GUARD_BINARY_OP_EXTEND_LHS_r12 915 -#define _GUARD_BINARY_OP_EXTEND_LHS_r22 916 -#define _GUARD_BINARY_OP_EXTEND_LHS_r33 917 -#define _GUARD_BINARY_OP_EXTEND_RHS_r02 918 -#define _GUARD_BINARY_OP_EXTEND_RHS_r12 919 -#define _GUARD_BINARY_OP_EXTEND_RHS_r22 920 -#define _GUARD_BINARY_OP_EXTEND_RHS_r33 921 -#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r02 922 -#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12 923 -#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22 924 -#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33 925 -#define _GUARD_BIT_IS_SET_POP_r00 926 -#define _GUARD_BIT_IS_SET_POP_r10 927 -#define _GUARD_BIT_IS_SET_POP_r21 928 -#define _GUARD_BIT_IS_SET_POP_r32 929 -#define _GUARD_BIT_IS_SET_POP_4_r00 930 -#define _GUARD_BIT_IS_SET_POP_4_r10 931 -#define _GUARD_BIT_IS_SET_POP_4_r21 932 -#define _GUARD_BIT_IS_SET_POP_4_r32 933 -#define _GUARD_BIT_IS_SET_POP_5_r00 934 -#define _GUARD_BIT_IS_SET_POP_5_r10 935 -#define _GUARD_BIT_IS_SET_POP_5_r21 936 -#define _GUARD_BIT_IS_SET_POP_5_r32 937 -#define _GUARD_BIT_IS_SET_POP_6_r00 938 -#define _GUARD_BIT_IS_SET_POP_6_r10 939 -#define _GUARD_BIT_IS_SET_POP_6_r21 940 -#define _GUARD_BIT_IS_SET_POP_6_r32 941 -#define _GUARD_BIT_IS_SET_POP_7_r00 942 -#define _GUARD_BIT_IS_SET_POP_7_r10 943 -#define _GUARD_BIT_IS_SET_POP_7_r21 944 -#define _GUARD_BIT_IS_SET_POP_7_r32 945 -#define _GUARD_BIT_IS_UNSET_POP_r00 946 -#define _GUARD_BIT_IS_UNSET_POP_r10 947 -#define _GUARD_BIT_IS_UNSET_POP_r21 948 -#define _GUARD_BIT_IS_UNSET_POP_r32 949 -#define _GUARD_BIT_IS_UNSET_POP_4_r00 950 -#define _GUARD_BIT_IS_UNSET_POP_4_r10 951 -#define _GUARD_BIT_IS_UNSET_POP_4_r21 952 -#define _GUARD_BIT_IS_UNSET_POP_4_r32 953 -#define _GUARD_BIT_IS_UNSET_POP_5_r00 954 -#define _GUARD_BIT_IS_UNSET_POP_5_r10 955 -#define _GUARD_BIT_IS_UNSET_POP_5_r21 956 -#define _GUARD_BIT_IS_UNSET_POP_5_r32 957 -#define _GUARD_BIT_IS_UNSET_POP_6_r00 958 -#define _GUARD_BIT_IS_UNSET_POP_6_r10 959 -#define _GUARD_BIT_IS_UNSET_POP_6_r21 960 -#define _GUARD_BIT_IS_UNSET_POP_6_r32 961 -#define _GUARD_BIT_IS_UNSET_POP_7_r00 962 -#define _GUARD_BIT_IS_UNSET_POP_7_r10 963 -#define _GUARD_BIT_IS_UNSET_POP_7_r21 964 -#define _GUARD_BIT_IS_UNSET_POP_7_r32 965 -#define _GUARD_CALLABLE_BUILTIN_CLASS_r00 966 -#define _GUARD_CALLABLE_BUILTIN_FAST_r00 967 -#define _GUARD_CALLABLE_BUILTIN_FAST_WITH_KEYWORDS_r00 968 -#define _GUARD_CALLABLE_BUILTIN_O_r00 969 -#define _GUARD_CALLABLE_ISINSTANCE_r03 970 -#define _GUARD_CALLABLE_ISINSTANCE_r13 971 -#define _GUARD_CALLABLE_ISINSTANCE_r23 972 -#define _GUARD_CALLABLE_ISINSTANCE_r33 973 -#define _GUARD_CALLABLE_LEN_r03 974 -#define _GUARD_CALLABLE_LEN_r13 975 -#define _GUARD_CALLABLE_LEN_r23 976 -#define _GUARD_CALLABLE_LEN_r33 977 -#define _GUARD_CALLABLE_LIST_APPEND_r03 978 -#define _GUARD_CALLABLE_LIST_APPEND_r13 979 -#define _GUARD_CALLABLE_LIST_APPEND_r23 980 -#define _GUARD_CALLABLE_LIST_APPEND_r33 981 -#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST_r00 982 -#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS_r00 983 -#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_NOARGS_r00 984 -#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_O_r00 985 -#define _GUARD_CALLABLE_STR_1_r03 986 -#define _GUARD_CALLABLE_STR_1_r13 987 -#define _GUARD_CALLABLE_STR_1_r23 988 -#define _GUARD_CALLABLE_STR_1_r33 989 -#define _GUARD_CALLABLE_TUPLE_1_r03 990 -#define _GUARD_CALLABLE_TUPLE_1_r13 991 -#define _GUARD_CALLABLE_TUPLE_1_r23 992 -#define _GUARD_CALLABLE_TUPLE_1_r33 993 -#define _GUARD_CALLABLE_TYPE_1_r03 994 -#define _GUARD_CALLABLE_TYPE_1_r13 995 -#define _GUARD_CALLABLE_TYPE_1_r23 996 -#define _GUARD_CALLABLE_TYPE_1_r33 997 -#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r00 998 -#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r11 999 -#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r22 1000 -#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r33 1001 -#define _GUARD_CODE_VERSION_RETURN_VALUE_r00 1002 -#define _GUARD_CODE_VERSION_RETURN_VALUE_r11 1003 -#define _GUARD_CODE_VERSION_RETURN_VALUE_r22 1004 -#define _GUARD_CODE_VERSION_RETURN_VALUE_r33 1005 -#define _GUARD_CODE_VERSION_YIELD_VALUE_r00 1006 -#define _GUARD_CODE_VERSION_YIELD_VALUE_r11 1007 -#define _GUARD_CODE_VERSION_YIELD_VALUE_r22 1008 -#define _GUARD_CODE_VERSION_YIELD_VALUE_r33 1009 -#define _GUARD_CODE_VERSION__PUSH_FRAME_r00 1010 -#define _GUARD_CODE_VERSION__PUSH_FRAME_r11 1011 -#define _GUARD_CODE_VERSION__PUSH_FRAME_r22 1012 -#define _GUARD_CODE_VERSION__PUSH_FRAME_r33 1013 -#define _GUARD_DORV_NO_DICT_r01 1014 -#define _GUARD_DORV_NO_DICT_r11 1015 -#define _GUARD_DORV_NO_DICT_r22 1016 -#define _GUARD_DORV_NO_DICT_r33 1017 -#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r01 1018 -#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r11 1019 -#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r22 1020 -#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r33 1021 -#define _GUARD_GLOBALS_VERSION_r00 1022 -#define _GUARD_GLOBALS_VERSION_r11 1023 -#define _GUARD_GLOBALS_VERSION_r22 1024 -#define _GUARD_GLOBALS_VERSION_r33 1025 -#define _GUARD_IP_RETURN_GENERATOR_r00 1026 -#define _GUARD_IP_RETURN_GENERATOR_r11 1027 -#define _GUARD_IP_RETURN_GENERATOR_r22 1028 -#define _GUARD_IP_RETURN_GENERATOR_r33 1029 -#define _GUARD_IP_RETURN_VALUE_r00 1030 -#define _GUARD_IP_RETURN_VALUE_r11 1031 -#define _GUARD_IP_RETURN_VALUE_r22 1032 -#define _GUARD_IP_RETURN_VALUE_r33 1033 -#define _GUARD_IP_YIELD_VALUE_r00 1034 -#define _GUARD_IP_YIELD_VALUE_r11 1035 -#define _GUARD_IP_YIELD_VALUE_r22 1036 -#define _GUARD_IP_YIELD_VALUE_r33 1037 -#define _GUARD_IP__PUSH_FRAME_r00 1038 -#define _GUARD_IP__PUSH_FRAME_r11 1039 -#define _GUARD_IP__PUSH_FRAME_r22 1040 -#define _GUARD_IP__PUSH_FRAME_r33 1041 -#define _GUARD_IS_FALSE_POP_r00 1042 -#define _GUARD_IS_FALSE_POP_r10 1043 -#define _GUARD_IS_FALSE_POP_r21 1044 -#define _GUARD_IS_FALSE_POP_r32 1045 -#define _GUARD_IS_NONE_POP_r00 1046 -#define _GUARD_IS_NONE_POP_r10 1047 -#define _GUARD_IS_NONE_POP_r21 1048 -#define _GUARD_IS_NONE_POP_r32 1049 -#define _GUARD_IS_NOT_NONE_POP_r10 1050 -#define _GUARD_IS_TRUE_POP_r00 1051 -#define _GUARD_IS_TRUE_POP_r10 1052 -#define _GUARD_IS_TRUE_POP_r21 1053 -#define _GUARD_IS_TRUE_POP_r32 1054 -#define _GUARD_ITERATOR_r01 1055 -#define _GUARD_ITERATOR_r11 1056 -#define _GUARD_ITERATOR_r22 1057 -#define _GUARD_ITERATOR_r33 1058 -#define _GUARD_ITER_VIRTUAL_r01 1059 -#define _GUARD_ITER_VIRTUAL_r11 1060 -#define _GUARD_ITER_VIRTUAL_r22 1061 -#define _GUARD_ITER_VIRTUAL_r33 1062 -#define _GUARD_KEYS_VERSION_r01 1063 -#define _GUARD_KEYS_VERSION_r11 1064 -#define _GUARD_KEYS_VERSION_r22 1065 -#define _GUARD_KEYS_VERSION_r33 1066 -#define _GUARD_LOAD_SUPER_ATTR_METHOD_r03 1067 -#define _GUARD_LOAD_SUPER_ATTR_METHOD_r13 1068 -#define _GUARD_LOAD_SUPER_ATTR_METHOD_r23 1069 -#define _GUARD_LOAD_SUPER_ATTR_METHOD_r33 1070 -#define _GUARD_NOS_COMPACT_ASCII_r02 1071 -#define _GUARD_NOS_COMPACT_ASCII_r12 1072 -#define _GUARD_NOS_COMPACT_ASCII_r22 1073 -#define _GUARD_NOS_COMPACT_ASCII_r33 1074 -#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r03 1075 -#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r13 1076 -#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r23 1077 -#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r33 1078 -#define _GUARD_NOS_DICT_SUBSCRIPT_r02 1079 -#define _GUARD_NOS_DICT_SUBSCRIPT_r12 1080 -#define _GUARD_NOS_DICT_SUBSCRIPT_r22 1081 -#define _GUARD_NOS_DICT_SUBSCRIPT_r33 1082 -#define _GUARD_NOS_FLOAT_r02 1083 -#define _GUARD_NOS_FLOAT_r12 1084 -#define _GUARD_NOS_FLOAT_r22 1085 -#define _GUARD_NOS_FLOAT_r33 1086 -#define _GUARD_NOS_INT_r02 1087 -#define _GUARD_NOS_INT_r12 1088 -#define _GUARD_NOS_INT_r22 1089 -#define _GUARD_NOS_INT_r33 1090 -#define _GUARD_NOS_ITER_VIRTUAL_r02 1091 -#define _GUARD_NOS_ITER_VIRTUAL_r12 1092 -#define _GUARD_NOS_ITER_VIRTUAL_r22 1093 -#define _GUARD_NOS_ITER_VIRTUAL_r33 1094 -#define _GUARD_NOS_LIST_r02 1095 -#define _GUARD_NOS_LIST_r12 1096 -#define _GUARD_NOS_LIST_r22 1097 -#define _GUARD_NOS_LIST_r33 1098 -#define _GUARD_NOS_NOT_NULL_r02 1099 -#define _GUARD_NOS_NOT_NULL_r12 1100 -#define _GUARD_NOS_NOT_NULL_r22 1101 -#define _GUARD_NOS_NOT_NULL_r33 1102 -#define _GUARD_NOS_NULL_r02 1103 -#define _GUARD_NOS_NULL_r12 1104 -#define _GUARD_NOS_NULL_r22 1105 -#define _GUARD_NOS_NULL_r33 1106 -#define _GUARD_NOS_OVERFLOWED_r02 1107 -#define _GUARD_NOS_OVERFLOWED_r12 1108 -#define _GUARD_NOS_OVERFLOWED_r22 1109 -#define _GUARD_NOS_OVERFLOWED_r33 1110 -#define _GUARD_NOS_TUPLE_r02 1111 -#define _GUARD_NOS_TUPLE_r12 1112 -#define _GUARD_NOS_TUPLE_r22 1113 -#define _GUARD_NOS_TUPLE_r33 1114 -#define _GUARD_NOS_TYPE_VERSION_r02 1115 -#define _GUARD_NOS_TYPE_VERSION_r12 1116 -#define _GUARD_NOS_TYPE_VERSION_r22 1117 -#define _GUARD_NOS_TYPE_VERSION_r33 1118 -#define _GUARD_NOS_UNICODE_r02 1119 -#define _GUARD_NOS_UNICODE_r12 1120 -#define _GUARD_NOS_UNICODE_r22 1121 -#define _GUARD_NOS_UNICODE_r33 1122 -#define _GUARD_NOT_EXHAUSTED_LIST_r02 1123 -#define _GUARD_NOT_EXHAUSTED_LIST_r12 1124 -#define _GUARD_NOT_EXHAUSTED_LIST_r22 1125 -#define _GUARD_NOT_EXHAUSTED_LIST_r33 1126 -#define _GUARD_NOT_EXHAUSTED_RANGE_r02 1127 -#define _GUARD_NOT_EXHAUSTED_RANGE_r12 1128 -#define _GUARD_NOT_EXHAUSTED_RANGE_r22 1129 -#define _GUARD_NOT_EXHAUSTED_RANGE_r33 1130 -#define _GUARD_NOT_EXHAUSTED_TUPLE_r02 1131 -#define _GUARD_NOT_EXHAUSTED_TUPLE_r12 1132 -#define _GUARD_NOT_EXHAUSTED_TUPLE_r22 1133 -#define _GUARD_NOT_EXHAUSTED_TUPLE_r33 1134 -#define _GUARD_THIRD_NULL_r03 1135 -#define _GUARD_THIRD_NULL_r13 1136 -#define _GUARD_THIRD_NULL_r23 1137 -#define _GUARD_THIRD_NULL_r33 1138 -#define _GUARD_TOS_ANY_DICT_r01 1139 -#define _GUARD_TOS_ANY_DICT_r11 1140 -#define _GUARD_TOS_ANY_DICT_r22 1141 -#define _GUARD_TOS_ANY_DICT_r33 1142 -#define _GUARD_TOS_ANY_SET_r01 1143 -#define _GUARD_TOS_ANY_SET_r11 1144 -#define _GUARD_TOS_ANY_SET_r22 1145 -#define _GUARD_TOS_ANY_SET_r33 1146 -#define _GUARD_TOS_DICT_r01 1147 -#define _GUARD_TOS_DICT_r11 1148 -#define _GUARD_TOS_DICT_r22 1149 -#define _GUARD_TOS_DICT_r33 1150 -#define _GUARD_TOS_FLOAT_r01 1151 -#define _GUARD_TOS_FLOAT_r11 1152 -#define _GUARD_TOS_FLOAT_r22 1153 -#define _GUARD_TOS_FLOAT_r33 1154 -#define _GUARD_TOS_FROZENDICT_r01 1155 -#define _GUARD_TOS_FROZENDICT_r11 1156 -#define _GUARD_TOS_FROZENDICT_r22 1157 -#define _GUARD_TOS_FROZENDICT_r33 1158 -#define _GUARD_TOS_FROZENSET_r01 1159 -#define _GUARD_TOS_FROZENSET_r11 1160 -#define _GUARD_TOS_FROZENSET_r22 1161 -#define _GUARD_TOS_FROZENSET_r33 1162 -#define _GUARD_TOS_INT_r01 1163 -#define _GUARD_TOS_INT_r11 1164 -#define _GUARD_TOS_INT_r22 1165 -#define _GUARD_TOS_INT_r33 1166 -#define _GUARD_TOS_IS_NONE_r01 1167 -#define _GUARD_TOS_IS_NONE_r11 1168 -#define _GUARD_TOS_IS_NONE_r22 1169 -#define _GUARD_TOS_IS_NONE_r33 1170 -#define _GUARD_TOS_LIST_r01 1171 -#define _GUARD_TOS_LIST_r11 1172 -#define _GUARD_TOS_LIST_r22 1173 -#define _GUARD_TOS_LIST_r33 1174 -#define _GUARD_TOS_NOT_NULL_r01 1175 -#define _GUARD_TOS_NOT_NULL_r11 1176 -#define _GUARD_TOS_NOT_NULL_r22 1177 -#define _GUARD_TOS_NOT_NULL_r33 1178 -#define _GUARD_TOS_OVERFLOWED_r01 1179 -#define _GUARD_TOS_OVERFLOWED_r11 1180 -#define _GUARD_TOS_OVERFLOWED_r22 1181 -#define _GUARD_TOS_OVERFLOWED_r33 1182 -#define _GUARD_TOS_SET_r01 1183 -#define _GUARD_TOS_SET_r11 1184 -#define _GUARD_TOS_SET_r22 1185 -#define _GUARD_TOS_SET_r33 1186 -#define _GUARD_TOS_SLICE_r01 1187 -#define _GUARD_TOS_SLICE_r11 1188 -#define _GUARD_TOS_SLICE_r22 1189 -#define _GUARD_TOS_SLICE_r33 1190 -#define _GUARD_TOS_TUPLE_r01 1191 -#define _GUARD_TOS_TUPLE_r11 1192 -#define _GUARD_TOS_TUPLE_r22 1193 -#define _GUARD_TOS_TUPLE_r33 1194 -#define _GUARD_TOS_UNICODE_r01 1195 -#define _GUARD_TOS_UNICODE_r11 1196 -#define _GUARD_TOS_UNICODE_r22 1197 -#define _GUARD_TOS_UNICODE_r33 1198 -#define _GUARD_TYPE_r01 1199 -#define _GUARD_TYPE_r11 1200 -#define _GUARD_TYPE_r22 1201 -#define _GUARD_TYPE_r33 1202 -#define _GUARD_TYPE_ITER_r02 1203 -#define _GUARD_TYPE_ITER_r12 1204 -#define _GUARD_TYPE_ITER_r22 1205 -#define _GUARD_TYPE_ITER_r33 1206 -#define _GUARD_TYPE_VERSION_r01 1207 -#define _GUARD_TYPE_VERSION_r11 1208 -#define _GUARD_TYPE_VERSION_r22 1209 -#define _GUARD_TYPE_VERSION_r33 1210 -#define _GUARD_TYPE_VERSION_LOCKED_r01 1211 -#define _GUARD_TYPE_VERSION_LOCKED_r11 1212 -#define _GUARD_TYPE_VERSION_LOCKED_r22 1213 -#define _GUARD_TYPE_VERSION_LOCKED_r33 1214 -#define _HANDLE_PENDING_AND_DEOPT_r00 1215 -#define _HANDLE_PENDING_AND_DEOPT_r10 1216 -#define _HANDLE_PENDING_AND_DEOPT_r20 1217 -#define _HANDLE_PENDING_AND_DEOPT_r30 1218 -#define _IMPORT_FROM_r12 1219 -#define _IMPORT_NAME_r21 1220 -#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS_r00 1221 -#define _INIT_CALL_PY_EXACT_ARGS_r01 1222 -#define _INIT_CALL_PY_EXACT_ARGS_0_r01 1223 -#define _INIT_CALL_PY_EXACT_ARGS_1_r01 1224 -#define _INIT_CALL_PY_EXACT_ARGS_2_r01 1225 -#define _INIT_CALL_PY_EXACT_ARGS_3_r01 1226 -#define _INIT_CALL_PY_EXACT_ARGS_4_r01 1227 -#define _INSERT_NULL_r10 1228 -#define _INSTRUMENTED_FOR_ITER_r23 1229 -#define _INSTRUMENTED_INSTRUCTION_r00 1230 -#define _INSTRUMENTED_JUMP_FORWARD_r00 1231 -#define _INSTRUMENTED_JUMP_FORWARD_r11 1232 -#define _INSTRUMENTED_JUMP_FORWARD_r22 1233 -#define _INSTRUMENTED_JUMP_FORWARD_r33 1234 -#define _INSTRUMENTED_LINE_r00 1235 -#define _INSTRUMENTED_NOT_TAKEN_r00 1236 -#define _INSTRUMENTED_NOT_TAKEN_r11 1237 -#define _INSTRUMENTED_NOT_TAKEN_r22 1238 -#define _INSTRUMENTED_NOT_TAKEN_r33 1239 -#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r00 1240 -#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r10 1241 -#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r21 1242 -#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r32 1243 -#define _INSTRUMENTED_POP_JUMP_IF_NONE_r10 1244 -#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE_r10 1245 -#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r00 1246 -#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r10 1247 -#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r21 1248 -#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r32 1249 -#define _IS_NONE_r11 1250 -#define _IS_OP_r03 1251 -#define _IS_OP_r13 1252 -#define _IS_OP_r23 1253 -#define _ITER_CHECK_LIST_r02 1254 -#define _ITER_CHECK_LIST_r12 1255 -#define _ITER_CHECK_LIST_r22 1256 -#define _ITER_CHECK_LIST_r33 1257 -#define _ITER_CHECK_RANGE_r02 1258 -#define _ITER_CHECK_RANGE_r12 1259 -#define _ITER_CHECK_RANGE_r22 1260 -#define _ITER_CHECK_RANGE_r33 1261 -#define _ITER_CHECK_TUPLE_r02 1262 -#define _ITER_CHECK_TUPLE_r12 1263 -#define _ITER_CHECK_TUPLE_r22 1264 -#define _ITER_CHECK_TUPLE_r33 1265 -#define _ITER_JUMP_LIST_r02 1266 -#define _ITER_JUMP_LIST_r12 1267 -#define _ITER_JUMP_LIST_r22 1268 -#define _ITER_JUMP_LIST_r33 1269 -#define _ITER_JUMP_RANGE_r02 1270 -#define _ITER_JUMP_RANGE_r12 1271 -#define _ITER_JUMP_RANGE_r22 1272 -#define _ITER_JUMP_RANGE_r33 1273 -#define _ITER_JUMP_TUPLE_r02 1274 -#define _ITER_JUMP_TUPLE_r12 1275 -#define _ITER_JUMP_TUPLE_r22 1276 -#define _ITER_JUMP_TUPLE_r33 1277 -#define _ITER_NEXT_INLINE_r23 1278 -#define _ITER_NEXT_LIST_r23 1279 -#define _ITER_NEXT_LIST_TIER_TWO_r23 1280 -#define _ITER_NEXT_RANGE_r03 1281 -#define _ITER_NEXT_RANGE_r13 1282 -#define _ITER_NEXT_RANGE_r23 1283 -#define _ITER_NEXT_TUPLE_r03 1284 -#define _ITER_NEXT_TUPLE_r13 1285 -#define _ITER_NEXT_TUPLE_r23 1286 -#define _JUMP_BACKWARD_NO_INTERRUPT_r00 1287 -#define _JUMP_BACKWARD_NO_INTERRUPT_r11 1288 -#define _JUMP_BACKWARD_NO_INTERRUPT_r22 1289 -#define _JUMP_BACKWARD_NO_INTERRUPT_r33 1290 -#define _JUMP_TO_TOP_r00 1291 -#define _LIST_APPEND_r10 1292 -#define _LIST_EXTEND_r11 1293 -#define _LOAD_ATTR_r10 1294 -#define _LOAD_ATTR_CLASS_r11 1295 -#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN_FRAME_r11 1296 -#define _LOAD_ATTR_INSTANCE_VALUE_r02 1297 -#define _LOAD_ATTR_INSTANCE_VALUE_r12 1298 -#define _LOAD_ATTR_INSTANCE_VALUE_r23 1299 -#define _LOAD_ATTR_METHOD_LAZY_DICT_r02 1300 -#define _LOAD_ATTR_METHOD_LAZY_DICT_r12 1301 -#define _LOAD_ATTR_METHOD_LAZY_DICT_r23 1302 -#define _LOAD_ATTR_METHOD_NO_DICT_r02 1303 -#define _LOAD_ATTR_METHOD_NO_DICT_r12 1304 -#define _LOAD_ATTR_METHOD_NO_DICT_r23 1305 -#define _LOAD_ATTR_METHOD_WITH_VALUES_r02 1306 -#define _LOAD_ATTR_METHOD_WITH_VALUES_r12 1307 -#define _LOAD_ATTR_METHOD_WITH_VALUES_r23 1308 -#define _LOAD_ATTR_MODULE_r12 1309 -#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11 1310 -#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES_r11 1311 -#define _LOAD_ATTR_PROPERTY_FRAME_r01 1312 -#define _LOAD_ATTR_PROPERTY_FRAME_r11 1313 -#define _LOAD_ATTR_PROPERTY_FRAME_r22 1314 -#define _LOAD_ATTR_PROPERTY_FRAME_r33 1315 -#define _LOAD_ATTR_SLOT_r02 1316 -#define _LOAD_ATTR_SLOT_r12 1317 -#define _LOAD_ATTR_SLOT_r23 1318 -#define _LOAD_ATTR_WITH_HINT_r12 1319 -#define _LOAD_BUILD_CLASS_r01 1320 -#define _LOAD_BYTECODE_r00 1321 -#define _LOAD_COMMON_CONSTANT_r01 1322 -#define _LOAD_COMMON_CONSTANT_r12 1323 -#define _LOAD_COMMON_CONSTANT_r23 1324 -#define _LOAD_CONST_r01 1325 -#define _LOAD_CONST_r12 1326 -#define _LOAD_CONST_r23 1327 -#define _LOAD_CONST_INLINE_r01 1328 -#define _LOAD_CONST_INLINE_r12 1329 -#define _LOAD_CONST_INLINE_r23 1330 -#define _LOAD_CONST_INLINE_BORROW_r01 1331 -#define _LOAD_CONST_INLINE_BORROW_r12 1332 -#define _LOAD_CONST_INLINE_BORROW_r23 1333 -#define _LOAD_DEREF_r01 1334 -#define _LOAD_FAST_r01 1335 -#define _LOAD_FAST_r12 1336 -#define _LOAD_FAST_r23 1337 -#define _LOAD_FAST_0_r01 1338 -#define _LOAD_FAST_0_r12 1339 -#define _LOAD_FAST_0_r23 1340 -#define _LOAD_FAST_1_r01 1341 -#define _LOAD_FAST_1_r12 1342 -#define _LOAD_FAST_1_r23 1343 -#define _LOAD_FAST_2_r01 1344 -#define _LOAD_FAST_2_r12 1345 -#define _LOAD_FAST_2_r23 1346 -#define _LOAD_FAST_3_r01 1347 -#define _LOAD_FAST_3_r12 1348 -#define _LOAD_FAST_3_r23 1349 -#define _LOAD_FAST_4_r01 1350 -#define _LOAD_FAST_4_r12 1351 -#define _LOAD_FAST_4_r23 1352 -#define _LOAD_FAST_5_r01 1353 -#define _LOAD_FAST_5_r12 1354 -#define _LOAD_FAST_5_r23 1355 -#define _LOAD_FAST_6_r01 1356 -#define _LOAD_FAST_6_r12 1357 -#define _LOAD_FAST_6_r23 1358 -#define _LOAD_FAST_7_r01 1359 -#define _LOAD_FAST_7_r12 1360 -#define _LOAD_FAST_7_r23 1361 -#define _LOAD_FAST_AND_CLEAR_r01 1362 -#define _LOAD_FAST_AND_CLEAR_r12 1363 -#define _LOAD_FAST_AND_CLEAR_r23 1364 -#define _LOAD_FAST_BORROW_r01 1365 -#define _LOAD_FAST_BORROW_r12 1366 -#define _LOAD_FAST_BORROW_r23 1367 -#define _LOAD_FAST_BORROW_0_r01 1368 -#define _LOAD_FAST_BORROW_0_r12 1369 -#define _LOAD_FAST_BORROW_0_r23 1370 -#define _LOAD_FAST_BORROW_1_r01 1371 -#define _LOAD_FAST_BORROW_1_r12 1372 -#define _LOAD_FAST_BORROW_1_r23 1373 -#define _LOAD_FAST_BORROW_2_r01 1374 -#define _LOAD_FAST_BORROW_2_r12 1375 -#define _LOAD_FAST_BORROW_2_r23 1376 -#define _LOAD_FAST_BORROW_3_r01 1377 -#define _LOAD_FAST_BORROW_3_r12 1378 -#define _LOAD_FAST_BORROW_3_r23 1379 -#define _LOAD_FAST_BORROW_4_r01 1380 -#define _LOAD_FAST_BORROW_4_r12 1381 -#define _LOAD_FAST_BORROW_4_r23 1382 -#define _LOAD_FAST_BORROW_5_r01 1383 -#define _LOAD_FAST_BORROW_5_r12 1384 -#define _LOAD_FAST_BORROW_5_r23 1385 -#define _LOAD_FAST_BORROW_6_r01 1386 -#define _LOAD_FAST_BORROW_6_r12 1387 -#define _LOAD_FAST_BORROW_6_r23 1388 -#define _LOAD_FAST_BORROW_7_r01 1389 -#define _LOAD_FAST_BORROW_7_r12 1390 -#define _LOAD_FAST_BORROW_7_r23 1391 -#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r02 1392 -#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r13 1393 -#define _LOAD_FAST_CHECK_r01 1394 -#define _LOAD_FAST_CHECK_r12 1395 -#define _LOAD_FAST_CHECK_r23 1396 -#define _LOAD_FAST_LOAD_FAST_r02 1397 -#define _LOAD_FAST_LOAD_FAST_r13 1398 -#define _LOAD_FROM_DICT_OR_DEREF_r11 1399 -#define _LOAD_FROM_DICT_OR_GLOBALS_r11 1400 -#define _LOAD_GLOBAL_r00 1401 -#define _LOAD_GLOBAL_BUILTINS_r01 1402 -#define _LOAD_GLOBAL_MODULE_r01 1403 -#define _LOAD_LOCALS_r01 1404 -#define _LOAD_LOCALS_r12 1405 -#define _LOAD_LOCALS_r23 1406 -#define _LOAD_NAME_r01 1407 -#define _LOAD_SMALL_INT_r01 1408 -#define _LOAD_SMALL_INT_r12 1409 -#define _LOAD_SMALL_INT_r23 1410 -#define _LOAD_SMALL_INT_0_r01 1411 -#define _LOAD_SMALL_INT_0_r12 1412 -#define _LOAD_SMALL_INT_0_r23 1413 -#define _LOAD_SMALL_INT_1_r01 1414 -#define _LOAD_SMALL_INT_1_r12 1415 -#define _LOAD_SMALL_INT_1_r23 1416 -#define _LOAD_SMALL_INT_2_r01 1417 -#define _LOAD_SMALL_INT_2_r12 1418 -#define _LOAD_SMALL_INT_2_r23 1419 -#define _LOAD_SMALL_INT_3_r01 1420 -#define _LOAD_SMALL_INT_3_r12 1421 -#define _LOAD_SMALL_INT_3_r23 1422 -#define _LOAD_SPECIAL_r00 1423 -#define _LOAD_SUPER_ATTR_ATTR_r31 1424 -#define _LOAD_SUPER_ATTR_METHOD_r32 1425 -#define _LOCK_OBJECT_r01 1426 -#define _LOCK_OBJECT_r11 1427 -#define _LOCK_OBJECT_r22 1428 -#define _LOCK_OBJECT_r33 1429 -#define _MAKE_CALLARGS_A_TUPLE_r33 1430 -#define _MAKE_CELL_r00 1431 -#define _MAKE_FUNCTION_r12 1432 -#define _MAKE_HEAP_SAFE_r01 1433 -#define _MAKE_HEAP_SAFE_r11 1434 -#define _MAKE_HEAP_SAFE_r22 1435 -#define _MAKE_HEAP_SAFE_r33 1436 -#define _MAKE_WARM_r00 1437 -#define _MAKE_WARM_r11 1438 -#define _MAKE_WARM_r22 1439 -#define _MAKE_WARM_r33 1440 -#define _MAP_ADD_r20 1441 -#define _MATCH_CLASS_r33 1442 -#define _MATCH_KEYS_r23 1443 -#define _MATCH_MAPPING_r02 1444 -#define _MATCH_MAPPING_r12 1445 -#define _MATCH_MAPPING_r23 1446 -#define _MATCH_SEQUENCE_r02 1447 -#define _MATCH_SEQUENCE_r12 1448 -#define _MATCH_SEQUENCE_r23 1449 -#define _MAYBE_EXPAND_METHOD_r00 1450 -#define _MAYBE_EXPAND_METHOD_KW_r11 1451 -#define _MONITOR_CALL_r00 1452 -#define _MONITOR_CALL_KW_r11 1453 -#define _MONITOR_JUMP_BACKWARD_r00 1454 -#define _MONITOR_JUMP_BACKWARD_r11 1455 -#define _MONITOR_JUMP_BACKWARD_r22 1456 -#define _MONITOR_JUMP_BACKWARD_r33 1457 -#define _MONITOR_RESUME_r00 1458 -#define _NOP_r00 1459 -#define _NOP_r11 1460 -#define _NOP_r22 1461 -#define _NOP_r33 1462 -#define _POP_EXCEPT_r10 1463 -#define _POP_ITER_r20 1464 -#define _POP_JUMP_IF_FALSE_r00 1465 -#define _POP_JUMP_IF_FALSE_r10 1466 -#define _POP_JUMP_IF_FALSE_r21 1467 -#define _POP_JUMP_IF_FALSE_r32 1468 -#define _POP_JUMP_IF_TRUE_r00 1469 -#define _POP_JUMP_IF_TRUE_r10 1470 -#define _POP_JUMP_IF_TRUE_r21 1471 -#define _POP_JUMP_IF_TRUE_r32 1472 -#define _POP_TOP_r10 1473 -#define _POP_TOP_FLOAT_r00 1474 -#define _POP_TOP_FLOAT_r10 1475 -#define _POP_TOP_FLOAT_r21 1476 -#define _POP_TOP_FLOAT_r32 1477 -#define _POP_TOP_INT_r00 1478 -#define _POP_TOP_INT_r10 1479 -#define _POP_TOP_INT_r21 1480 -#define _POP_TOP_INT_r32 1481 -#define _POP_TOP_NOP_r00 1482 -#define _POP_TOP_NOP_r10 1483 -#define _POP_TOP_NOP_r21 1484 -#define _POP_TOP_NOP_r32 1485 -#define _POP_TOP_OPARG_r00 1486 -#define _POP_TOP_UNICODE_r00 1487 -#define _POP_TOP_UNICODE_r10 1488 -#define _POP_TOP_UNICODE_r21 1489 -#define _POP_TOP_UNICODE_r32 1490 -#define _PUSH_EXC_INFO_r02 1491 -#define _PUSH_EXC_INFO_r12 1492 -#define _PUSH_EXC_INFO_r23 1493 -#define _PUSH_FRAME_r10 1494 -#define _PUSH_NULL_r01 1495 -#define _PUSH_NULL_r12 1496 -#define _PUSH_NULL_r23 1497 -#define _PUSH_NULL_CONDITIONAL_r00 1498 -#define _PUSH_TAGGED_ZERO_r01 1499 -#define _PUSH_TAGGED_ZERO_r12 1500 -#define _PUSH_TAGGED_ZERO_r23 1501 -#define _PY_FRAME_EX_r31 1502 -#define _PY_FRAME_GENERAL_r01 1503 -#define _PY_FRAME_KW_r11 1504 -#define _REPLACE_WITH_TRUE_r02 1505 -#define _REPLACE_WITH_TRUE_r12 1506 -#define _REPLACE_WITH_TRUE_r23 1507 -#define _RESUME_CHECK_r00 1508 -#define _RESUME_CHECK_r11 1509 -#define _RESUME_CHECK_r22 1510 -#define _RESUME_CHECK_r33 1511 -#define _RETURN_GENERATOR_r01 1512 -#define _RETURN_VALUE_r11 1513 -#define _RROT_3_r03 1514 -#define _RROT_3_r13 1515 -#define _RROT_3_r23 1516 -#define _RROT_3_r33 1517 -#define _SAVE_RETURN_OFFSET_r00 1518 -#define _SAVE_RETURN_OFFSET_r11 1519 -#define _SAVE_RETURN_OFFSET_r22 1520 -#define _SAVE_RETURN_OFFSET_r33 1521 -#define _SEND_ASYNC_GEN_r33 1522 -#define _SEND_ASYNC_GEN_TIER_TWO_r33 1523 -#define _SEND_GEN_FRAME_r33 1524 -#define _SEND_VIRTUAL_r33 1525 -#define _SEND_VIRTUAL_TIER_TWO_r03 1526 -#define _SEND_VIRTUAL_TIER_TWO_r13 1527 -#define _SEND_VIRTUAL_TIER_TWO_r23 1528 -#define _SEND_VIRTUAL_TIER_TWO_r33 1529 -#define _SETUP_ANNOTATIONS_r00 1530 -#define _SET_ADD_r10 1531 -#define _SET_FUNCTION_ATTRIBUTE_r01 1532 -#define _SET_FUNCTION_ATTRIBUTE_r11 1533 -#define _SET_FUNCTION_ATTRIBUTE_r21 1534 -#define _SET_FUNCTION_ATTRIBUTE_r32 1535 -#define _SET_IP_r00 1536 -#define _SET_IP_r11 1537 -#define _SET_IP_r22 1538 -#define _SET_IP_r33 1539 -#define _SET_UPDATE_r11 1540 -#define _SPILL_OR_RELOAD_r01 1541 -#define _SPILL_OR_RELOAD_r02 1542 -#define _SPILL_OR_RELOAD_r03 1543 -#define _SPILL_OR_RELOAD_r10 1544 -#define _SPILL_OR_RELOAD_r12 1545 -#define _SPILL_OR_RELOAD_r13 1546 -#define _SPILL_OR_RELOAD_r20 1547 -#define _SPILL_OR_RELOAD_r21 1548 -#define _SPILL_OR_RELOAD_r23 1549 -#define _SPILL_OR_RELOAD_r30 1550 -#define _SPILL_OR_RELOAD_r31 1551 -#define _SPILL_OR_RELOAD_r32 1552 -#define _START_EXECUTOR_r00 1553 -#define _STORE_ATTR_r20 1554 -#define _STORE_ATTR_INSTANCE_VALUE_r21 1555 -#define _STORE_ATTR_SLOT_r21 1556 -#define _STORE_ATTR_WITH_HINT_r21 1557 -#define _STORE_DEREF_r10 1558 -#define _STORE_FAST_LOAD_FAST_r11 1559 -#define _STORE_FAST_STORE_FAST_r20 1560 -#define _STORE_GLOBAL_r10 1561 -#define _STORE_NAME_r10 1562 -#define _STORE_SLICE_r30 1563 -#define _STORE_SUBSCR_r30 1564 -#define _STORE_SUBSCR_DICT_r31 1565 -#define _STORE_SUBSCR_DICT_KNOWN_HASH_r31 1566 -#define _STORE_SUBSCR_LIST_INT_r32 1567 -#define _SWAP_r11 1568 -#define _SWAP_2_r02 1569 -#define _SWAP_2_r12 1570 -#define _SWAP_2_r22 1571 -#define _SWAP_2_r33 1572 -#define _SWAP_3_r03 1573 -#define _SWAP_3_r13 1574 -#define _SWAP_3_r23 1575 -#define _SWAP_3_r33 1576 -#define _SWAP_FAST_r01 1577 -#define _SWAP_FAST_r11 1578 -#define _SWAP_FAST_r22 1579 -#define _SWAP_FAST_r33 1580 -#define _SWAP_FAST_0_r01 1581 -#define _SWAP_FAST_0_r11 1582 -#define _SWAP_FAST_0_r22 1583 -#define _SWAP_FAST_0_r33 1584 -#define _SWAP_FAST_1_r01 1585 -#define _SWAP_FAST_1_r11 1586 -#define _SWAP_FAST_1_r22 1587 -#define _SWAP_FAST_1_r33 1588 -#define _SWAP_FAST_2_r01 1589 -#define _SWAP_FAST_2_r11 1590 -#define _SWAP_FAST_2_r22 1591 -#define _SWAP_FAST_2_r33 1592 -#define _SWAP_FAST_3_r01 1593 -#define _SWAP_FAST_3_r11 1594 -#define _SWAP_FAST_3_r22 1595 -#define _SWAP_FAST_3_r33 1596 -#define _SWAP_FAST_4_r01 1597 -#define _SWAP_FAST_4_r11 1598 -#define _SWAP_FAST_4_r22 1599 -#define _SWAP_FAST_4_r33 1600 -#define _SWAP_FAST_5_r01 1601 -#define _SWAP_FAST_5_r11 1602 -#define _SWAP_FAST_5_r22 1603 -#define _SWAP_FAST_5_r33 1604 -#define _SWAP_FAST_6_r01 1605 -#define _SWAP_FAST_6_r11 1606 -#define _SWAP_FAST_6_r22 1607 -#define _SWAP_FAST_6_r33 1608 -#define _SWAP_FAST_7_r01 1609 -#define _SWAP_FAST_7_r11 1610 -#define _SWAP_FAST_7_r22 1611 -#define _SWAP_FAST_7_r33 1612 -#define _TIER2_RESUME_CHECK_r00 1613 -#define _TIER2_RESUME_CHECK_r11 1614 -#define _TIER2_RESUME_CHECK_r22 1615 -#define _TIER2_RESUME_CHECK_r33 1616 -#define _TO_BOOL_r11 1617 -#define _TO_BOOL_BOOL_r01 1618 -#define _TO_BOOL_BOOL_r11 1619 -#define _TO_BOOL_BOOL_r22 1620 -#define _TO_BOOL_BOOL_r33 1621 -#define _TO_BOOL_INT_r02 1622 -#define _TO_BOOL_INT_r12 1623 -#define _TO_BOOL_INT_r23 1624 -#define _TO_BOOL_LIST_r02 1625 -#define _TO_BOOL_LIST_r12 1626 -#define _TO_BOOL_LIST_r23 1627 -#define _TO_BOOL_NONE_r01 1628 -#define _TO_BOOL_NONE_r11 1629 -#define _TO_BOOL_NONE_r22 1630 -#define _TO_BOOL_NONE_r33 1631 -#define _TO_BOOL_STR_r02 1632 -#define _TO_BOOL_STR_r12 1633 -#define _TO_BOOL_STR_r23 1634 -#define _TRACE_RECORD_r00 1635 -#define _UNARY_INVERT_r12 1636 -#define _UNARY_NEGATIVE_r12 1637 -#define _UNARY_NEGATIVE_FLOAT_INPLACE_r02 1638 -#define _UNARY_NEGATIVE_FLOAT_INPLACE_r12 1639 -#define _UNARY_NEGATIVE_FLOAT_INPLACE_r23 1640 -#define _UNARY_NOT_r01 1641 -#define _UNARY_NOT_r11 1642 -#define _UNARY_NOT_r22 1643 -#define _UNARY_NOT_r33 1644 -#define _UNPACK_EX_r10 1645 -#define _UNPACK_SEQUENCE_r10 1646 -#define _UNPACK_SEQUENCE_LIST_r10 1647 -#define _UNPACK_SEQUENCE_TUPLE_r10 1648 -#define _UNPACK_SEQUENCE_TWO_TUPLE_r12 1649 -#define _UNPACK_SEQUENCE_UNIQUE_THREE_TUPLE_r03 1650 -#define _UNPACK_SEQUENCE_UNIQUE_THREE_TUPLE_r13 1651 -#define _UNPACK_SEQUENCE_UNIQUE_TUPLE_r10 1652 -#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r02 1653 -#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r12 1654 -#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r23 1655 -#define _WITH_EXCEPT_START_r33 1656 -#define _YIELD_VALUE_r11 1657 -#define MAX_UOP_REGS_ID 1657 +#define _DELETE_SUBSCR_r20 865 +#define _DEOPT_r00 866 +#define _DEOPT_r10 867 +#define _DEOPT_r20 868 +#define _DEOPT_r30 869 +#define _DICT_MERGE_r11 870 +#define _DICT_UPDATE_r11 871 +#define _DO_CALL_r01 872 +#define _DO_CALL_FUNCTION_EX_r31 873 +#define _DO_CALL_KW_r11 874 +#define _DYNAMIC_EXIT_r00 875 +#define _DYNAMIC_EXIT_r10 876 +#define _DYNAMIC_EXIT_r20 877 +#define _DYNAMIC_EXIT_r30 878 +#define _END_FOR_r10 879 +#define _END_SEND_r31 880 +#define _ERROR_POP_N_r00 881 +#define _EXIT_INIT_CHECK_r10 882 +#define _EXIT_TRACE_r00 883 +#define _EXIT_TRACE_r10 884 +#define _EXIT_TRACE_r20 885 +#define _EXIT_TRACE_r30 886 +#define _EXPAND_METHOD_r00 887 +#define _EXPAND_METHOD_KW_r11 888 +#define _FATAL_ERROR_r00 889 +#define _FATAL_ERROR_r11 890 +#define _FATAL_ERROR_r22 891 +#define _FATAL_ERROR_r33 892 +#define _FORMAT_SIMPLE_r11 893 +#define _FORMAT_WITH_SPEC_r21 894 +#define _FOR_ITER_r23 895 +#define _FOR_ITER_GEN_FRAME_r03 896 +#define _FOR_ITER_GEN_FRAME_r13 897 +#define _FOR_ITER_GEN_FRAME_r23 898 +#define _FOR_ITER_TIER_TWO_r23 899 +#define _FOR_ITER_VIRTUAL_r23 900 +#define _FOR_ITER_VIRTUAL_TIER_TWO_r23 901 +#define _GET_AITER_r11 902 +#define _GET_ANEXT_r12 903 +#define _GET_AWAITABLE_r11 904 +#define _GET_ITER_r12 905 +#define _GET_ITER_TRAD_r12 906 +#define _GET_LEN_r12 907 +#define _GUARD_3OS_ASYNC_GEN_ASEND_r03 908 +#define _GUARD_3OS_ASYNC_GEN_ASEND_r13 909 +#define _GUARD_3OS_ASYNC_GEN_ASEND_r23 910 +#define _GUARD_3OS_ASYNC_GEN_ASEND_r33 911 +#define _GUARD_BINARY_OP_EXTEND_r22 912 +#define _GUARD_BINARY_OP_EXTEND_LHS_r02 913 +#define _GUARD_BINARY_OP_EXTEND_LHS_r12 914 +#define _GUARD_BINARY_OP_EXTEND_LHS_r22 915 +#define _GUARD_BINARY_OP_EXTEND_LHS_r33 916 +#define _GUARD_BINARY_OP_EXTEND_RHS_r02 917 +#define _GUARD_BINARY_OP_EXTEND_RHS_r12 918 +#define _GUARD_BINARY_OP_EXTEND_RHS_r22 919 +#define _GUARD_BINARY_OP_EXTEND_RHS_r33 920 +#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r02 921 +#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r12 922 +#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r22 923 +#define _GUARD_BINARY_OP_SUBSCR_TUPLE_INT_BOUNDS_r33 924 +#define _GUARD_BIT_IS_SET_POP_r00 925 +#define _GUARD_BIT_IS_SET_POP_r10 926 +#define _GUARD_BIT_IS_SET_POP_r21 927 +#define _GUARD_BIT_IS_SET_POP_r32 928 +#define _GUARD_BIT_IS_SET_POP_4_r00 929 +#define _GUARD_BIT_IS_SET_POP_4_r10 930 +#define _GUARD_BIT_IS_SET_POP_4_r21 931 +#define _GUARD_BIT_IS_SET_POP_4_r32 932 +#define _GUARD_BIT_IS_SET_POP_5_r00 933 +#define _GUARD_BIT_IS_SET_POP_5_r10 934 +#define _GUARD_BIT_IS_SET_POP_5_r21 935 +#define _GUARD_BIT_IS_SET_POP_5_r32 936 +#define _GUARD_BIT_IS_SET_POP_6_r00 937 +#define _GUARD_BIT_IS_SET_POP_6_r10 938 +#define _GUARD_BIT_IS_SET_POP_6_r21 939 +#define _GUARD_BIT_IS_SET_POP_6_r32 940 +#define _GUARD_BIT_IS_SET_POP_7_r00 941 +#define _GUARD_BIT_IS_SET_POP_7_r10 942 +#define _GUARD_BIT_IS_SET_POP_7_r21 943 +#define _GUARD_BIT_IS_SET_POP_7_r32 944 +#define _GUARD_BIT_IS_UNSET_POP_r00 945 +#define _GUARD_BIT_IS_UNSET_POP_r10 946 +#define _GUARD_BIT_IS_UNSET_POP_r21 947 +#define _GUARD_BIT_IS_UNSET_POP_r32 948 +#define _GUARD_BIT_IS_UNSET_POP_4_r00 949 +#define _GUARD_BIT_IS_UNSET_POP_4_r10 950 +#define _GUARD_BIT_IS_UNSET_POP_4_r21 951 +#define _GUARD_BIT_IS_UNSET_POP_4_r32 952 +#define _GUARD_BIT_IS_UNSET_POP_5_r00 953 +#define _GUARD_BIT_IS_UNSET_POP_5_r10 954 +#define _GUARD_BIT_IS_UNSET_POP_5_r21 955 +#define _GUARD_BIT_IS_UNSET_POP_5_r32 956 +#define _GUARD_BIT_IS_UNSET_POP_6_r00 957 +#define _GUARD_BIT_IS_UNSET_POP_6_r10 958 +#define _GUARD_BIT_IS_UNSET_POP_6_r21 959 +#define _GUARD_BIT_IS_UNSET_POP_6_r32 960 +#define _GUARD_BIT_IS_UNSET_POP_7_r00 961 +#define _GUARD_BIT_IS_UNSET_POP_7_r10 962 +#define _GUARD_BIT_IS_UNSET_POP_7_r21 963 +#define _GUARD_BIT_IS_UNSET_POP_7_r32 964 +#define _GUARD_CALLABLE_BUILTIN_CLASS_r00 965 +#define _GUARD_CALLABLE_BUILTIN_FAST_r00 966 +#define _GUARD_CALLABLE_BUILTIN_FAST_WITH_KEYWORDS_r00 967 +#define _GUARD_CALLABLE_BUILTIN_O_r00 968 +#define _GUARD_CALLABLE_ISINSTANCE_r03 969 +#define _GUARD_CALLABLE_ISINSTANCE_r13 970 +#define _GUARD_CALLABLE_ISINSTANCE_r23 971 +#define _GUARD_CALLABLE_ISINSTANCE_r33 972 +#define _GUARD_CALLABLE_LEN_r03 973 +#define _GUARD_CALLABLE_LEN_r13 974 +#define _GUARD_CALLABLE_LEN_r23 975 +#define _GUARD_CALLABLE_LEN_r33 976 +#define _GUARD_CALLABLE_LIST_APPEND_r03 977 +#define _GUARD_CALLABLE_LIST_APPEND_r13 978 +#define _GUARD_CALLABLE_LIST_APPEND_r23 979 +#define _GUARD_CALLABLE_LIST_APPEND_r33 980 +#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST_r00 981 +#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS_r00 982 +#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_NOARGS_r00 983 +#define _GUARD_CALLABLE_METHOD_DESCRIPTOR_O_r00 984 +#define _GUARD_CALLABLE_STR_1_r03 985 +#define _GUARD_CALLABLE_STR_1_r13 986 +#define _GUARD_CALLABLE_STR_1_r23 987 +#define _GUARD_CALLABLE_STR_1_r33 988 +#define _GUARD_CALLABLE_TUPLE_1_r03 989 +#define _GUARD_CALLABLE_TUPLE_1_r13 990 +#define _GUARD_CALLABLE_TUPLE_1_r23 991 +#define _GUARD_CALLABLE_TUPLE_1_r33 992 +#define _GUARD_CALLABLE_TYPE_1_r03 993 +#define _GUARD_CALLABLE_TYPE_1_r13 994 +#define _GUARD_CALLABLE_TYPE_1_r23 995 +#define _GUARD_CALLABLE_TYPE_1_r33 996 +#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r00 997 +#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r11 998 +#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r22 999 +#define _GUARD_CODE_VERSION_RETURN_GENERATOR_r33 1000 +#define _GUARD_CODE_VERSION_RETURN_VALUE_r00 1001 +#define _GUARD_CODE_VERSION_RETURN_VALUE_r11 1002 +#define _GUARD_CODE_VERSION_RETURN_VALUE_r22 1003 +#define _GUARD_CODE_VERSION_RETURN_VALUE_r33 1004 +#define _GUARD_CODE_VERSION_YIELD_VALUE_r00 1005 +#define _GUARD_CODE_VERSION_YIELD_VALUE_r11 1006 +#define _GUARD_CODE_VERSION_YIELD_VALUE_r22 1007 +#define _GUARD_CODE_VERSION_YIELD_VALUE_r33 1008 +#define _GUARD_CODE_VERSION__PUSH_FRAME_r00 1009 +#define _GUARD_CODE_VERSION__PUSH_FRAME_r11 1010 +#define _GUARD_CODE_VERSION__PUSH_FRAME_r22 1011 +#define _GUARD_CODE_VERSION__PUSH_FRAME_r33 1012 +#define _GUARD_DORV_NO_DICT_r01 1013 +#define _GUARD_DORV_NO_DICT_r11 1014 +#define _GUARD_DORV_NO_DICT_r22 1015 +#define _GUARD_DORV_NO_DICT_r33 1016 +#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r01 1017 +#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r11 1018 +#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r22 1019 +#define _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT_r33 1020 +#define _GUARD_GLOBALS_VERSION_r00 1021 +#define _GUARD_GLOBALS_VERSION_r11 1022 +#define _GUARD_GLOBALS_VERSION_r22 1023 +#define _GUARD_GLOBALS_VERSION_r33 1024 +#define _GUARD_IP_RETURN_GENERATOR_r00 1025 +#define _GUARD_IP_RETURN_GENERATOR_r11 1026 +#define _GUARD_IP_RETURN_GENERATOR_r22 1027 +#define _GUARD_IP_RETURN_GENERATOR_r33 1028 +#define _GUARD_IP_RETURN_VALUE_r00 1029 +#define _GUARD_IP_RETURN_VALUE_r11 1030 +#define _GUARD_IP_RETURN_VALUE_r22 1031 +#define _GUARD_IP_RETURN_VALUE_r33 1032 +#define _GUARD_IP_YIELD_VALUE_r00 1033 +#define _GUARD_IP_YIELD_VALUE_r11 1034 +#define _GUARD_IP_YIELD_VALUE_r22 1035 +#define _GUARD_IP_YIELD_VALUE_r33 1036 +#define _GUARD_IP__PUSH_FRAME_r00 1037 +#define _GUARD_IP__PUSH_FRAME_r11 1038 +#define _GUARD_IP__PUSH_FRAME_r22 1039 +#define _GUARD_IP__PUSH_FRAME_r33 1040 +#define _GUARD_IS_FALSE_POP_r00 1041 +#define _GUARD_IS_FALSE_POP_r10 1042 +#define _GUARD_IS_FALSE_POP_r21 1043 +#define _GUARD_IS_FALSE_POP_r32 1044 +#define _GUARD_IS_NONE_POP_r00 1045 +#define _GUARD_IS_NONE_POP_r10 1046 +#define _GUARD_IS_NONE_POP_r21 1047 +#define _GUARD_IS_NONE_POP_r32 1048 +#define _GUARD_IS_NOT_NONE_POP_r10 1049 +#define _GUARD_IS_TRUE_POP_r00 1050 +#define _GUARD_IS_TRUE_POP_r10 1051 +#define _GUARD_IS_TRUE_POP_r21 1052 +#define _GUARD_IS_TRUE_POP_r32 1053 +#define _GUARD_ITERATOR_r01 1054 +#define _GUARD_ITERATOR_r11 1055 +#define _GUARD_ITERATOR_r22 1056 +#define _GUARD_ITERATOR_r33 1057 +#define _GUARD_ITER_VIRTUAL_r01 1058 +#define _GUARD_ITER_VIRTUAL_r11 1059 +#define _GUARD_ITER_VIRTUAL_r22 1060 +#define _GUARD_ITER_VIRTUAL_r33 1061 +#define _GUARD_KEYS_VERSION_r01 1062 +#define _GUARD_KEYS_VERSION_r11 1063 +#define _GUARD_KEYS_VERSION_r22 1064 +#define _GUARD_KEYS_VERSION_r33 1065 +#define _GUARD_LOAD_SUPER_ATTR_METHOD_r03 1066 +#define _GUARD_LOAD_SUPER_ATTR_METHOD_r13 1067 +#define _GUARD_LOAD_SUPER_ATTR_METHOD_r23 1068 +#define _GUARD_LOAD_SUPER_ATTR_METHOD_r33 1069 +#define _GUARD_NOS_COMPACT_ASCII_r02 1070 +#define _GUARD_NOS_COMPACT_ASCII_r12 1071 +#define _GUARD_NOS_COMPACT_ASCII_r22 1072 +#define _GUARD_NOS_COMPACT_ASCII_r33 1073 +#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r03 1074 +#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r13 1075 +#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r23 1076 +#define _GUARD_NOS_DICT_STORE_SUBSCRIPT_r33 1077 +#define _GUARD_NOS_DICT_SUBSCRIPT_r02 1078 +#define _GUARD_NOS_DICT_SUBSCRIPT_r12 1079 +#define _GUARD_NOS_DICT_SUBSCRIPT_r22 1080 +#define _GUARD_NOS_DICT_SUBSCRIPT_r33 1081 +#define _GUARD_NOS_FLOAT_r02 1082 +#define _GUARD_NOS_FLOAT_r12 1083 +#define _GUARD_NOS_FLOAT_r22 1084 +#define _GUARD_NOS_FLOAT_r33 1085 +#define _GUARD_NOS_INT_r02 1086 +#define _GUARD_NOS_INT_r12 1087 +#define _GUARD_NOS_INT_r22 1088 +#define _GUARD_NOS_INT_r33 1089 +#define _GUARD_NOS_ITER_VIRTUAL_r02 1090 +#define _GUARD_NOS_ITER_VIRTUAL_r12 1091 +#define _GUARD_NOS_ITER_VIRTUAL_r22 1092 +#define _GUARD_NOS_ITER_VIRTUAL_r33 1093 +#define _GUARD_NOS_LIST_r02 1094 +#define _GUARD_NOS_LIST_r12 1095 +#define _GUARD_NOS_LIST_r22 1096 +#define _GUARD_NOS_LIST_r33 1097 +#define _GUARD_NOS_NOT_NULL_r02 1098 +#define _GUARD_NOS_NOT_NULL_r12 1099 +#define _GUARD_NOS_NOT_NULL_r22 1100 +#define _GUARD_NOS_NOT_NULL_r33 1101 +#define _GUARD_NOS_NULL_r02 1102 +#define _GUARD_NOS_NULL_r12 1103 +#define _GUARD_NOS_NULL_r22 1104 +#define _GUARD_NOS_NULL_r33 1105 +#define _GUARD_NOS_OVERFLOWED_r02 1106 +#define _GUARD_NOS_OVERFLOWED_r12 1107 +#define _GUARD_NOS_OVERFLOWED_r22 1108 +#define _GUARD_NOS_OVERFLOWED_r33 1109 +#define _GUARD_NOS_TUPLE_r02 1110 +#define _GUARD_NOS_TUPLE_r12 1111 +#define _GUARD_NOS_TUPLE_r22 1112 +#define _GUARD_NOS_TUPLE_r33 1113 +#define _GUARD_NOS_TYPE_VERSION_r02 1114 +#define _GUARD_NOS_TYPE_VERSION_r12 1115 +#define _GUARD_NOS_TYPE_VERSION_r22 1116 +#define _GUARD_NOS_TYPE_VERSION_r33 1117 +#define _GUARD_NOS_UNICODE_r02 1118 +#define _GUARD_NOS_UNICODE_r12 1119 +#define _GUARD_NOS_UNICODE_r22 1120 +#define _GUARD_NOS_UNICODE_r33 1121 +#define _GUARD_NOT_EXHAUSTED_LIST_r02 1122 +#define _GUARD_NOT_EXHAUSTED_LIST_r12 1123 +#define _GUARD_NOT_EXHAUSTED_LIST_r22 1124 +#define _GUARD_NOT_EXHAUSTED_LIST_r33 1125 +#define _GUARD_NOT_EXHAUSTED_RANGE_r02 1126 +#define _GUARD_NOT_EXHAUSTED_RANGE_r12 1127 +#define _GUARD_NOT_EXHAUSTED_RANGE_r22 1128 +#define _GUARD_NOT_EXHAUSTED_RANGE_r33 1129 +#define _GUARD_NOT_EXHAUSTED_TUPLE_r02 1130 +#define _GUARD_NOT_EXHAUSTED_TUPLE_r12 1131 +#define _GUARD_NOT_EXHAUSTED_TUPLE_r22 1132 +#define _GUARD_NOT_EXHAUSTED_TUPLE_r33 1133 +#define _GUARD_THIRD_NULL_r03 1134 +#define _GUARD_THIRD_NULL_r13 1135 +#define _GUARD_THIRD_NULL_r23 1136 +#define _GUARD_THIRD_NULL_r33 1137 +#define _GUARD_TOS_ANY_DICT_r01 1138 +#define _GUARD_TOS_ANY_DICT_r11 1139 +#define _GUARD_TOS_ANY_DICT_r22 1140 +#define _GUARD_TOS_ANY_DICT_r33 1141 +#define _GUARD_TOS_ANY_SET_r01 1142 +#define _GUARD_TOS_ANY_SET_r11 1143 +#define _GUARD_TOS_ANY_SET_r22 1144 +#define _GUARD_TOS_ANY_SET_r33 1145 +#define _GUARD_TOS_DICT_r01 1146 +#define _GUARD_TOS_DICT_r11 1147 +#define _GUARD_TOS_DICT_r22 1148 +#define _GUARD_TOS_DICT_r33 1149 +#define _GUARD_TOS_FLOAT_r01 1150 +#define _GUARD_TOS_FLOAT_r11 1151 +#define _GUARD_TOS_FLOAT_r22 1152 +#define _GUARD_TOS_FLOAT_r33 1153 +#define _GUARD_TOS_FROZENDICT_r01 1154 +#define _GUARD_TOS_FROZENDICT_r11 1155 +#define _GUARD_TOS_FROZENDICT_r22 1156 +#define _GUARD_TOS_FROZENDICT_r33 1157 +#define _GUARD_TOS_FROZENSET_r01 1158 +#define _GUARD_TOS_FROZENSET_r11 1159 +#define _GUARD_TOS_FROZENSET_r22 1160 +#define _GUARD_TOS_FROZENSET_r33 1161 +#define _GUARD_TOS_INT_r01 1162 +#define _GUARD_TOS_INT_r11 1163 +#define _GUARD_TOS_INT_r22 1164 +#define _GUARD_TOS_INT_r33 1165 +#define _GUARD_TOS_IS_NONE_r01 1166 +#define _GUARD_TOS_IS_NONE_r11 1167 +#define _GUARD_TOS_IS_NONE_r22 1168 +#define _GUARD_TOS_IS_NONE_r33 1169 +#define _GUARD_TOS_LIST_r01 1170 +#define _GUARD_TOS_LIST_r11 1171 +#define _GUARD_TOS_LIST_r22 1172 +#define _GUARD_TOS_LIST_r33 1173 +#define _GUARD_TOS_NOT_NULL_r01 1174 +#define _GUARD_TOS_NOT_NULL_r11 1175 +#define _GUARD_TOS_NOT_NULL_r22 1176 +#define _GUARD_TOS_NOT_NULL_r33 1177 +#define _GUARD_TOS_OVERFLOWED_r01 1178 +#define _GUARD_TOS_OVERFLOWED_r11 1179 +#define _GUARD_TOS_OVERFLOWED_r22 1180 +#define _GUARD_TOS_OVERFLOWED_r33 1181 +#define _GUARD_TOS_SET_r01 1182 +#define _GUARD_TOS_SET_r11 1183 +#define _GUARD_TOS_SET_r22 1184 +#define _GUARD_TOS_SET_r33 1185 +#define _GUARD_TOS_SLICE_r01 1186 +#define _GUARD_TOS_SLICE_r11 1187 +#define _GUARD_TOS_SLICE_r22 1188 +#define _GUARD_TOS_SLICE_r33 1189 +#define _GUARD_TOS_TUPLE_r01 1190 +#define _GUARD_TOS_TUPLE_r11 1191 +#define _GUARD_TOS_TUPLE_r22 1192 +#define _GUARD_TOS_TUPLE_r33 1193 +#define _GUARD_TOS_UNICODE_r01 1194 +#define _GUARD_TOS_UNICODE_r11 1195 +#define _GUARD_TOS_UNICODE_r22 1196 +#define _GUARD_TOS_UNICODE_r33 1197 +#define _GUARD_TYPE_r01 1198 +#define _GUARD_TYPE_r11 1199 +#define _GUARD_TYPE_r22 1200 +#define _GUARD_TYPE_r33 1201 +#define _GUARD_TYPE_ITER_r02 1202 +#define _GUARD_TYPE_ITER_r12 1203 +#define _GUARD_TYPE_ITER_r22 1204 +#define _GUARD_TYPE_ITER_r33 1205 +#define _GUARD_TYPE_VERSION_r01 1206 +#define _GUARD_TYPE_VERSION_r11 1207 +#define _GUARD_TYPE_VERSION_r22 1208 +#define _GUARD_TYPE_VERSION_r33 1209 +#define _GUARD_TYPE_VERSION_LOCKED_r01 1210 +#define _GUARD_TYPE_VERSION_LOCKED_r11 1211 +#define _GUARD_TYPE_VERSION_LOCKED_r22 1212 +#define _GUARD_TYPE_VERSION_LOCKED_r33 1213 +#define _HANDLE_PENDING_AND_DEOPT_r00 1214 +#define _HANDLE_PENDING_AND_DEOPT_r10 1215 +#define _HANDLE_PENDING_AND_DEOPT_r20 1216 +#define _HANDLE_PENDING_AND_DEOPT_r30 1217 +#define _IMPORT_FROM_r12 1218 +#define _IMPORT_NAME_r21 1219 +#define _INIT_CALL_BOUND_METHOD_EXACT_ARGS_r00 1220 +#define _INIT_CALL_PY_EXACT_ARGS_r01 1221 +#define _INIT_CALL_PY_EXACT_ARGS_0_r01 1222 +#define _INIT_CALL_PY_EXACT_ARGS_1_r01 1223 +#define _INIT_CALL_PY_EXACT_ARGS_2_r01 1224 +#define _INIT_CALL_PY_EXACT_ARGS_3_r01 1225 +#define _INIT_CALL_PY_EXACT_ARGS_4_r01 1226 +#define _INSERT_NULL_r10 1227 +#define _INSTRUMENTED_FOR_ITER_r23 1228 +#define _INSTRUMENTED_INSTRUCTION_r00 1229 +#define _INSTRUMENTED_JUMP_FORWARD_r00 1230 +#define _INSTRUMENTED_JUMP_FORWARD_r11 1231 +#define _INSTRUMENTED_JUMP_FORWARD_r22 1232 +#define _INSTRUMENTED_JUMP_FORWARD_r33 1233 +#define _INSTRUMENTED_LINE_r00 1234 +#define _INSTRUMENTED_NOT_TAKEN_r00 1235 +#define _INSTRUMENTED_NOT_TAKEN_r11 1236 +#define _INSTRUMENTED_NOT_TAKEN_r22 1237 +#define _INSTRUMENTED_NOT_TAKEN_r33 1238 +#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r00 1239 +#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r10 1240 +#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r21 1241 +#define _INSTRUMENTED_POP_JUMP_IF_FALSE_r32 1242 +#define _INSTRUMENTED_POP_JUMP_IF_NONE_r10 1243 +#define _INSTRUMENTED_POP_JUMP_IF_NOT_NONE_r10 1244 +#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r00 1245 +#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r10 1246 +#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r21 1247 +#define _INSTRUMENTED_POP_JUMP_IF_TRUE_r32 1248 +#define _IS_NONE_r11 1249 +#define _IS_OP_r03 1250 +#define _IS_OP_r13 1251 +#define _IS_OP_r23 1252 +#define _ITER_CHECK_LIST_r02 1253 +#define _ITER_CHECK_LIST_r12 1254 +#define _ITER_CHECK_LIST_r22 1255 +#define _ITER_CHECK_LIST_r33 1256 +#define _ITER_CHECK_RANGE_r02 1257 +#define _ITER_CHECK_RANGE_r12 1258 +#define _ITER_CHECK_RANGE_r22 1259 +#define _ITER_CHECK_RANGE_r33 1260 +#define _ITER_CHECK_TUPLE_r02 1261 +#define _ITER_CHECK_TUPLE_r12 1262 +#define _ITER_CHECK_TUPLE_r22 1263 +#define _ITER_CHECK_TUPLE_r33 1264 +#define _ITER_JUMP_LIST_r02 1265 +#define _ITER_JUMP_LIST_r12 1266 +#define _ITER_JUMP_LIST_r22 1267 +#define _ITER_JUMP_LIST_r33 1268 +#define _ITER_JUMP_RANGE_r02 1269 +#define _ITER_JUMP_RANGE_r12 1270 +#define _ITER_JUMP_RANGE_r22 1271 +#define _ITER_JUMP_RANGE_r33 1272 +#define _ITER_JUMP_TUPLE_r02 1273 +#define _ITER_JUMP_TUPLE_r12 1274 +#define _ITER_JUMP_TUPLE_r22 1275 +#define _ITER_JUMP_TUPLE_r33 1276 +#define _ITER_NEXT_INLINE_r23 1277 +#define _ITER_NEXT_LIST_r23 1278 +#define _ITER_NEXT_LIST_TIER_TWO_r23 1279 +#define _ITER_NEXT_RANGE_r03 1280 +#define _ITER_NEXT_RANGE_r13 1281 +#define _ITER_NEXT_RANGE_r23 1282 +#define _ITER_NEXT_TUPLE_r03 1283 +#define _ITER_NEXT_TUPLE_r13 1284 +#define _ITER_NEXT_TUPLE_r23 1285 +#define _JUMP_BACKWARD_NO_INTERRUPT_r00 1286 +#define _JUMP_BACKWARD_NO_INTERRUPT_r11 1287 +#define _JUMP_BACKWARD_NO_INTERRUPT_r22 1288 +#define _JUMP_BACKWARD_NO_INTERRUPT_r33 1289 +#define _JUMP_TO_TOP_r00 1290 +#define _LIST_APPEND_r10 1291 +#define _LIST_EXTEND_r11 1292 +#define _LOAD_ATTR_r10 1293 +#define _LOAD_ATTR_CLASS_r11 1294 +#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN_FRAME_r11 1295 +#define _LOAD_ATTR_INSTANCE_VALUE_r02 1296 +#define _LOAD_ATTR_INSTANCE_VALUE_r12 1297 +#define _LOAD_ATTR_INSTANCE_VALUE_r23 1298 +#define _LOAD_ATTR_METHOD_LAZY_DICT_r02 1299 +#define _LOAD_ATTR_METHOD_LAZY_DICT_r12 1300 +#define _LOAD_ATTR_METHOD_LAZY_DICT_r23 1301 +#define _LOAD_ATTR_METHOD_NO_DICT_r02 1302 +#define _LOAD_ATTR_METHOD_NO_DICT_r12 1303 +#define _LOAD_ATTR_METHOD_NO_DICT_r23 1304 +#define _LOAD_ATTR_METHOD_WITH_VALUES_r02 1305 +#define _LOAD_ATTR_METHOD_WITH_VALUES_r12 1306 +#define _LOAD_ATTR_METHOD_WITH_VALUES_r23 1307 +#define _LOAD_ATTR_MODULE_r12 1308 +#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT_r11 1309 +#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES_r11 1310 +#define _LOAD_ATTR_PROPERTY_FRAME_r01 1311 +#define _LOAD_ATTR_PROPERTY_FRAME_r11 1312 +#define _LOAD_ATTR_PROPERTY_FRAME_r22 1313 +#define _LOAD_ATTR_PROPERTY_FRAME_r33 1314 +#define _LOAD_ATTR_SLOT_r02 1315 +#define _LOAD_ATTR_SLOT_r12 1316 +#define _LOAD_ATTR_SLOT_r23 1317 +#define _LOAD_ATTR_WITH_HINT_r12 1318 +#define _LOAD_BUILD_CLASS_r01 1319 +#define _LOAD_BYTECODE_r00 1320 +#define _LOAD_COMMON_CONSTANT_r01 1321 +#define _LOAD_COMMON_CONSTANT_r12 1322 +#define _LOAD_COMMON_CONSTANT_r23 1323 +#define _LOAD_CONST_r01 1324 +#define _LOAD_CONST_r12 1325 +#define _LOAD_CONST_r23 1326 +#define _LOAD_CONST_INLINE_r01 1327 +#define _LOAD_CONST_INLINE_r12 1328 +#define _LOAD_CONST_INLINE_r23 1329 +#define _LOAD_CONST_INLINE_BORROW_r01 1330 +#define _LOAD_CONST_INLINE_BORROW_r12 1331 +#define _LOAD_CONST_INLINE_BORROW_r23 1332 +#define _LOAD_DEREF_r01 1333 +#define _LOAD_FAST_r01 1334 +#define _LOAD_FAST_r12 1335 +#define _LOAD_FAST_r23 1336 +#define _LOAD_FAST_0_r01 1337 +#define _LOAD_FAST_0_r12 1338 +#define _LOAD_FAST_0_r23 1339 +#define _LOAD_FAST_1_r01 1340 +#define _LOAD_FAST_1_r12 1341 +#define _LOAD_FAST_1_r23 1342 +#define _LOAD_FAST_2_r01 1343 +#define _LOAD_FAST_2_r12 1344 +#define _LOAD_FAST_2_r23 1345 +#define _LOAD_FAST_3_r01 1346 +#define _LOAD_FAST_3_r12 1347 +#define _LOAD_FAST_3_r23 1348 +#define _LOAD_FAST_4_r01 1349 +#define _LOAD_FAST_4_r12 1350 +#define _LOAD_FAST_4_r23 1351 +#define _LOAD_FAST_5_r01 1352 +#define _LOAD_FAST_5_r12 1353 +#define _LOAD_FAST_5_r23 1354 +#define _LOAD_FAST_6_r01 1355 +#define _LOAD_FAST_6_r12 1356 +#define _LOAD_FAST_6_r23 1357 +#define _LOAD_FAST_7_r01 1358 +#define _LOAD_FAST_7_r12 1359 +#define _LOAD_FAST_7_r23 1360 +#define _LOAD_FAST_AND_CLEAR_r01 1361 +#define _LOAD_FAST_AND_CLEAR_r12 1362 +#define _LOAD_FAST_AND_CLEAR_r23 1363 +#define _LOAD_FAST_BORROW_r01 1364 +#define _LOAD_FAST_BORROW_r12 1365 +#define _LOAD_FAST_BORROW_r23 1366 +#define _LOAD_FAST_BORROW_0_r01 1367 +#define _LOAD_FAST_BORROW_0_r12 1368 +#define _LOAD_FAST_BORROW_0_r23 1369 +#define _LOAD_FAST_BORROW_1_r01 1370 +#define _LOAD_FAST_BORROW_1_r12 1371 +#define _LOAD_FAST_BORROW_1_r23 1372 +#define _LOAD_FAST_BORROW_2_r01 1373 +#define _LOAD_FAST_BORROW_2_r12 1374 +#define _LOAD_FAST_BORROW_2_r23 1375 +#define _LOAD_FAST_BORROW_3_r01 1376 +#define _LOAD_FAST_BORROW_3_r12 1377 +#define _LOAD_FAST_BORROW_3_r23 1378 +#define _LOAD_FAST_BORROW_4_r01 1379 +#define _LOAD_FAST_BORROW_4_r12 1380 +#define _LOAD_FAST_BORROW_4_r23 1381 +#define _LOAD_FAST_BORROW_5_r01 1382 +#define _LOAD_FAST_BORROW_5_r12 1383 +#define _LOAD_FAST_BORROW_5_r23 1384 +#define _LOAD_FAST_BORROW_6_r01 1385 +#define _LOAD_FAST_BORROW_6_r12 1386 +#define _LOAD_FAST_BORROW_6_r23 1387 +#define _LOAD_FAST_BORROW_7_r01 1388 +#define _LOAD_FAST_BORROW_7_r12 1389 +#define _LOAD_FAST_BORROW_7_r23 1390 +#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r02 1391 +#define _LOAD_FAST_BORROW_LOAD_FAST_BORROW_r13 1392 +#define _LOAD_FAST_CHECK_r01 1393 +#define _LOAD_FAST_CHECK_r12 1394 +#define _LOAD_FAST_CHECK_r23 1395 +#define _LOAD_FAST_LOAD_FAST_r02 1396 +#define _LOAD_FAST_LOAD_FAST_r13 1397 +#define _LOAD_FROM_DICT_OR_DEREF_r11 1398 +#define _LOAD_FROM_DICT_OR_GLOBALS_r11 1399 +#define _LOAD_GLOBAL_r00 1400 +#define _LOAD_GLOBAL_BUILTINS_r01 1401 +#define _LOAD_GLOBAL_MODULE_r01 1402 +#define _LOAD_LOCALS_r01 1403 +#define _LOAD_LOCALS_r12 1404 +#define _LOAD_LOCALS_r23 1405 +#define _LOAD_NAME_r01 1406 +#define _LOAD_SMALL_INT_r01 1407 +#define _LOAD_SMALL_INT_r12 1408 +#define _LOAD_SMALL_INT_r23 1409 +#define _LOAD_SMALL_INT_0_r01 1410 +#define _LOAD_SMALL_INT_0_r12 1411 +#define _LOAD_SMALL_INT_0_r23 1412 +#define _LOAD_SMALL_INT_1_r01 1413 +#define _LOAD_SMALL_INT_1_r12 1414 +#define _LOAD_SMALL_INT_1_r23 1415 +#define _LOAD_SMALL_INT_2_r01 1416 +#define _LOAD_SMALL_INT_2_r12 1417 +#define _LOAD_SMALL_INT_2_r23 1418 +#define _LOAD_SMALL_INT_3_r01 1419 +#define _LOAD_SMALL_INT_3_r12 1420 +#define _LOAD_SMALL_INT_3_r23 1421 +#define _LOAD_SPECIAL_r00 1422 +#define _LOAD_SUPER_ATTR_ATTR_r31 1423 +#define _LOAD_SUPER_ATTR_METHOD_r32 1424 +#define _LOCK_OBJECT_r01 1425 +#define _LOCK_OBJECT_r11 1426 +#define _LOCK_OBJECT_r22 1427 +#define _LOCK_OBJECT_r33 1428 +#define _MAKE_CALLARGS_A_TUPLE_r33 1429 +#define _MAKE_CELL_r00 1430 +#define _MAKE_FUNCTION_r12 1431 +#define _MAKE_HEAP_SAFE_r01 1432 +#define _MAKE_HEAP_SAFE_r11 1433 +#define _MAKE_HEAP_SAFE_r22 1434 +#define _MAKE_HEAP_SAFE_r33 1435 +#define _MAKE_WARM_r00 1436 +#define _MAKE_WARM_r11 1437 +#define _MAKE_WARM_r22 1438 +#define _MAKE_WARM_r33 1439 +#define _MAP_ADD_r20 1440 +#define _MATCH_CLASS_r33 1441 +#define _MATCH_KEYS_r23 1442 +#define _MATCH_MAPPING_r02 1443 +#define _MATCH_MAPPING_r12 1444 +#define _MATCH_MAPPING_r23 1445 +#define _MATCH_SEQUENCE_r02 1446 +#define _MATCH_SEQUENCE_r12 1447 +#define _MATCH_SEQUENCE_r23 1448 +#define _MAYBE_EXPAND_METHOD_r00 1449 +#define _MAYBE_EXPAND_METHOD_KW_r11 1450 +#define _MONITOR_CALL_r00 1451 +#define _MONITOR_CALL_KW_r11 1452 +#define _MONITOR_JUMP_BACKWARD_r00 1453 +#define _MONITOR_JUMP_BACKWARD_r11 1454 +#define _MONITOR_JUMP_BACKWARD_r22 1455 +#define _MONITOR_JUMP_BACKWARD_r33 1456 +#define _MONITOR_RESUME_r00 1457 +#define _NOP_r00 1458 +#define _NOP_r11 1459 +#define _NOP_r22 1460 +#define _NOP_r33 1461 +#define _POP_EXCEPT_r10 1462 +#define _POP_ITER_r20 1463 +#define _POP_JUMP_IF_FALSE_r00 1464 +#define _POP_JUMP_IF_FALSE_r10 1465 +#define _POP_JUMP_IF_FALSE_r21 1466 +#define _POP_JUMP_IF_FALSE_r32 1467 +#define _POP_JUMP_IF_TRUE_r00 1468 +#define _POP_JUMP_IF_TRUE_r10 1469 +#define _POP_JUMP_IF_TRUE_r21 1470 +#define _POP_JUMP_IF_TRUE_r32 1471 +#define _POP_TOP_r10 1472 +#define _POP_TOP_FLOAT_r00 1473 +#define _POP_TOP_FLOAT_r10 1474 +#define _POP_TOP_FLOAT_r21 1475 +#define _POP_TOP_FLOAT_r32 1476 +#define _POP_TOP_INT_r00 1477 +#define _POP_TOP_INT_r10 1478 +#define _POP_TOP_INT_r21 1479 +#define _POP_TOP_INT_r32 1480 +#define _POP_TOP_NOP_r00 1481 +#define _POP_TOP_NOP_r10 1482 +#define _POP_TOP_NOP_r21 1483 +#define _POP_TOP_NOP_r32 1484 +#define _POP_TOP_OPARG_r00 1485 +#define _POP_TOP_UNICODE_r00 1486 +#define _POP_TOP_UNICODE_r10 1487 +#define _POP_TOP_UNICODE_r21 1488 +#define _POP_TOP_UNICODE_r32 1489 +#define _PUSH_EXC_INFO_r02 1490 +#define _PUSH_EXC_INFO_r12 1491 +#define _PUSH_EXC_INFO_r23 1492 +#define _PUSH_FRAME_r10 1493 +#define _PUSH_NULL_r01 1494 +#define _PUSH_NULL_r12 1495 +#define _PUSH_NULL_r23 1496 +#define _PUSH_NULL_CONDITIONAL_r00 1497 +#define _PUSH_TAGGED_ZERO_r01 1498 +#define _PUSH_TAGGED_ZERO_r12 1499 +#define _PUSH_TAGGED_ZERO_r23 1500 +#define _PY_FRAME_EX_r31 1501 +#define _PY_FRAME_GENERAL_r01 1502 +#define _PY_FRAME_KW_r11 1503 +#define _REPLACE_WITH_TRUE_r02 1504 +#define _REPLACE_WITH_TRUE_r12 1505 +#define _REPLACE_WITH_TRUE_r23 1506 +#define _RESUME_CHECK_r00 1507 +#define _RESUME_CHECK_r11 1508 +#define _RESUME_CHECK_r22 1509 +#define _RESUME_CHECK_r33 1510 +#define _RETURN_GENERATOR_r01 1511 +#define _RETURN_VALUE_r11 1512 +#define _RROT_3_r03 1513 +#define _RROT_3_r13 1514 +#define _RROT_3_r23 1515 +#define _RROT_3_r33 1516 +#define _SAVE_RETURN_OFFSET_r00 1517 +#define _SAVE_RETURN_OFFSET_r11 1518 +#define _SAVE_RETURN_OFFSET_r22 1519 +#define _SAVE_RETURN_OFFSET_r33 1520 +#define _SEND_ASYNC_GEN_r33 1521 +#define _SEND_ASYNC_GEN_TIER_TWO_r33 1522 +#define _SEND_GEN_FRAME_r33 1523 +#define _SEND_VIRTUAL_r33 1524 +#define _SEND_VIRTUAL_TIER_TWO_r03 1525 +#define _SEND_VIRTUAL_TIER_TWO_r13 1526 +#define _SEND_VIRTUAL_TIER_TWO_r23 1527 +#define _SEND_VIRTUAL_TIER_TWO_r33 1528 +#define _SETUP_ANNOTATIONS_r00 1529 +#define _SET_ADD_r10 1530 +#define _SET_FUNCTION_ATTRIBUTE_r01 1531 +#define _SET_FUNCTION_ATTRIBUTE_r11 1532 +#define _SET_FUNCTION_ATTRIBUTE_r21 1533 +#define _SET_FUNCTION_ATTRIBUTE_r32 1534 +#define _SET_IP_r00 1535 +#define _SET_IP_r11 1536 +#define _SET_IP_r22 1537 +#define _SET_IP_r33 1538 +#define _SET_UPDATE_r11 1539 +#define _SPILL_OR_RELOAD_r01 1540 +#define _SPILL_OR_RELOAD_r02 1541 +#define _SPILL_OR_RELOAD_r03 1542 +#define _SPILL_OR_RELOAD_r10 1543 +#define _SPILL_OR_RELOAD_r12 1544 +#define _SPILL_OR_RELOAD_r13 1545 +#define _SPILL_OR_RELOAD_r20 1546 +#define _SPILL_OR_RELOAD_r21 1547 +#define _SPILL_OR_RELOAD_r23 1548 +#define _SPILL_OR_RELOAD_r30 1549 +#define _SPILL_OR_RELOAD_r31 1550 +#define _SPILL_OR_RELOAD_r32 1551 +#define _START_EXECUTOR_r00 1552 +#define _STORE_ATTR_r20 1553 +#define _STORE_ATTR_INSTANCE_VALUE_r21 1554 +#define _STORE_ATTR_SLOT_r21 1555 +#define _STORE_ATTR_WITH_HINT_r21 1556 +#define _STORE_DEREF_r10 1557 +#define _STORE_FAST_LOAD_FAST_r11 1558 +#define _STORE_FAST_STORE_FAST_r20 1559 +#define _STORE_GLOBAL_r10 1560 +#define _STORE_NAME_r10 1561 +#define _STORE_SLICE_r30 1562 +#define _STORE_SUBSCR_r30 1563 +#define _STORE_SUBSCR_DICT_r31 1564 +#define _STORE_SUBSCR_DICT_KNOWN_HASH_r31 1565 +#define _STORE_SUBSCR_LIST_INT_r32 1566 +#define _SWAP_r11 1567 +#define _SWAP_2_r02 1568 +#define _SWAP_2_r12 1569 +#define _SWAP_2_r22 1570 +#define _SWAP_2_r33 1571 +#define _SWAP_3_r03 1572 +#define _SWAP_3_r13 1573 +#define _SWAP_3_r23 1574 +#define _SWAP_3_r33 1575 +#define _SWAP_FAST_r01 1576 +#define _SWAP_FAST_r11 1577 +#define _SWAP_FAST_r22 1578 +#define _SWAP_FAST_r33 1579 +#define _SWAP_FAST_0_r01 1580 +#define _SWAP_FAST_0_r11 1581 +#define _SWAP_FAST_0_r22 1582 +#define _SWAP_FAST_0_r33 1583 +#define _SWAP_FAST_1_r01 1584 +#define _SWAP_FAST_1_r11 1585 +#define _SWAP_FAST_1_r22 1586 +#define _SWAP_FAST_1_r33 1587 +#define _SWAP_FAST_2_r01 1588 +#define _SWAP_FAST_2_r11 1589 +#define _SWAP_FAST_2_r22 1590 +#define _SWAP_FAST_2_r33 1591 +#define _SWAP_FAST_3_r01 1592 +#define _SWAP_FAST_3_r11 1593 +#define _SWAP_FAST_3_r22 1594 +#define _SWAP_FAST_3_r33 1595 +#define _SWAP_FAST_4_r01 1596 +#define _SWAP_FAST_4_r11 1597 +#define _SWAP_FAST_4_r22 1598 +#define _SWAP_FAST_4_r33 1599 +#define _SWAP_FAST_5_r01 1600 +#define _SWAP_FAST_5_r11 1601 +#define _SWAP_FAST_5_r22 1602 +#define _SWAP_FAST_5_r33 1603 +#define _SWAP_FAST_6_r01 1604 +#define _SWAP_FAST_6_r11 1605 +#define _SWAP_FAST_6_r22 1606 +#define _SWAP_FAST_6_r33 1607 +#define _SWAP_FAST_7_r01 1608 +#define _SWAP_FAST_7_r11 1609 +#define _SWAP_FAST_7_r22 1610 +#define _SWAP_FAST_7_r33 1611 +#define _TIER2_RESUME_CHECK_r00 1612 +#define _TIER2_RESUME_CHECK_r11 1613 +#define _TIER2_RESUME_CHECK_r22 1614 +#define _TIER2_RESUME_CHECK_r33 1615 +#define _TO_BOOL_r11 1616 +#define _TO_BOOL_BOOL_r01 1617 +#define _TO_BOOL_BOOL_r11 1618 +#define _TO_BOOL_BOOL_r22 1619 +#define _TO_BOOL_BOOL_r33 1620 +#define _TO_BOOL_INT_r02 1621 +#define _TO_BOOL_INT_r12 1622 +#define _TO_BOOL_INT_r23 1623 +#define _TO_BOOL_LIST_r02 1624 +#define _TO_BOOL_LIST_r12 1625 +#define _TO_BOOL_LIST_r23 1626 +#define _TO_BOOL_NONE_r01 1627 +#define _TO_BOOL_NONE_r11 1628 +#define _TO_BOOL_NONE_r22 1629 +#define _TO_BOOL_NONE_r33 1630 +#define _TO_BOOL_STR_r02 1631 +#define _TO_BOOL_STR_r12 1632 +#define _TO_BOOL_STR_r23 1633 +#define _TRACE_RECORD_r00 1634 +#define _UNARY_INVERT_r12 1635 +#define _UNARY_NEGATIVE_r12 1636 +#define _UNARY_NEGATIVE_FLOAT_INPLACE_r02 1637 +#define _UNARY_NEGATIVE_FLOAT_INPLACE_r12 1638 +#define _UNARY_NEGATIVE_FLOAT_INPLACE_r23 1639 +#define _UNARY_NOT_r01 1640 +#define _UNARY_NOT_r11 1641 +#define _UNARY_NOT_r22 1642 +#define _UNARY_NOT_r33 1643 +#define _UNPACK_EX_r10 1644 +#define _UNPACK_SEQUENCE_r10 1645 +#define _UNPACK_SEQUENCE_LIST_r10 1646 +#define _UNPACK_SEQUENCE_TUPLE_r10 1647 +#define _UNPACK_SEQUENCE_TWO_TUPLE_r12 1648 +#define _UNPACK_SEQUENCE_UNIQUE_THREE_TUPLE_r03 1649 +#define _UNPACK_SEQUENCE_UNIQUE_THREE_TUPLE_r13 1650 +#define _UNPACK_SEQUENCE_UNIQUE_TUPLE_r10 1651 +#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r02 1652 +#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r12 1653 +#define _UNPACK_SEQUENCE_UNIQUE_TWO_TUPLE_r23 1654 +#define _WITH_EXCEPT_START_r33 1655 +#define _YIELD_VALUE_r11 1656 +#define MAX_UOP_REGS_ID 1656 #ifdef __cplusplus } diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h index 6b4621e49f4c2c..7bd144ccc4af2e 100644 --- a/Include/internal/pycore_uop_metadata.h +++ b/Include/internal/pycore_uop_metadata.h @@ -189,7 +189,6 @@ const uint32_t _PyUop_Flags[MAX_UOP_ID+1] = { [_STORE_ATTR] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_DELETE_ATTR] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_STORE_GLOBAL] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, - [_DELETE_GLOBAL] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG, [_LOAD_LOCALS] = HAS_ERROR_FLAG, [_LOAD_NAME] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_LOAD_GLOBAL] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, @@ -1834,15 +1833,6 @@ const _PyUopCachingInfo _PyUop_Caching[MAX_UOP_ID+1] = { { -1, -1, -1 }, }, }, - [_DELETE_GLOBAL] = { - .best = { 0, 0, 0, 0 }, - .entries = { - { 0, 0, _DELETE_GLOBAL_r00 }, - { -1, -1, -1 }, - { -1, -1, -1 }, - { -1, -1, -1 }, - }, - }, [_LOAD_LOCALS] = { .best = { 0, 1, 2, 2 }, .entries = { @@ -4330,7 +4320,6 @@ const uint16_t _PyUop_Uncached[MAX_UOP_REGS_ID+1] = { [_STORE_ATTR_r20] = _STORE_ATTR, [_DELETE_ATTR_r10] = _DELETE_ATTR, [_STORE_GLOBAL_r10] = _STORE_GLOBAL, - [_DELETE_GLOBAL_r00] = _DELETE_GLOBAL, [_LOAD_LOCALS_r01] = _LOAD_LOCALS, [_LOAD_LOCALS_r12] = _LOAD_LOCALS, [_LOAD_LOCALS_r23] = _LOAD_LOCALS, @@ -5196,8 +5185,6 @@ const char *const _PyOpcode_uop_name[MAX_UOP_REGS_ID+1] = { [_DELETE_DEREF_r00] = "_DELETE_DEREF_r00", [_DELETE_FAST] = "_DELETE_FAST", [_DELETE_FAST_r00] = "_DELETE_FAST_r00", - [_DELETE_GLOBAL] = "_DELETE_GLOBAL", - [_DELETE_GLOBAL_r00] = "_DELETE_GLOBAL_r00", [_DELETE_SUBSCR] = "_DELETE_SUBSCR", [_DELETE_SUBSCR_r20] = "_DELETE_SUBSCR_r20", [_DEOPT] = "_DEOPT", @@ -6519,8 +6506,6 @@ int _PyUop_num_popped(int opcode, int oparg) return 1; case _STORE_GLOBAL: return 1; - case _DELETE_GLOBAL: - return 0; case _LOAD_LOCALS: return 0; case _LOAD_NAME: diff --git a/Include/opcode_ids.h b/Include/opcode_ids.h index a09fdec4d95194..ccc5c820d80ea5 100644 --- a/Include/opcode_ids.h +++ b/Include/opcode_ids.h @@ -72,63 +72,62 @@ extern "C" { #define DELETE_ATTR 59 #define DELETE_DEREF 60 #define DELETE_FAST 61 -#define DELETE_GLOBAL 62 -#define DICT_MERGE 63 -#define DICT_UPDATE 64 -#define END_ASYNC_FOR 65 -#define EXTENDED_ARG 66 -#define FOR_ITER 67 -#define GET_AWAITABLE 68 -#define GET_ITER 69 -#define IMPORT_FROM 70 -#define IMPORT_NAME 71 -#define IS_OP 72 -#define JUMP_BACKWARD 73 -#define JUMP_BACKWARD_NO_INTERRUPT 74 -#define JUMP_FORWARD 75 -#define LIST_APPEND 76 -#define LIST_EXTEND 77 -#define LOAD_ATTR 78 -#define LOAD_COMMON_CONSTANT 79 -#define LOAD_CONST 80 -#define LOAD_DEREF 81 -#define LOAD_FAST 82 -#define LOAD_FAST_AND_CLEAR 83 -#define LOAD_FAST_BORROW 84 -#define LOAD_FAST_BORROW_LOAD_FAST_BORROW 85 -#define LOAD_FAST_CHECK 86 -#define LOAD_FAST_LOAD_FAST 87 -#define LOAD_FROM_DICT_OR_DEREF 88 -#define LOAD_FROM_DICT_OR_GLOBALS 89 -#define LOAD_GLOBAL 90 -#define LOAD_NAME 91 -#define LOAD_SMALL_INT 92 -#define LOAD_SPECIAL 93 -#define LOAD_SUPER_ATTR 94 -#define MAKE_CELL 95 -#define MAP_ADD 96 -#define MATCH_CLASS 97 -#define POP_JUMP_IF_FALSE 98 -#define POP_JUMP_IF_NONE 99 -#define POP_JUMP_IF_NOT_NONE 100 -#define POP_JUMP_IF_TRUE 101 -#define RAISE_VARARGS 102 -#define RERAISE 103 -#define SEND 104 -#define SET_ADD 105 -#define SET_FUNCTION_ATTRIBUTE 106 -#define SET_UPDATE 107 -#define STORE_ATTR 108 -#define STORE_DEREF 109 -#define STORE_FAST 110 -#define STORE_FAST_LOAD_FAST 111 -#define STORE_FAST_STORE_FAST 112 -#define STORE_GLOBAL 113 -#define STORE_NAME 114 -#define SWAP 115 -#define UNPACK_EX 116 -#define UNPACK_SEQUENCE 117 -#define YIELD_VALUE 118 +#define DICT_MERGE 62 +#define DICT_UPDATE 63 +#define END_ASYNC_FOR 64 +#define EXTENDED_ARG 65 +#define FOR_ITER 66 +#define GET_AWAITABLE 67 +#define GET_ITER 68 +#define IMPORT_FROM 69 +#define IMPORT_NAME 70 +#define IS_OP 71 +#define JUMP_BACKWARD 72 +#define JUMP_BACKWARD_NO_INTERRUPT 73 +#define JUMP_FORWARD 74 +#define LIST_APPEND 75 +#define LIST_EXTEND 76 +#define LOAD_ATTR 77 +#define LOAD_COMMON_CONSTANT 78 +#define LOAD_CONST 79 +#define LOAD_DEREF 80 +#define LOAD_FAST 81 +#define LOAD_FAST_AND_CLEAR 82 +#define LOAD_FAST_BORROW 83 +#define LOAD_FAST_BORROW_LOAD_FAST_BORROW 84 +#define LOAD_FAST_CHECK 85 +#define LOAD_FAST_LOAD_FAST 86 +#define LOAD_FROM_DICT_OR_DEREF 87 +#define LOAD_FROM_DICT_OR_GLOBALS 88 +#define LOAD_GLOBAL 89 +#define LOAD_NAME 90 +#define LOAD_SMALL_INT 91 +#define LOAD_SPECIAL 92 +#define LOAD_SUPER_ATTR 93 +#define MAKE_CELL 94 +#define MAP_ADD 95 +#define MATCH_CLASS 96 +#define POP_JUMP_IF_FALSE 97 +#define POP_JUMP_IF_NONE 98 +#define POP_JUMP_IF_NOT_NONE 99 +#define POP_JUMP_IF_TRUE 100 +#define RAISE_VARARGS 101 +#define RERAISE 102 +#define SEND 103 +#define SET_ADD 104 +#define SET_FUNCTION_ATTRIBUTE 105 +#define SET_UPDATE 106 +#define STORE_ATTR 107 +#define STORE_DEREF 108 +#define STORE_FAST 109 +#define STORE_FAST_LOAD_FAST 110 +#define STORE_FAST_STORE_FAST 111 +#define STORE_GLOBAL 112 +#define STORE_NAME 113 +#define SWAP 114 +#define UNPACK_EX 115 +#define UNPACK_SEQUENCE 116 +#define YIELD_VALUE 117 #define RESUME 128 #define BINARY_OP_ADD_FLOAT 129 #define BINARY_OP_ADD_INT 130 diff --git a/Lib/_opcode_metadata.py b/Lib/_opcode_metadata.py index 1ef5281085edd4..52fa52bbf57e76 100644 --- a/Lib/_opcode_metadata.py +++ b/Lib/_opcode_metadata.py @@ -292,63 +292,62 @@ DELETE_ATTR=59, DELETE_DEREF=60, DELETE_FAST=61, - DELETE_GLOBAL=62, - DICT_MERGE=63, - DICT_UPDATE=64, - END_ASYNC_FOR=65, - EXTENDED_ARG=66, - FOR_ITER=67, - GET_AWAITABLE=68, - GET_ITER=69, - IMPORT_FROM=70, - IMPORT_NAME=71, - IS_OP=72, - JUMP_BACKWARD=73, - JUMP_BACKWARD_NO_INTERRUPT=74, - JUMP_FORWARD=75, - LIST_APPEND=76, - LIST_EXTEND=77, - LOAD_ATTR=78, - LOAD_COMMON_CONSTANT=79, - LOAD_CONST=80, - LOAD_DEREF=81, - LOAD_FAST=82, - LOAD_FAST_AND_CLEAR=83, - LOAD_FAST_BORROW=84, - LOAD_FAST_BORROW_LOAD_FAST_BORROW=85, - LOAD_FAST_CHECK=86, - LOAD_FAST_LOAD_FAST=87, - LOAD_FROM_DICT_OR_DEREF=88, - LOAD_FROM_DICT_OR_GLOBALS=89, - LOAD_GLOBAL=90, - LOAD_NAME=91, - LOAD_SMALL_INT=92, - LOAD_SPECIAL=93, - LOAD_SUPER_ATTR=94, - MAKE_CELL=95, - MAP_ADD=96, - MATCH_CLASS=97, - POP_JUMP_IF_FALSE=98, - POP_JUMP_IF_NONE=99, - POP_JUMP_IF_NOT_NONE=100, - POP_JUMP_IF_TRUE=101, - RAISE_VARARGS=102, - RERAISE=103, - SEND=104, - SET_ADD=105, - SET_FUNCTION_ATTRIBUTE=106, - SET_UPDATE=107, - STORE_ATTR=108, - STORE_DEREF=109, - STORE_FAST=110, - STORE_FAST_LOAD_FAST=111, - STORE_FAST_STORE_FAST=112, - STORE_GLOBAL=113, - STORE_NAME=114, - SWAP=115, - UNPACK_EX=116, - UNPACK_SEQUENCE=117, - YIELD_VALUE=118, + DICT_MERGE=62, + DICT_UPDATE=63, + END_ASYNC_FOR=64, + EXTENDED_ARG=65, + FOR_ITER=66, + GET_AWAITABLE=67, + GET_ITER=68, + IMPORT_FROM=69, + IMPORT_NAME=70, + IS_OP=71, + JUMP_BACKWARD=72, + JUMP_BACKWARD_NO_INTERRUPT=73, + JUMP_FORWARD=74, + LIST_APPEND=75, + LIST_EXTEND=76, + LOAD_ATTR=77, + LOAD_COMMON_CONSTANT=78, + LOAD_CONST=79, + LOAD_DEREF=80, + LOAD_FAST=81, + LOAD_FAST_AND_CLEAR=82, + LOAD_FAST_BORROW=83, + LOAD_FAST_BORROW_LOAD_FAST_BORROW=84, + LOAD_FAST_CHECK=85, + LOAD_FAST_LOAD_FAST=86, + LOAD_FROM_DICT_OR_DEREF=87, + LOAD_FROM_DICT_OR_GLOBALS=88, + LOAD_GLOBAL=89, + LOAD_NAME=90, + LOAD_SMALL_INT=91, + LOAD_SPECIAL=92, + LOAD_SUPER_ATTR=93, + MAKE_CELL=94, + MAP_ADD=95, + MATCH_CLASS=96, + POP_JUMP_IF_FALSE=97, + POP_JUMP_IF_NONE=98, + POP_JUMP_IF_NOT_NONE=99, + POP_JUMP_IF_TRUE=100, + RAISE_VARARGS=101, + RERAISE=102, + SEND=103, + SET_ADD=104, + SET_FUNCTION_ATTRIBUTE=105, + SET_UPDATE=106, + STORE_ATTR=107, + STORE_DEREF=108, + STORE_FAST=109, + STORE_FAST_LOAD_FAST=110, + STORE_FAST_STORE_FAST=111, + STORE_GLOBAL=112, + STORE_NAME=113, + SWAP=114, + UNPACK_EX=115, + UNPACK_SEQUENCE=116, + YIELD_VALUE=117, INSTRUMENTED_END_FOR=233, INSTRUMENTED_POP_ITER=234, INSTRUMENTED_END_SEND=235, diff --git a/Lib/test/test_compiler_codegen.py b/Lib/test/test_compiler_codegen.py index 08cf54235f1c0d..8831af473c9d3f 100644 --- a/Lib/test/test_compiler_codegen.py +++ b/Lib/test/test_compiler_codegen.py @@ -154,6 +154,18 @@ def g(): ] self.codegen_test(snippet, expected) + def test_del_for_store_global(self): + snippet = "global x\ndel x" + expected = [ + ('RESUME', 0), + ('ANNOTATIONS_PLACEHOLDER', None), + ('PUSH_NULL', None), + ('STORE_GLOBAL', 0), + ('LOAD_CONST', 0), + ('RETURN_VALUE', None), + ] + self.codegen_test(snippet, expected) + def test_syntax_error__return_not_in_function(self): snippet = "return 42" with self.assertRaisesRegex(SyntaxError, "'return' outside function") as cm: diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-03-23-00-45-44.gh-issue-145857.dB66WV.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-03-23-00-45-44.gh-issue-145857.dB66WV.rst new file mode 100644 index 00000000000000..8fd4f078817d40 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-03-23-00-45-44.gh-issue-145857.dB66WV.rst @@ -0,0 +1 @@ +The ``DELETE_GLOBAL`` opcode is now replaced with ``PUSH_NULL; STORE_GLOBAL``. diff --git a/Modules/_testinternalcapi/test_cases.c.h b/Modules/_testinternalcapi/test_cases.c.h index 41d5ef14654277..f36c8192ff2662 100644 --- a/Modules/_testinternalcapi/test_cases.c.h +++ b/Modules/_testinternalcapi/test_cases.c.h @@ -5906,33 +5906,6 @@ DISPATCH(); } - TARGET(DELETE_GLOBAL) { - #if _Py_TAIL_CALL_INTERP - int opcode = DELETE_GLOBAL; - (void)(opcode); - #endif - frame->instr_ptr = next_instr; - next_instr += 1; - INSTRUCTION_STATS(DELETE_GLOBAL); - PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_Pop(GLOBALS(), name, NULL); - _PyFrame_StackPointerInvalidate(frame); - if (err < 0) { - JUMP_TO_LABEL(error); - } - if (err == 0) { - assert(stack_pointer == _PyFrame_GetStackPointer(frame)); - _PyFrame_StackPointerValidate(frame); - _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, - NAME_ERROR_MSG, name); - _PyFrame_StackPointerInvalidate(frame); - JUMP_TO_LABEL(error); - } - DISPATCH(); - } - TARGET(DELETE_SUBSCR) { #if _Py_TAIL_CALL_INTERP int opcode = DELETE_SUBSCR; @@ -12534,17 +12507,36 @@ _PyStackRef v; v = stack_pointer[-1]; PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); - _PyFrame_StackPointerInvalidate(frame); - stack_pointer += -1; - ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - PyStackRef_CLOSE(v); - _PyFrame_StackPointerInvalidate(frame); - if (err) { + int err; + if (PyStackRef_IsNull(v)) { + stack_pointer += -1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_Pop(GLOBALS(), name, NULL); + _PyFrame_StackPointerInvalidate(frame); + if (err == 0) { + err = -1; + assert(stack_pointer == _PyFrame_GetStackPointer(frame)); + _PyFrame_StackPointerValidate(frame); + _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, + NAME_ERROR_MSG, name); + _PyFrame_StackPointerInvalidate(frame); + } + } + else { + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); + _PyFrame_StackPointerInvalidate(frame); + stack_pointer += -1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + PyStackRef_CLOSE(v); + _PyFrame_StackPointerInvalidate(frame); + } + if (err < 0) { JUMP_TO_LABEL(error); } DISPATCH(); diff --git a/Modules/_testinternalcapi/test_targets.h b/Modules/_testinternalcapi/test_targets.h index bfad85bc472148..9133af14272348 100644 --- a/Modules/_testinternalcapi/test_targets.h +++ b/Modules/_testinternalcapi/test_targets.h @@ -62,7 +62,6 @@ static void *opcode_targets_table[256] = { &&TARGET_DELETE_ATTR, &&TARGET_DELETE_DEREF, &&TARGET_DELETE_FAST, - &&TARGET_DELETE_GLOBAL, &&TARGET_DICT_MERGE, &&TARGET_DICT_UPDATE, &&TARGET_END_ASYNC_FOR, @@ -128,6 +127,7 @@ static void *opcode_targets_table[256] = { &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, + &&_unknown_opcode, &&TARGET_RESUME, &&TARGET_BINARY_OP_ADD_FLOAT, &&TARGET_BINARY_OP_ADD_INT, @@ -377,7 +377,7 @@ static void *opcode_tracing_targets_table[256] = { &&TARGET_TRACE_RECORD, &&TARGET_TRACE_RECORD, &&TARGET_TRACE_RECORD, - &&TARGET_TRACE_RECORD, + &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, @@ -604,7 +604,6 @@ static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_COPY_FREE_VARS(TAIL_CALL_PARAMS) static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_ATTR(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_DEREF(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_FAST(TAIL_CALL_PARAMS); -static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_GLOBAL(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_SUBSCR(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DICT_MERGE(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DICT_UPDATE(TAIL_CALL_PARAMS); @@ -849,7 +848,6 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = { [DELETE_ATTR] = _TAIL_CALL_DELETE_ATTR, [DELETE_DEREF] = _TAIL_CALL_DELETE_DEREF, [DELETE_FAST] = _TAIL_CALL_DELETE_FAST, - [DELETE_GLOBAL] = _TAIL_CALL_DELETE_GLOBAL, [DELETE_SUBSCR] = _TAIL_CALL_DELETE_SUBSCR, [DICT_MERGE] = _TAIL_CALL_DICT_MERGE, [DICT_UPDATE] = _TAIL_CALL_DICT_UPDATE, @@ -1009,6 +1007,7 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = { [UNPACK_SEQUENCE_TWO_TUPLE] = _TAIL_CALL_UNPACK_SEQUENCE_TWO_TUPLE, [WITH_EXCEPT_START] = _TAIL_CALL_WITH_EXCEPT_START, [YIELD_VALUE] = _TAIL_CALL_YIELD_VALUE, + [118] = _TAIL_CALL_UNKNOWN_OPCODE, [119] = _TAIL_CALL_UNKNOWN_OPCODE, [120] = _TAIL_CALL_UNKNOWN_OPCODE, [121] = _TAIL_CALL_UNKNOWN_OPCODE, @@ -1107,7 +1106,6 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = { [DELETE_ATTR] = _TAIL_CALL_TRACE_RECORD, [DELETE_DEREF] = _TAIL_CALL_TRACE_RECORD, [DELETE_FAST] = _TAIL_CALL_TRACE_RECORD, - [DELETE_GLOBAL] = _TAIL_CALL_TRACE_RECORD, [DELETE_SUBSCR] = _TAIL_CALL_TRACE_RECORD, [DICT_MERGE] = _TAIL_CALL_TRACE_RECORD, [DICT_UPDATE] = _TAIL_CALL_TRACE_RECORD, @@ -1267,6 +1265,7 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = { [UNPACK_SEQUENCE_TWO_TUPLE] = _TAIL_CALL_TRACE_RECORD, [WITH_EXCEPT_START] = _TAIL_CALL_TRACE_RECORD, [YIELD_VALUE] = _TAIL_CALL_TRACE_RECORD, + [118] = _TAIL_CALL_UNKNOWN_OPCODE, [119] = _TAIL_CALL_UNKNOWN_OPCODE, [120] = _TAIL_CALL_UNKNOWN_OPCODE, [121] = _TAIL_CALL_UNKNOWN_OPCODE, diff --git a/Programs/test_frozenmain.h b/Programs/test_frozenmain.h index 0915869f0730d7..2fe612dba87300 100644 --- a/Programs/test_frozenmain.h +++ b/Programs/test_frozenmain.h @@ -1,19 +1,19 @@ // Auto-generated by Programs/freeze_test_frozenmain.py unsigned char M_test_frozenmain[] = { 227,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0, - 0,0,0,0,0,243,188,0,0,0,128,0,0,0,92,0, - 79,7,71,0,114,0,92,0,79,7,71,4,114,1,91,2, - 31,0,80,1,50,1,0,0,0,0,0,0,29,0,91,2, - 31,0,80,2,91,0,78,6,0,0,0,0,0,0,0,0, + 0,0,0,0,0,243,188,0,0,0,128,0,0,0,91,0, + 78,7,70,0,113,0,91,0,78,7,70,4,113,1,90,2, + 31,0,79,1,50,1,0,0,0,0,0,0,29,0,90,2, + 31,0,79,2,90,0,77,6,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,50,2,0,0,0,0, - 0,0,29,0,91,1,78,8,0,0,0,0,0,0,0,0, + 0,0,29,0,90,1,77,8,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,31,0,50,0,0,0, - 0,0,0,0,80,3,42,26,0,0,0,0,0,0,0,0, - 0,0,114,5,80,6,69,0,0,0,67,24,0,0,114,6, - 91,2,31,0,80,4,91,6,12,0,80,5,91,5,91,6, + 0,0,0,0,79,3,42,26,0,0,0,0,0,0,0,0, + 0,0,113,5,79,6,68,0,0,0,66,24,0,0,113,6, + 90,2,31,0,79,4,90,6,12,0,79,5,90,5,90,6, 42,26,0,0,0,0,0,0,0,0,0,0,12,0,48,4, - 50,1,0,0,0,0,0,0,29,0,73,26,0,0,9,0, - 28,0,79,7,33,0,41,7,233,0,0,0,0,122,18,70, + 50,1,0,0,0,0,0,0,29,0,72,26,0,0,9,0, + 28,0,78,7,33,0,41,7,233,0,0,0,0,122,18,70, 114,111,122,101,110,32,72,101,108,108,111,32,87,111,114,108, 100,122,8,115,121,115,46,97,114,103,118,218,6,99,111,110, 102,105,103,122,7,99,111,110,102,105,103,32,122,2,58,32, diff --git a/Python/bytecodes.c b/Python/bytecodes.c index fd910993327ae4..753530b0dabff3 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2163,23 +2163,21 @@ dummy_func( inst(STORE_GLOBAL, (v --)) { PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - int err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); - PyStackRef_CLOSE(v); - ERROR_IF(err); - } - - inst(DELETE_GLOBAL, (--)) { - PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - int err = PyDict_Pop(GLOBALS(), name, NULL); - // Can't use ERROR_IF here. - if (err < 0) { - ERROR_NO_POP(); + int err; + if (PyStackRef_IsNull(v)) { + DEAD(v); + err = PyDict_Pop(GLOBALS(), name, NULL); + if (err == 0) { + err = -1; + _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, + NAME_ERROR_MSG, name); + } } - if (err == 0) { - _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, - NAME_ERROR_MSG, name); - ERROR_NO_POP(); + else { + err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); + PyStackRef_CLOSE(v); } + ERROR_IF(err < 0); } inst(LOAD_LOCALS, ( -- locals)) { diff --git a/Python/codegen.c b/Python/codegen.c index 95e4d648c5f434..fa8c4ce8895655 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -3369,7 +3369,10 @@ codegen_nameop(compiler *c, location loc, } break; case Store: op = STORE_GLOBAL; break; - case Del: op = DELETE_GLOBAL; break; + case Del: + ADDOP(c, loc, PUSH_NULL); + op = STORE_GLOBAL; + break; } break; case COMPILE_OP_NAME: diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 5b77c338e6aac1..96dea2d2a6d5bc 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -10017,50 +10017,37 @@ oparg = CURRENT_OPARG(); v = _stack_item_0; PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - stack_pointer[0] = v; - stack_pointer += 1; - ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); - _PyFrame_StackPointerInvalidate(frame); - stack_pointer += -1; - ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - PyStackRef_CLOSE(v); - _PyFrame_StackPointerInvalidate(frame); - if (err) { - SET_CURRENT_CACHED_VALUES(0); - JUMP_TO_ERROR(); - } - _tos_cache0 = PyStackRef_ZERO_BITS; - _tos_cache1 = PyStackRef_ZERO_BITS; - _tos_cache2 = PyStackRef_ZERO_BITS; - SET_CURRENT_CACHED_VALUES(0); - ASSERT_WITHIN_STACK_BOUNDS_IGNORING_CACHE(__FILE__, __LINE__); - break; - } - - case _DELETE_GLOBAL_r00: { - CHECK_CURRENT_CACHED_VALUES(0); - ASSERT_WITHIN_STACK_BOUNDS_IGNORING_CACHE(__FILE__, __LINE__); - oparg = CURRENT_OPARG(); - PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_Pop(GLOBALS(), name, NULL); - _PyFrame_StackPointerInvalidate(frame); - if (err < 0) { - SET_CURRENT_CACHED_VALUES(0); - JUMP_TO_ERROR(); + int err; + if (PyStackRef_IsNull(v)) { + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_Pop(GLOBALS(), name, NULL); + _PyFrame_StackPointerInvalidate(frame); + if (err == 0) { + err = -1; + assert(stack_pointer == _PyFrame_GetStackPointer(frame)); + _PyFrame_StackPointerValidate(frame); + _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, + NAME_ERROR_MSG, name); + _PyFrame_StackPointerInvalidate(frame); + } } - if (err == 0) { - assert(stack_pointer == _PyFrame_GetStackPointer(frame)); + else { + stack_pointer[0] = v; + stack_pointer += 1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); + _PyFrame_StackPointerInvalidate(frame); + stack_pointer += -1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); _PyFrame_StackPointerValidate(frame); - _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, - NAME_ERROR_MSG, name); + PyStackRef_CLOSE(v); _PyFrame_StackPointerInvalidate(frame); + } + if (err < 0) { SET_CURRENT_CACHED_VALUES(0); JUMP_TO_ERROR(); } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index b54598636804fc..88678f14a99585 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -5906,33 +5906,6 @@ DISPATCH(); } - TARGET(DELETE_GLOBAL) { - #if _Py_TAIL_CALL_INTERP - int opcode = DELETE_GLOBAL; - (void)(opcode); - #endif - frame->instr_ptr = next_instr; - next_instr += 1; - INSTRUCTION_STATS(DELETE_GLOBAL); - PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_Pop(GLOBALS(), name, NULL); - _PyFrame_StackPointerInvalidate(frame); - if (err < 0) { - JUMP_TO_LABEL(error); - } - if (err == 0) { - assert(stack_pointer == _PyFrame_GetStackPointer(frame)); - _PyFrame_StackPointerValidate(frame); - _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, - NAME_ERROR_MSG, name); - _PyFrame_StackPointerInvalidate(frame); - JUMP_TO_LABEL(error); - } - DISPATCH(); - } - TARGET(DELETE_SUBSCR) { #if _Py_TAIL_CALL_INTERP int opcode = DELETE_SUBSCR; @@ -12531,17 +12504,36 @@ _PyStackRef v; v = stack_pointer[-1]; PyObject *name = GETITEM(FRAME_CO_NAMES, oparg); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - int err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); - _PyFrame_StackPointerInvalidate(frame); - stack_pointer += -1; - ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); - _PyFrame_SetStackPointer(frame, stack_pointer); - _PyFrame_StackPointerValidate(frame); - PyStackRef_CLOSE(v); - _PyFrame_StackPointerInvalidate(frame); - if (err) { + int err; + if (PyStackRef_IsNull(v)) { + stack_pointer += -1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_Pop(GLOBALS(), name, NULL); + _PyFrame_StackPointerInvalidate(frame); + if (err == 0) { + err = -1; + assert(stack_pointer == _PyFrame_GetStackPointer(frame)); + _PyFrame_StackPointerValidate(frame); + _PyEval_FormatExcCheckArg(tstate, PyExc_NameError, + NAME_ERROR_MSG, name); + _PyFrame_StackPointerInvalidate(frame); + } + } + else { + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v)); + _PyFrame_StackPointerInvalidate(frame); + stack_pointer += -1; + ASSERT_WITHIN_STACK_BOUNDS(__FILE__, __LINE__); + _PyFrame_SetStackPointer(frame, stack_pointer); + _PyFrame_StackPointerValidate(frame); + PyStackRef_CLOSE(v); + _PyFrame_StackPointerInvalidate(frame); + } + if (err < 0) { JUMP_TO_LABEL(error); } DISPATCH(); diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h index bfad85bc472148..9133af14272348 100644 --- a/Python/opcode_targets.h +++ b/Python/opcode_targets.h @@ -62,7 +62,6 @@ static void *opcode_targets_table[256] = { &&TARGET_DELETE_ATTR, &&TARGET_DELETE_DEREF, &&TARGET_DELETE_FAST, - &&TARGET_DELETE_GLOBAL, &&TARGET_DICT_MERGE, &&TARGET_DICT_UPDATE, &&TARGET_END_ASYNC_FOR, @@ -128,6 +127,7 @@ static void *opcode_targets_table[256] = { &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, + &&_unknown_opcode, &&TARGET_RESUME, &&TARGET_BINARY_OP_ADD_FLOAT, &&TARGET_BINARY_OP_ADD_INT, @@ -377,7 +377,7 @@ static void *opcode_tracing_targets_table[256] = { &&TARGET_TRACE_RECORD, &&TARGET_TRACE_RECORD, &&TARGET_TRACE_RECORD, - &&TARGET_TRACE_RECORD, + &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, @@ -604,7 +604,6 @@ static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_COPY_FREE_VARS(TAIL_CALL_PARAMS) static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_ATTR(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_DEREF(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_FAST(TAIL_CALL_PARAMS); -static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_GLOBAL(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DELETE_SUBSCR(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DICT_MERGE(TAIL_CALL_PARAMS); static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_DICT_UPDATE(TAIL_CALL_PARAMS); @@ -849,7 +848,6 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = { [DELETE_ATTR] = _TAIL_CALL_DELETE_ATTR, [DELETE_DEREF] = _TAIL_CALL_DELETE_DEREF, [DELETE_FAST] = _TAIL_CALL_DELETE_FAST, - [DELETE_GLOBAL] = _TAIL_CALL_DELETE_GLOBAL, [DELETE_SUBSCR] = _TAIL_CALL_DELETE_SUBSCR, [DICT_MERGE] = _TAIL_CALL_DICT_MERGE, [DICT_UPDATE] = _TAIL_CALL_DICT_UPDATE, @@ -1009,6 +1007,7 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = { [UNPACK_SEQUENCE_TWO_TUPLE] = _TAIL_CALL_UNPACK_SEQUENCE_TWO_TUPLE, [WITH_EXCEPT_START] = _TAIL_CALL_WITH_EXCEPT_START, [YIELD_VALUE] = _TAIL_CALL_YIELD_VALUE, + [118] = _TAIL_CALL_UNKNOWN_OPCODE, [119] = _TAIL_CALL_UNKNOWN_OPCODE, [120] = _TAIL_CALL_UNKNOWN_OPCODE, [121] = _TAIL_CALL_UNKNOWN_OPCODE, @@ -1107,7 +1106,6 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = { [DELETE_ATTR] = _TAIL_CALL_TRACE_RECORD, [DELETE_DEREF] = _TAIL_CALL_TRACE_RECORD, [DELETE_FAST] = _TAIL_CALL_TRACE_RECORD, - [DELETE_GLOBAL] = _TAIL_CALL_TRACE_RECORD, [DELETE_SUBSCR] = _TAIL_CALL_TRACE_RECORD, [DICT_MERGE] = _TAIL_CALL_TRACE_RECORD, [DICT_UPDATE] = _TAIL_CALL_TRACE_RECORD, @@ -1267,6 +1265,7 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = { [UNPACK_SEQUENCE_TWO_TUPLE] = _TAIL_CALL_TRACE_RECORD, [WITH_EXCEPT_START] = _TAIL_CALL_TRACE_RECORD, [YIELD_VALUE] = _TAIL_CALL_TRACE_RECORD, + [118] = _TAIL_CALL_UNKNOWN_OPCODE, [119] = _TAIL_CALL_UNKNOWN_OPCODE, [120] = _TAIL_CALL_UNKNOWN_OPCODE, [121] = _TAIL_CALL_UNKNOWN_OPCODE, diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index e9e06d6e723044..2bc589e86fee27 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -2163,10 +2163,6 @@ break; } - case _DELETE_GLOBAL: { - break; - } - case _LOAD_LOCALS: { JitOptRef locals; locals = sym_new_not_null(ctx); From 7bbea4f4868ef89b07b986d7a0d4b585e8271f27 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 30 Jun 2026 22:24:07 +0300 Subject: [PATCH 2/5] gh-152502: Detect the curses mouse interface and is_* methods portably (GH-152705) The mouse interface (getmouse(), has_mouse(), the BUTTON* constants, window.mouse_trafo(), ...) and the window is_*() state-query methods were gated on ncurses-specific macros, so they were dropped on other curses implementations that provide them, such as NetBSD curses and PDCurses. Gate them instead on configure capability probes (for functions NetBSD curses provides, since it defines no identifying macro) or on NCURSES_EXT_FUNCS or the PDCURSES macro (for functions only ncurses and PDCurses provide). Probe for getmouse() with its X/Open getmouse(MEVENT *) signature, since PDCurses declares an incompatible getmouse(void) unless built for the ncurses mouse API, which PDC_NCMOUSE now always selects. Co-authored-by: Claude Opus 4.8 --- Doc/library/curses.rst | 2 +- Include/py_curses.h | 7 + ...-06-30-14-30-00.gh-issue-152502.Mq7Kx2.rst | 6 + Modules/_cursesmodule.c | 71 +++--- Modules/clinic/_cursesmodule.c.h | 50 ++-- configure | 232 ++++++++++++++++++ configure.ac | 16 ++ pyconfig.h.in | 12 + 8 files changed, 341 insertions(+), 55 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2026-06-30-14-30-00.gh-issue-152502.Mq7Kx2.rst diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 7178325e708bc1..bbe29e5f46ed1d 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -465,7 +465,7 @@ Mouse Return ``True`` if the mouse driver has been successfully initialized. - Availability: ncurses 5.8 or later. + Availability: if the underlying curses library provides ``has_mouse()``. .. versionadded:: next diff --git a/Include/py_curses.h b/Include/py_curses.h index 3d2ca278f809cb..23e67c4e6e634d 100644 --- a/Include/py_curses.h +++ b/Include/py_curses.h @@ -36,6 +36,13 @@ #define NCURSES_OPAQUE 0 #endif +/* PDCurses exposes its ncurses-compatible mouse API, the one this module uses, + only when this is defined before the curses header is included below. + Ignored by other curses implementations. */ +#ifndef PDC_NCMOUSE +# define PDC_NCMOUSE +#endif + #if defined(HAVE_NCURSESW_NCURSES_H) # include #elif defined(HAVE_NCURSESW_CURSES_H) diff --git a/Misc/NEWS.d/next/Library/2026-06-30-14-30-00.gh-issue-152502.Mq7Kx2.rst b/Misc/NEWS.d/next/Library/2026-06-30-14-30-00.gh-issue-152502.Mq7Kx2.rst new file mode 100644 index 00000000000000..6f343f0ab0c162 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-06-30-14-30-00.gh-issue-152502.Mq7Kx2.rst @@ -0,0 +1,6 @@ +Detect the :mod:`curses` mouse interface (:func:`~curses.getmouse`, +:func:`~curses.has_mouse`, the ``BUTTON*`` constants, and others) and the +window ``is_*`` state-query methods with configure capability probes or library +macros instead of gating them on ncurses-specific macros. They are now also +available with other curses implementations that provide them, such as NetBSD +curses and PDCurses (the latter underpins ``windows-curses``). diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index dc373c8cef932c..6fc671cc6c6803 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1828,20 +1828,28 @@ Window_NoArgNoReturnFunction(wdeleteln) Window_NoArgTrueFalseFunction(is_wintouched) -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) Window_NoArgTrueFalseFunction(is_cleared) Window_NoArgTrueFalseFunction(is_idcok) Window_NoArgTrueFalseFunction(is_idlok) Window_NoArgTrueFalseFunction(is_immedok) -Window_NoArgTrueFalseFunction(is_keypad) -Window_NoArgTrueFalseFunction(is_leaveok) Window_NoArgTrueFalseFunction(is_nodelay) Window_NoArgTrueFalseFunction(is_notimeout) -Window_NoArgTrueFalseFunction(is_pad) Window_NoArgTrueFalseFunction(is_scrollok) Window_NoArgTrueFalseFunction(is_subwin) Window_NoArgTrueFalseFunction(is_syncok) +#endif +#if defined(HAVE_CURSES_IS_KEYPAD) || defined(PDCURSES) +Window_NoArgTrueFalseFunction(is_keypad) +#endif +#if defined(HAVE_CURSES_IS_LEAVEOK) || defined(PDCURSES) +Window_NoArgTrueFalseFunction(is_leaveok) +#endif +#if defined(HAVE_CURSES_IS_PAD) || defined(PDCURSES) +Window_NoArgTrueFalseFunction(is_pad) +#endif +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) static PyObject * PyCursesWindow_getdelay(PyObject *op, PyObject *Py_UNUSED(ignored)) { @@ -1872,7 +1880,7 @@ PyCursesWindow_getparent(PyObject *op, PyObject *Py_UNUSED(ignored)) } return Py_NewRef((PyObject *)self->orig); } -#endif /* NCURSES_EXT_FUNCS */ +#endif /* NCURSES_EXT_FUNCS >= 20110404 || PDCURSES */ Window_NoArgNoReturnVoidFunction(wsyncup) Window_NoArgNoReturnVoidFunction(wsyncdown) @@ -2985,7 +2993,7 @@ _curses_window_echochar_impl(PyCursesWindowObject *self, PyObject *ch, return curses_window_check_err(self, rtn, funcname, "echochar"); } -#ifdef NCURSES_MOUSE_VERSION +#if defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES) /*[clinic input] @permit_long_summary _curses.window.enclose @@ -4881,7 +4889,7 @@ static PyMethodDef PyCursesWindow_methods[] = { _CURSES_WINDOW_GETCH_METHODDEF _CURSES_WINDOW_GETKEY_METHODDEF _CURSES_WINDOW_GET_WCH_METHODDEF -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) {"getdelay", PyCursesWindow_getdelay, METH_NOARGS, "getdelay($self, /)\n--\n\n" "Return the window's read timeout in milliseconds.\n\n" @@ -4890,7 +4898,7 @@ static PyMethodDef PyCursesWindow_methods[] = { {"getmaxyx", PyCursesWindow_getmaxyx, METH_NOARGS, "getmaxyx($self, /)\n--\n\n" "Return a tuple (y, x) of the window height and width."}, -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) {"getparent", PyCursesWindow_getparent, METH_NOARGS, "getparent($self, /)\n--\n\n" "Return the parent window, or None if this is not a subwindow."}, @@ -4898,7 +4906,7 @@ static PyMethodDef PyCursesWindow_methods[] = { {"getparyx", PyCursesWindow_getparyx, METH_NOARGS, "getparyx($self, /)\n--\n\n" "Return (y, x) relative to the parent window, or (-1, -1) if none."}, -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) {"getscrreg", PyCursesWindow_getscrreg, METH_NOARGS, "getscrreg($self, /)\n--\n\n" "Return a tuple (top, bottom) of the current scrolling region."}, @@ -4953,7 +4961,7 @@ static PyMethodDef PyCursesWindow_methods[] = { {"is_wintouched", PyCursesWindow_is_wintouched, METH_NOARGS, "is_wintouched($self, /)\n--\n\n" "Return True if the window changed since the last refresh()."}, -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20110404) || defined(PDCURSES) {"is_cleared", PyCursesWindow_is_cleared, METH_NOARGS, "is_cleared($self, /)\n--\n\n" "Return the current value set by clearok()."}, @@ -4966,21 +4974,12 @@ static PyMethodDef PyCursesWindow_methods[] = { {"is_immedok", PyCursesWindow_is_immedok, METH_NOARGS, "is_immedok($self, /)\n--\n\n" "Return the current value set by immedok()."}, - {"is_keypad", PyCursesWindow_is_keypad, METH_NOARGS, - "is_keypad($self, /)\n--\n\n" - "Return the current value set by keypad()."}, - {"is_leaveok", PyCursesWindow_is_leaveok, METH_NOARGS, - "is_leaveok($self, /)\n--\n\n" - "Return the current value set by leaveok()."}, {"is_nodelay", PyCursesWindow_is_nodelay, METH_NOARGS, "is_nodelay($self, /)\n--\n\n" "Return the current value set by nodelay()."}, {"is_notimeout", PyCursesWindow_is_notimeout, METH_NOARGS, "is_notimeout($self, /)\n--\n\n" "Return the current value set by notimeout()."}, - {"is_pad", PyCursesWindow_is_pad, METH_NOARGS, - "is_pad($self, /)\n--\n\n" - "Return True if the window is a pad."}, {"is_scrollok", PyCursesWindow_is_scrollok, METH_NOARGS, "is_scrollok($self, /)\n--\n\n" "Return the current value set by scrollok()."}, @@ -4990,6 +4989,21 @@ static PyMethodDef PyCursesWindow_methods[] = { {"is_syncok", PyCursesWindow_is_syncok, METH_NOARGS, "is_syncok($self, /)\n--\n\n" "Return the current value set by syncok()."}, +#endif +#if defined(HAVE_CURSES_IS_KEYPAD) || defined(PDCURSES) + {"is_keypad", PyCursesWindow_is_keypad, METH_NOARGS, + "is_keypad($self, /)\n--\n\n" + "Return the current value set by keypad()."}, +#endif +#if defined(HAVE_CURSES_IS_LEAVEOK) || defined(PDCURSES) + {"is_leaveok", PyCursesWindow_is_leaveok, METH_NOARGS, + "is_leaveok($self, /)\n--\n\n" + "Return the current value set by leaveok()."}, +#endif +#if defined(HAVE_CURSES_IS_PAD) || defined(PDCURSES) + {"is_pad", PyCursesWindow_is_pad, METH_NOARGS, + "is_pad($self, /)\n--\n\n" + "Return True if the window is a pad."}, #endif {"keypad", PyCursesWindow_keypad, METH_VARARGS, "keypad($self, flag, /)\n--\n\n" @@ -5477,7 +5491,7 @@ _curses_cbreak_impl(PyObject *module, int flag) NoArgOrFlagNoReturnFunctionBody(cbreak, flag) /* is_cbreak()/is_echo()/is_nl()/is_raw() were added in ncurses 6.5. */ -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427 +#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES) /*[clinic input] _curses.is_cbreak @@ -5533,7 +5547,7 @@ _curses_is_raw_impl(PyObject *module) PyCursesStatefulInitialised(module); return PyBool_FromLong(is_raw()); } -#endif /* NCURSES_EXT_FUNCS */ +#endif /* NCURSES_EXT_FUNCS >= 20240427 || PDCURSES */ /*[clinic input] _curses.color_content @@ -5837,7 +5851,7 @@ _curses_getsyx_impl(PyObject *module) } #endif -#ifdef NCURSES_MOUSE_VERSION +#if defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES) /*[clinic input] _curses.getmouse @@ -7040,9 +7054,8 @@ _curses_meta_impl(PyObject *module, int yes) return curses_check_err(module, meta(stdscr, yes), "meta", NULL); } -#ifdef NCURSES_MOUSE_VERSION -/* has_mouse() was added to ncurses after the 5.7 release. */ -#if defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081122 +#if defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES) +#if defined(HAVE_CURSES_HAS_MOUSE) || defined(PDCURSES) /*[clinic input] _curses.has_mouse @@ -7057,7 +7070,7 @@ _curses_has_mouse_impl(PyObject *module) return PyBool_FromLong(has_mouse()); } -#endif /* NCURSES_EXT_FUNCS >= 20081122 */ +#endif /* HAVE_CURSES_HAS_MOUSE || PDCURSES */ /*[clinic input] _curses.mouseinterval @@ -8291,7 +8304,7 @@ _curses_slk_attrset_impl(PyObject *module, long attr) "slk_attrset", NULL); } -#ifdef NCURSES_EXT_FUNCS +#if defined(NCURSES_EXT_FUNCS) || defined(PDCURSES) /*[clinic input] _curses.slk_attr @@ -9036,7 +9049,7 @@ cursesmodule_exec(PyObject *module) SetDictInt("COLOR_CYAN", COLOR_CYAN); SetDictInt("COLOR_WHITE", COLOR_WHITE); -#ifdef NCURSES_MOUSE_VERSION +#if defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES) /* Mouse-related constants */ SetDictInt("BUTTON1_PRESSED", BUTTON1_PRESSED); SetDictInt("BUTTON1_RELEASED", BUTTON1_RELEASED); @@ -9062,7 +9075,7 @@ cursesmodule_exec(PyObject *module) SetDictInt("BUTTON4_DOUBLE_CLICKED", BUTTON4_DOUBLE_CLICKED); SetDictInt("BUTTON4_TRIPLE_CLICKED", BUTTON4_TRIPLE_CLICKED); -#if NCURSES_MOUSE_VERSION > 1 +#ifdef BUTTON5_PRESSED SetDictInt("BUTTON5_PRESSED", BUTTON5_PRESSED); SetDictInt("BUTTON5_RELEASED", BUTTON5_RELEASED); SetDictInt("BUTTON5_CLICKED", BUTTON5_CLICKED); diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index e69be47549cf65..da1b97c0ea5ad8 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -1048,7 +1048,7 @@ _curses_window_echochar(PyObject *self, PyObject *args) return return_value; } -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_window_enclose__doc__, "enclose($self, y, x, /)\n" @@ -1091,9 +1091,9 @@ _curses_window_enclose(PyObject *self, PyObject *const *args, Py_ssize_t nargs) return return_value; } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_window_mouse_trafo__doc__, "mouse_trafo($self, y, x, to_screen, /)\n" @@ -1148,7 +1148,7 @@ _curses_window_mouse_trafo(PyObject *self, PyObject *const *args, Py_ssize_t nar return return_value; } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ PyDoc_STRVAR(_curses_window_getbkgd__doc__, "getbkgd($self, /)\n" @@ -2473,7 +2473,7 @@ _curses_cbreak(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) +#if ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) PyDoc_STRVAR(_curses_is_cbreak__doc__, "is_cbreak($module, /)\n" @@ -2493,9 +2493,9 @@ _curses_is_cbreak(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_is_cbreak_impl(module); } -#endif /* (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) */ +#endif /* ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) */ -#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) +#if ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) PyDoc_STRVAR(_curses_is_echo__doc__, "is_echo($module, /)\n" @@ -2515,9 +2515,9 @@ _curses_is_echo(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_is_echo_impl(module); } -#endif /* (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) */ +#endif /* ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) */ -#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) +#if ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) PyDoc_STRVAR(_curses_is_nl__doc__, "is_nl($module, /)\n" @@ -2537,9 +2537,9 @@ _curses_is_nl(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_is_nl_impl(module); } -#endif /* (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) */ +#endif /* ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) */ -#if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) +#if ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) PyDoc_STRVAR(_curses_is_raw__doc__, "is_raw($module, /)\n" @@ -2559,7 +2559,7 @@ _curses_is_raw(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_is_raw_impl(module); } -#endif /* (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) */ +#endif /* ((defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20240427) || defined(PDCURSES)) */ PyDoc_STRVAR(_curses_color_content__doc__, "color_content($module, color_number, /)\n" @@ -2921,7 +2921,7 @@ _curses_getsyx(PyObject *module, PyObject *Py_UNUSED(ignored)) #endif /* defined(getsyx) */ -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_getmouse__doc__, "getmouse($module, /)\n" @@ -2944,9 +2944,9 @@ _curses_getmouse(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_getmouse_impl(module); } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_ungetmouse__doc__, "ungetmouse($module, id, x, y, z, bstate, /)\n" @@ -3033,7 +3033,7 @@ _curses_ungetmouse(PyObject *module, PyObject *const *args, Py_ssize_t nargs) return return_value; } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ PyDoc_STRVAR(_curses_getwin__doc__, "getwin($module, file, /)\n" @@ -4232,7 +4232,7 @@ _curses_meta(PyObject *module, PyObject *arg) return return_value; } -#if defined(NCURSES_MOUSE_VERSION) && (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081122) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) && (defined(HAVE_CURSES_HAS_MOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_has_mouse__doc__, "has_mouse($module, /)\n" @@ -4252,9 +4252,9 @@ _curses_has_mouse(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_has_mouse_impl(module); } -#endif /* defined(NCURSES_MOUSE_VERSION) && (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081122) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) && (defined(HAVE_CURSES_HAS_MOUSE) || defined(PDCURSES)) */ -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_mouseinterval__doc__, "mouseinterval($module, interval, /)\n" @@ -4291,9 +4291,9 @@ _curses_mouseinterval(PyObject *module, PyObject *arg) return return_value; } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ -#if defined(NCURSES_MOUSE_VERSION) +#if (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) PyDoc_STRVAR(_curses_mousemask__doc__, "mousemask($module, newmask, /)\n" @@ -4344,7 +4344,7 @@ _curses_mousemask(PyObject *module, PyObject *arg) return return_value; } -#endif /* defined(NCURSES_MOUSE_VERSION) */ +#endif /* (defined(HAVE_CURSES_GETMOUSE) || defined(PDCURSES)) */ PyDoc_STRVAR(_curses_napms__doc__, "napms($module, ms, /)\n" @@ -5733,7 +5733,7 @@ _curses_slk_attrset(PyObject *module, PyObject *arg) return return_value; } -#if defined(NCURSES_EXT_FUNCS) +#if (defined(NCURSES_EXT_FUNCS) || defined(PDCURSES)) PyDoc_STRVAR(_curses_slk_attr__doc__, "slk_attr($module, /)\n" @@ -5753,7 +5753,7 @@ _curses_slk_attr(PyObject *module, PyObject *Py_UNUSED(ignored)) return _curses_slk_attr_impl(module); } -#endif /* defined(NCURSES_EXT_FUNCS) */ +#endif /* (defined(NCURSES_EXT_FUNCS) || defined(PDCURSES)) */ PyDoc_STRVAR(_curses_slk_attr_on__doc__, "slk_attr_on($module, attr, /)\n" @@ -6174,4 +6174,4 @@ _curses_has_extended_color_support(PyObject *module, PyObject *Py_UNUSED(ignored #ifndef _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF #define _CURSES_ASSUME_DEFAULT_COLORS_METHODDEF #endif /* !defined(_CURSES_ASSUME_DEFAULT_COLORS_METHODDEF) */ -/*[clinic end generated code: output=809e4680d429b870 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=36fcacafc5044720 input=a9049054013a1b77]*/ diff --git a/configure b/configure index d0738c1909be7b..01faef615a3d5e 100755 --- a/configure +++ b/configure @@ -30420,6 +30420,186 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function has_mouse" >&5 +printf %s "checking for curses function has_mouse... " >&6; } +if test ${ac_cv_lib_curses_has_mouse+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define NCURSES_OPAQUE 0 +#if defined(HAVE_NCURSESW_NCURSES_H) +# include +#elif defined(HAVE_NCURSESW_CURSES_H) +# include +#elif defined(HAVE_NCURSES_NCURSES_H) +# include +#elif defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_CURSES_H) +# include +#endif + +int +main (void) +{ + + #ifndef has_mouse + void *x=has_mouse + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_lib_curses_has_mouse=yes +else case e in #( + e) ac_cv_lib_curses_has_mouse=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_has_mouse" >&5 +printf "%s\n" "$ac_cv_lib_curses_has_mouse" >&6; } + if test "x$ac_cv_lib_curses_has_mouse" = xyes +then : + +printf "%s\n" "#define HAVE_CURSES_HAS_MOUSE 1" >>confdefs.h + +fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_keypad" >&5 +printf %s "checking for curses function is_keypad... " >&6; } +if test ${ac_cv_lib_curses_is_keypad+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define NCURSES_OPAQUE 0 +#if defined(HAVE_NCURSESW_NCURSES_H) +# include +#elif defined(HAVE_NCURSESW_CURSES_H) +# include +#elif defined(HAVE_NCURSES_NCURSES_H) +# include +#elif defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_CURSES_H) +# include +#endif + +int +main (void) +{ + + #ifndef is_keypad + void *x=is_keypad + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_lib_curses_is_keypad=yes +else case e in #( + e) ac_cv_lib_curses_is_keypad=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_keypad" >&5 +printf "%s\n" "$ac_cv_lib_curses_is_keypad" >&6; } + if test "x$ac_cv_lib_curses_is_keypad" = xyes +then : + +printf "%s\n" "#define HAVE_CURSES_IS_KEYPAD 1" >>confdefs.h + +fi + + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function is_leaveok" >&5 +printf %s "checking for curses function is_leaveok... " >&6; } +if test ${ac_cv_lib_curses_is_leaveok+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define NCURSES_OPAQUE 0 +#if defined(HAVE_NCURSESW_NCURSES_H) +# include +#elif defined(HAVE_NCURSESW_CURSES_H) +# include +#elif defined(HAVE_NCURSES_NCURSES_H) +# include +#elif defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_CURSES_H) +# include +#endif + +int +main (void) +{ + + #ifndef is_leaveok + void *x=is_leaveok + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_lib_curses_is_leaveok=yes +else case e in #( + e) ac_cv_lib_curses_is_leaveok=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_leaveok" >&5 +printf "%s\n" "$ac_cv_lib_curses_is_leaveok" >&6; } + if test "x$ac_cv_lib_curses_is_leaveok" = xyes +then : + +printf "%s\n" "#define HAVE_CURSES_IS_LEAVEOK 1" >>confdefs.h + +fi + + + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function typeahead" >&5 printf %s "checking for curses function typeahead... " >&6; } if test ${ac_cv_lib_curses_typeahead+y} @@ -31195,6 +31375,58 @@ fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncurses-style curses function getmouse" >&5 +printf %s "checking for ncurses-style curses function getmouse... " >&6; } +if test ${ac_cv_lib_curses_getmouse+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define NCURSES_OPAQUE 0 +#if defined(HAVE_NCURSESW_NCURSES_H) +# include +#elif defined(HAVE_NCURSESW_CURSES_H) +# include +#elif defined(HAVE_NCURSES_NCURSES_H) +# include +#elif defined(HAVE_NCURSES_CURSES_H) +# include +#elif defined(HAVE_NCURSES_H) +# include +#elif defined(HAVE_CURSES_H) +# include +#endif + +int +main (void) +{ +MEVENT event; (void)getmouse(&event); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_lib_curses_getmouse=yes +else case e in #( + e) ac_cv_lib_curses_getmouse=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_getmouse" >&5 +printf "%s\n" "$ac_cv_lib_curses_getmouse" >&6; } +if test "x$ac_cv_lib_curses_getmouse" = xyes +then : + +printf "%s\n" "#define HAVE_CURSES_GETMOUSE 1" >>confdefs.h + +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curses function scr_dump" >&5 printf %s "checking for curses function scr_dump... " >&6; } diff --git a/configure.ac b/configure.ac index 622d6f6593a1a9..a9fe5c269618fc 100644 --- a/configure.ac +++ b/configure.ac @@ -7219,6 +7219,9 @@ PY_CHECK_CURSES_FUNC([wchgat]) PY_CHECK_CURSES_FUNC([filter]) PY_CHECK_CURSES_FUNC([nofilter]) PY_CHECK_CURSES_FUNC([has_key]) +PY_CHECK_CURSES_FUNC([has_mouse]) +PY_CHECK_CURSES_FUNC([is_keypad]) +PY_CHECK_CURSES_FUNC([is_leaveok]) PY_CHECK_CURSES_FUNC([typeahead]) PY_CHECK_CURSES_FUNC([use_env]) PY_CHECK_CURSES_FUNC([new_prescr]) @@ -7232,6 +7235,19 @@ PY_CHECK_CURSES_FUNC([set_escdelay]) PY_CHECK_CURSES_FUNC([set_tabsize]) PY_CHECK_CURSES_VAR([ESCDELAY]) PY_CHECK_CURSES_VAR([TABSIZE]) + +dnl Probe for the X/Open getmouse(MEVENT *) signature specifically: PDCurses +dnl declares an incompatible getmouse(void) unless built for the ncurses mouse API. +AC_CACHE_CHECK([for ncurses-style curses function getmouse], + [ac_cv_lib_curses_getmouse], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM(_CURSES_INCLUDES, [MEVENT event; (void)getmouse(&event);])], + [ac_cv_lib_curses_getmouse=yes], + [ac_cv_lib_curses_getmouse=no])]) +AS_VAR_IF([ac_cv_lib_curses_getmouse], [yes], + [AC_DEFINE([HAVE_CURSES_GETMOUSE], [1], + [Define if you have the 'getmouse' function with the X/Open signature.])]) + dnl scr_dump and its companions scr_restore/scr_init/scr_set are an inseparable dnl group; probing scr_dump alone gates the whole family. PY_CHECK_CURSES_FUNC([scr_dump]) diff --git a/pyconfig.h.in b/pyconfig.h.in index 45db7b1dc57a96..ce97099315bfe4 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -209,15 +209,27 @@ /* Define if you have the 'filter' function. */ #undef HAVE_CURSES_FILTER +/* Define if you have the 'getmouse' function with the X/Open signature. */ +#undef HAVE_CURSES_GETMOUSE + /* Define to 1 if you have the header file. */ #undef HAVE_CURSES_H /* Define if you have the 'has_key' function. */ #undef HAVE_CURSES_HAS_KEY +/* Define if you have the 'has_mouse' function. */ +#undef HAVE_CURSES_HAS_MOUSE + /* Define if you have the 'immedok' function. */ #undef HAVE_CURSES_IMMEDOK +/* Define if you have the 'is_keypad' function. */ +#undef HAVE_CURSES_IS_KEYPAD + +/* Define if you have the 'is_leaveok' function. */ +#undef HAVE_CURSES_IS_LEAVEOK + /* Define if you have the 'is_pad' function. */ #undef HAVE_CURSES_IS_PAD From 040002c13a35ba3c8d077d87c29002ad3f2edad5 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Tue, 30 Jun 2026 12:50:41 -0700 Subject: [PATCH 3/5] GH-81881: Raise `SpecialFileError` for sockets and devices in `shutil.copyfile` (#142693) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Senthil Kumaran --- Doc/library/shutil.rst | 9 ++-- Doc/whatsnew/3.15.rst | 8 ++++ Lib/shutil.py | 10 +++- Lib/test/test_shutil.py | 48 +++++++++++++++++-- ...5-12-14-06-44-34.gh-issue-81881.qancdQ.rst | 1 + 5 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2025-12-14-06-44-34.gh-issue-81881.qancdQ.rst diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 6febc7a187a15f..2822e979990c4d 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -64,8 +64,8 @@ Directory and files operations The destination location must be writable; otherwise, an :exc:`OSError` exception will be raised. If *dst* already exists, it will be replaced. - Special files such as character or block devices and pipes cannot be - copied with this function. + Special files such as character or block devices, pipes, and sockets cannot + be copied with this function. If *follow_symlinks* is false and *src* is a symbolic link, a new symbolic link will be created instead of copying the @@ -87,10 +87,13 @@ Directory and files operations copy the file more efficiently. See :ref:`shutil-platform-dependent-efficient-copy-operations` section. + .. versionchanged:: 3.15 + :exc:`SpecialFileError` is now also raised for sockets and device files. + .. exception:: SpecialFileError This exception is raised when :func:`copyfile` or :func:`copytree` attempt - to copy a named pipe. + to copy a named pipe, socket, or device file. .. versionadded:: 2.7 diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index a90f986b7354c1..aad4758297c30d 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1398,6 +1398,14 @@ shelve (Contributed by Furkan Onder in :gh:`99631`.) +shutil +------ + +* :func:`shutil.copyfile` now also raises :exc:`~shutil.SpecialFileError` for + sockets and device files. + (Contributed by Savannah Ostrowski in :gh:`142693`.) + + socket ------ diff --git a/Lib/shutil.py b/Lib/shutil.py index 5095318da23314..6a2e2b2ffdae2c 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -300,10 +300,18 @@ def copyfile(src, dst, *, follow_symlinks=True): # File most likely does not exist pass else: - # XXX What about other special files? (sockets, devices...) if stat.S_ISFIFO(st.st_mode): fn = fn.path if isinstance(fn, os.DirEntry) else fn raise SpecialFileError("`%s` is a named pipe" % fn) + elif stat.S_ISSOCK(st.st_mode): + fn = fn.path if isinstance(fn, os.DirEntry) else fn + raise SpecialFileError("`%s` is a socket" % fn) + elif stat.S_ISBLK(st.st_mode): + fn = fn.path if isinstance(fn, os.DirEntry) else fn + raise SpecialFileError("`%s` is a block device" % fn) + elif stat.S_ISCHR(st.st_mode): + fn = fn.path if isinstance(fn, os.DirEntry) else fn + raise SpecialFileError("`%s` is a character device" % fn) if _WINDOWS and i == 0: file_size = st.st_size diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index bb901220fb408c..6832bea094fc1d 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -10,6 +10,7 @@ import os.path import errno import functools +import socket import subprocess import random import string @@ -29,7 +30,7 @@ posix = None from test import support -from test.support import os_helper +from test.support import os_helper, socket_helper from test.support.os_helper import TESTFN, FakePath TESTFN2 = TESTFN + "2" @@ -1550,13 +1551,50 @@ def test_copyfile_named_pipe(self): except PermissionError as e: self.skipTest('os.mkfifo(): %s' % e) try: - self.assertRaises(shutil.SpecialFileError, - shutil.copyfile, TESTFN, TESTFN2) - self.assertRaises(shutil.SpecialFileError, - shutil.copyfile, __file__, TESTFN) + self.assertRaisesRegex(shutil.SpecialFileError, 'is a named pipe', + shutil.copyfile, TESTFN, TESTFN2) + self.assertRaisesRegex(shutil.SpecialFileError, 'is a named pipe', + shutil.copyfile, __file__, TESTFN) finally: os.remove(TESTFN) + @socket_helper.skip_unless_bind_unix_socket + def test_copyfile_socket(self): + sock_path = os.path.join(self.mkdtemp(), 'sock') + sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.addCleanup(sock.close) + try: + socket_helper.bind_unix_socket(sock, sock_path) + except OSError as e: + # AF_UNIX path too long (e.g. on iOS) + self.skipTest(f'cannot bind AF_UNIX socket: {e}') + self.addCleanup(os_helper.unlink, sock_path) + self.assertRaisesRegex(shutil.SpecialFileError, 'is a socket', + shutil.copyfile, sock_path, sock_path + '.copy') + self.assertRaisesRegex(shutil.SpecialFileError, 'is a socket', + shutil.copyfile, __file__, sock_path) + + @unittest.skipUnless(os.path.exists('/dev/null'), 'requires /dev/null') + def test_copyfile_character_device(self): + self.assertRaisesRegex(shutil.SpecialFileError, 'is a character device', + shutil.copyfile, '/dev/null', TESTFN) + src_file = os.path.join(self.mkdtemp(), 'src') + create_file(src_file, 'foo') + self.assertRaisesRegex(shutil.SpecialFileError, 'is a character device', + shutil.copyfile, src_file, '/dev/null') + + def test_copyfile_block_device(self): + block_dev = None + for dev in ['/dev/loop0', '/dev/sda', '/dev/vda', '/dev/disk0']: + if os.path.exists(dev) and stat.S_ISBLK(os.stat(dev).st_mode): + if os.access(dev, os.R_OK): + block_dev = dev + break + if block_dev is None: + self.skipTest('no accessible block device found') + self.assertRaisesRegex(shutil.SpecialFileError, 'is a block device', + shutil.copyfile, block_dev, TESTFN) + def test_copyfile_return_value(self): # copytree returns its destination path. src_dir = self.mkdtemp() diff --git a/Misc/NEWS.d/next/Library/2025-12-14-06-44-34.gh-issue-81881.qancdQ.rst b/Misc/NEWS.d/next/Library/2025-12-14-06-44-34.gh-issue-81881.qancdQ.rst new file mode 100644 index 00000000000000..6b6ca6a1918bdd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-12-14-06-44-34.gh-issue-81881.qancdQ.rst @@ -0,0 +1 @@ +:func:`shutil.copyfile` now raises :exc:`~shutil.SpecialFileError` for sockets and device files. From f37602ad7d4b78f55d935be66f6373320fe0aee5 Mon Sep 17 00:00:00 2001 From: thexai <58434170+thexai@users.noreply.github.com> Date: Tue, 30 Jun 2026 22:35:44 +0200 Subject: [PATCH 4/5] gh-152433: Windows: use GetFileSizeEx instead of GetFileSize for memory mapped files (#152383) --- ...-06-28-13-03-57.gh-issue-152433.jUXFwC.rst | 1 + Modules/mmapmodule.c | 30 ++++++------------- 2 files changed, 10 insertions(+), 21 deletions(-) create mode 100644 Misc/NEWS.d/next/Windows/2026-06-28-13-03-57.gh-issue-152433.jUXFwC.rst diff --git a/Misc/NEWS.d/next/Windows/2026-06-28-13-03-57.gh-issue-152433.jUXFwC.rst b/Misc/NEWS.d/next/Windows/2026-06-28-13-03-57.gh-issue-152433.jUXFwC.rst new file mode 100644 index 00000000000000..348bfa4ee9c278 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2026-06-28-13-03-57.gh-issue-152433.jUXFwC.rst @@ -0,0 +1 @@ +Use the Windows API ``GetFileSizeEx()`` for memory mapped files, rather than the older ``GetFileSize()``. diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 6fb04ba7bd47c6..f4f21b45f920a0 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -806,20 +806,12 @@ mmap_mmap_size_impl(mmap_object *self) #ifdef MS_WINDOWS if (self->file_handle != INVALID_HANDLE_VALUE) { - DWORD low,high; - long long size; - low = GetFileSize(self->file_handle, &high); - if (low == INVALID_FILE_SIZE) { - /* It might be that the function appears to have failed, - when indeed its size equals INVALID_FILE_SIZE */ - DWORD error = GetLastError(); - if (error != NO_ERROR) - return PyErr_SetFromWindowsErr(error); + LARGE_INTEGER size; + if (!GetFileSizeEx(self->file_handle, &size)) { + DWORD error = GetLastError(); + return PyErr_SetFromWindowsErr(error); } - if (!high && low < LONG_MAX) - return PyLong_FromLong((long)low); - size = (((long long)high)<<32) + low; - return PyLong_FromLongLong(size); + return PyLong_FromLongLong(size.QuadPart); } #endif /* MS_WINDOWS */ @@ -2127,18 +2119,14 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) m_obj->file_handle = fh; } if (!map_size) { - DWORD low,high; - low = GetFileSize(fh, &high); - /* low might just happen to have the value INVALID_FILE_SIZE; - so we need to check the last error also. */ - if (low == INVALID_FILE_SIZE && - (dwErr = GetLastError()) != NO_ERROR) + LARGE_INTEGER li; + if (!GetFileSizeEx(fh, &li)) { + dwErr = GetLastError(); Py_DECREF(m_obj); return PyErr_SetFromWindowsErr(dwErr); } - - size = (((long long) high) << 32) + low; + size = li.QuadPart; if (size == 0) { PyErr_SetString(PyExc_ValueError, "cannot mmap an empty file"); From a5be0d81cb74fabe563b8317f94d80aa01c9bbf9 Mon Sep 17 00:00:00 2001 From: thexai <58434170+thexai@users.noreply.github.com> Date: Tue, 30 Jun 2026 22:49:01 +0200 Subject: [PATCH 5/5] gh-152433: Windows: enable mmapmodule for UWP (#152473) --- .../Windows/2026-06-29-16-29-50.gh-issue-152433._nhCjt.rst | 2 ++ Modules/mmapmodule.c | 4 ++-- PC/config.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Windows/2026-06-29-16-29-50.gh-issue-152433._nhCjt.rst diff --git a/Misc/NEWS.d/next/Windows/2026-06-29-16-29-50.gh-issue-152433._nhCjt.rst b/Misc/NEWS.d/next/Windows/2026-06-29-16-29-50.gh-issue-152433._nhCjt.rst new file mode 100644 index 00000000000000..0c420c124c2981 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2026-06-29-16-29-50.gh-issue-152433._nhCjt.rst @@ -0,0 +1,2 @@ +Restores the ``mmap`` module when CPython is built from source for specific +Windows API sets. diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index f4f21b45f920a0..d55ab3d4d56edb 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -338,7 +338,7 @@ _PyErr_SetFromNTSTATUS(ULONG status) } #endif -#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH) +#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH) #define HANDLE_INVALID_MEM(sourcecode) \ do { \ EXCEPTION_RECORD record; \ @@ -364,7 +364,7 @@ do { \ } while (0) #endif -#if defined(MS_WINDOWS) && !defined(DONT_USE_SEH) +#if defined(MS_WINDOWS_DESKTOP) && !defined(DONT_USE_SEH) #define HANDLE_INVALID_MEM_METHOD(self, sourcecode) \ do { \ EXCEPTION_RECORD record; \ diff --git a/PC/config.c b/PC/config.c index 51b46c64d99b81..dcccc6a3a6d016 100644 --- a/PC/config.c +++ b/PC/config.c @@ -140,7 +140,7 @@ struct _inittab _PyImport_Inittab[] = { {"itertools", PyInit_itertools}, {"_collections", PyInit__collections}, {"_symtable", PyInit__symtable}, -#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) +#if defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_GAMES) || defined(MS_WINDOWS_APP) {"mmap", PyInit_mmap}, #endif {"_csv", PyInit__csv},