diff options
author | Mark Shannon <mark@hotpy.org> | 2022-11-03 11:38:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-03 11:38:51 (GMT) |
commit | f4adb975061874566766f7a67206cb7b0439bc11 (patch) | |
tree | 136b2e8b97fd8811cef1d2ff46d31fb61f26183a /Include/opcode.h | |
parent | e9ac890c0273aee413aa528cc202c3efa29f1d7a (diff) | |
download | cpython-f4adb975061874566766f7a67206cb7b0439bc11.zip cpython-f4adb975061874566766f7a67206cb7b0439bc11.tar.gz cpython-f4adb975061874566766f7a67206cb7b0439bc11.tar.bz2 |
GH-96793: Implement PEP 479 in bytecode. (GH-99006)
* Handle converting StopIteration to RuntimeError in bytecode.
* Add custom instruction for converting StopIteration into RuntimeError.
Diffstat (limited to 'Include/opcode.h')
-rw-r--r-- | Include/opcode.h | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/Include/opcode.h b/Include/opcode.h index 661b587..4efa357 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -36,6 +36,7 @@ extern "C" { #define CLEANUP_THROW 55 #define STORE_SUBSCR 60 #define DELETE_SUBSCR 61 +#define STOPITERATION_ERROR 63 #define GET_ITER 68 #define GET_YIELD_FROM_ITER 69 #define PRINT_EXPR 70 @@ -162,42 +163,42 @@ extern "C" { #define COMPARE_OP_ADAPTIVE 58 #define COMPARE_OP_FLOAT_JUMP 59 #define COMPARE_OP_INT_JUMP 62 -#define COMPARE_OP_STR_JUMP 63 -#define EXTENDED_ARG_QUICK 64 -#define FOR_ITER_ADAPTIVE 65 -#define FOR_ITER_LIST 66 -#define FOR_ITER_RANGE 67 -#define LOAD_ATTR_ADAPTIVE 72 -#define LOAD_ATTR_CLASS 73 -#define LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN 76 -#define LOAD_ATTR_INSTANCE_VALUE 77 -#define LOAD_ATTR_MODULE 78 -#define LOAD_ATTR_PROPERTY 79 -#define LOAD_ATTR_SLOT 80 -#define LOAD_ATTR_WITH_HINT 81 -#define LOAD_ATTR_METHOD_LAZY_DICT 86 -#define LOAD_ATTR_METHOD_NO_DICT 113 -#define LOAD_ATTR_METHOD_WITH_DICT 121 -#define LOAD_ATTR_METHOD_WITH_VALUES 141 -#define LOAD_CONST__LOAD_FAST 143 -#define LOAD_FAST__LOAD_CONST 153 -#define LOAD_FAST__LOAD_FAST 154 -#define LOAD_GLOBAL_ADAPTIVE 158 -#define LOAD_GLOBAL_BUILTIN 159 -#define LOAD_GLOBAL_MODULE 160 -#define STORE_ATTR_ADAPTIVE 161 -#define STORE_ATTR_INSTANCE_VALUE 166 -#define STORE_ATTR_SLOT 167 -#define STORE_ATTR_WITH_HINT 168 -#define STORE_FAST__LOAD_FAST 169 -#define STORE_FAST__STORE_FAST 170 -#define STORE_SUBSCR_ADAPTIVE 173 -#define STORE_SUBSCR_DICT 174 -#define STORE_SUBSCR_LIST_INT 175 -#define UNPACK_SEQUENCE_ADAPTIVE 176 -#define UNPACK_SEQUENCE_LIST 177 -#define UNPACK_SEQUENCE_TUPLE 178 -#define UNPACK_SEQUENCE_TWO_TUPLE 179 +#define COMPARE_OP_STR_JUMP 64 +#define EXTENDED_ARG_QUICK 65 +#define FOR_ITER_ADAPTIVE 66 +#define FOR_ITER_LIST 67 +#define FOR_ITER_RANGE 72 +#define LOAD_ATTR_ADAPTIVE 73 +#define LOAD_ATTR_CLASS 76 +#define LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN 77 +#define LOAD_ATTR_INSTANCE_VALUE 78 +#define LOAD_ATTR_MODULE 79 +#define LOAD_ATTR_PROPERTY 80 +#define LOAD_ATTR_SLOT 81 +#define LOAD_ATTR_WITH_HINT 86 +#define LOAD_ATTR_METHOD_LAZY_DICT 113 +#define LOAD_ATTR_METHOD_NO_DICT 121 +#define LOAD_ATTR_METHOD_WITH_DICT 141 +#define LOAD_ATTR_METHOD_WITH_VALUES 143 +#define LOAD_CONST__LOAD_FAST 153 +#define LOAD_FAST__LOAD_CONST 154 +#define LOAD_FAST__LOAD_FAST 158 +#define LOAD_GLOBAL_ADAPTIVE 159 +#define LOAD_GLOBAL_BUILTIN 160 +#define LOAD_GLOBAL_MODULE 161 +#define STORE_ATTR_ADAPTIVE 166 +#define STORE_ATTR_INSTANCE_VALUE 167 +#define STORE_ATTR_SLOT 168 +#define STORE_ATTR_WITH_HINT 169 +#define STORE_FAST__LOAD_FAST 170 +#define STORE_FAST__STORE_FAST 173 +#define STORE_SUBSCR_ADAPTIVE 174 +#define STORE_SUBSCR_DICT 175 +#define STORE_SUBSCR_LIST_INT 176 +#define UNPACK_SEQUENCE_ADAPTIVE 177 +#define UNPACK_SEQUENCE_LIST 178 +#define UNPACK_SEQUENCE_TUPLE 179 +#define UNPACK_SEQUENCE_TWO_TUPLE 180 #define DO_TRACING 255 #define HAS_ARG(op) ((((op) >= HAVE_ARGUMENT) && (!IS_PSEUDO_OPCODE(op)))\ |