diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-04-11 09:40:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 09:40:24 (GMT) |
commit | dd207a6ac52d4bd9a71cf178fc1d5c17a6f07aff (patch) | |
tree | c196769c21e856595b8c90adc5205b2372234f02 /Include | |
parent | 98ff4a68773c49619d486c7e758ebbe1662f8387 (diff) | |
download | cpython-dd207a6ac52d4bd9a71cf178fc1d5c17a6f07aff.zip cpython-dd207a6ac52d4bd9a71cf178fc1d5c17a6f07aff.tar.gz cpython-dd207a6ac52d4bd9a71cf178fc1d5c17a6f07aff.tar.bz2 |
bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/opcode.h | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/Include/opcode.h b/Include/opcode.h index ff3ffdd..57a72a6 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -69,8 +69,8 @@ extern "C" { #define JUMP_FORWARD 110 #define JUMP_IF_FALSE_OR_POP 111 #define JUMP_IF_TRUE_OR_POP 112 -#define POP_JUMP_IF_FALSE 114 -#define POP_JUMP_IF_TRUE 115 +#define POP_JUMP_FORWARD_IF_FALSE 114 +#define POP_JUMP_FORWARD_IF_TRUE 115 #define LOAD_GLOBAL 116 #define IS_OP 117 #define CONTAINS_OP 118 @@ -81,8 +81,8 @@ extern "C" { #define LOAD_FAST 124 #define STORE_FAST 125 #define DELETE_FAST 126 -#define POP_JUMP_IF_NOT_NONE 128 -#define POP_JUMP_IF_NONE 129 +#define POP_JUMP_FORWARD_IF_NOT_NONE 128 +#define POP_JUMP_FORWARD_IF_NONE 129 #define RAISE_VARARGS 130 #define GET_AWAITABLE 131 #define MAKE_FUNCTION 132 @@ -114,6 +114,10 @@ extern "C" { #define PRECALL 166 #define CALL 171 #define KW_NAMES 172 +#define POP_JUMP_BACKWARD_IF_NOT_NONE 173 +#define POP_JUMP_BACKWARD_IF_NONE 174 +#define POP_JUMP_BACKWARD_IF_FALSE 175 +#define POP_JUMP_BACKWARD_IF_TRUE 176 #define BINARY_OP_ADAPTIVE 3 #define BINARY_OP_ADD_FLOAT 4 #define BINARY_OP_ADD_INT 5 @@ -181,9 +185,9 @@ extern "C" { #define STORE_SUBSCR_DICT 168 #define STORE_SUBSCR_LIST_INT 169 #define UNPACK_SEQUENCE_ADAPTIVE 170 -#define UNPACK_SEQUENCE_LIST 173 -#define UNPACK_SEQUENCE_TUPLE 174 -#define UNPACK_SEQUENCE_TWO_TUPLE 175 +#define UNPACK_SEQUENCE_LIST 177 +#define UNPACK_SEQUENCE_TUPLE 178 +#define UNPACK_SEQUENCE_TWO_TUPLE 179 #define DO_TRACING 255 extern const uint8_t _PyOpcode_Caches[256]; @@ -195,9 +199,9 @@ static const uint32_t _PyOpcode_RelativeJump[8] = { 0U, 0U, 536870912U, - 134234112U, - 4160U, - 0U, + 135020544U, + 4163U, + 122880U, 0U, 0U, }; @@ -207,7 +211,7 @@ static const uint32_t _PyOpcode_Jump[8] = { 536870912U, 135118848U, 4163U, - 0U, + 122880U, 0U, 0U, }; @@ -338,10 +342,14 @@ const uint8_t _PyOpcode_Deopt[256] = { [MATCH_SEQUENCE] = MATCH_SEQUENCE, [NOP] = NOP, [POP_EXCEPT] = POP_EXCEPT, - [POP_JUMP_IF_FALSE] = POP_JUMP_IF_FALSE, - [POP_JUMP_IF_NONE] = POP_JUMP_IF_NONE, - [POP_JUMP_IF_NOT_NONE] = POP_JUMP_IF_NOT_NONE, - [POP_JUMP_IF_TRUE] = POP_JUMP_IF_TRUE, + [POP_JUMP_BACKWARD_IF_FALSE] = POP_JUMP_BACKWARD_IF_FALSE, + [POP_JUMP_BACKWARD_IF_NONE] = POP_JUMP_BACKWARD_IF_NONE, + [POP_JUMP_BACKWARD_IF_NOT_NONE] = POP_JUMP_BACKWARD_IF_NOT_NONE, + [POP_JUMP_BACKWARD_IF_TRUE] = POP_JUMP_BACKWARD_IF_TRUE, + [POP_JUMP_FORWARD_IF_FALSE] = POP_JUMP_FORWARD_IF_FALSE, + [POP_JUMP_FORWARD_IF_NONE] = POP_JUMP_FORWARD_IF_NONE, + [POP_JUMP_FORWARD_IF_NOT_NONE] = POP_JUMP_FORWARD_IF_NOT_NONE, + [POP_JUMP_FORWARD_IF_TRUE] = POP_JUMP_FORWARD_IF_TRUE, [POP_TOP] = POP_TOP, [PRECALL] = PRECALL, [PRECALL_ADAPTIVE] = PRECALL, |