diff options
author | Mark Shannon <mark@hotpy.org> | 2019-11-21 09:11:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-21 09:11:43 +0000 |
commit | fee552669f21ca294f57fe0df826945edc779090 (patch) | |
tree | 13b461df5a1231220b8f72c197d2731e9cb88d85 /Include | |
parent | 5dcc06f6e0d7b5d6589085692b86c63e35e2325e (diff) | |
download | cpython-git-fee552669f21ca294f57fe0df826945edc779090.tar.gz |
Produce cleaner bytecode for 'with' and 'async with' by generating separate code for normal and exceptional paths. (#6641)
Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication.
Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/opcode.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Include/opcode.h b/Include/opcode.h index 95d5601486..712664224d 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -30,10 +30,11 @@ extern "C" { #define BINARY_TRUE_DIVIDE 27 #define INPLACE_FLOOR_DIVIDE 28 #define INPLACE_TRUE_DIVIDE 29 +#define RERAISE 48 +#define WITH_EXCEPT_START 49 #define GET_AITER 50 #define GET_ANEXT 51 #define BEFORE_ASYNC_WITH 52 -#define BEGIN_FINALLY 53 #define END_ASYNC_FOR 54 #define INPLACE_ADD 55 #define INPLACE_SUBTRACT 56 @@ -59,14 +60,11 @@ extern "C" { #define INPLACE_AND 77 #define INPLACE_XOR 78 #define INPLACE_OR 79 -#define WITH_CLEANUP_START 81 -#define WITH_CLEANUP_FINISH 82 #define RETURN_VALUE 83 #define IMPORT_STAR 84 #define SETUP_ANNOTATIONS 85 #define YIELD_VALUE 86 #define POP_BLOCK 87 -#define END_FINALLY 88 #define POP_EXCEPT 89 #define HAVE_ARGUMENT 90 #define STORE_NAME 90 @@ -127,8 +125,6 @@ extern "C" { #define BUILD_TUPLE_UNPACK_WITH_CALL 158 #define LOAD_METHOD 160 #define CALL_METHOD 161 -#define CALL_FINALLY 162 -#define POP_FINALLY 163 /* EXCEPT_HANDLER is a special, implicit block type which is created when entering an except handler. It is not an opcode but we define it here |