diff options
author | 2019-11-21 09:11:43 +0000 | |
---|---|---|
committer | 2019-11-21 09:11:43 +0000 | |
commit | fee552669f21ca294f57fe0df826945edc779090 (patch) | |
tree | 13b461df5a1231220b8f72c197d2731e9cb88d85 /Python/opcode_targets.h | |
parent | bpo-38858: Allocate small integers on the heap (GH-17301) (diff) | |
download | cpython-fee552669f21ca294f57fe0df826945edc779090.tar.gz cpython-fee552669f21ca294f57fe0df826945edc779090.tar.bz2 cpython-fee552669f21ca294f57fe0df826945edc779090.zip |
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 'Python/opcode_targets.h')
-rw-r--r-- | Python/opcode_targets.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h index d39bad0bcd3..e4f4a8c7791 100644 --- a/Python/opcode_targets.h +++ b/Python/opcode_targets.h @@ -47,12 +47,12 @@ static void *opcode_targets[256] = { &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, - &&_unknown_opcode, - &&_unknown_opcode, + &&TARGET_RERAISE, + &&TARGET_WITH_EXCEPT_START, &&TARGET_GET_AITER, &&TARGET_GET_ANEXT, &&TARGET_BEFORE_ASYNC_WITH, - &&TARGET_BEGIN_FINALLY, + &&_unknown_opcode, &&TARGET_END_ASYNC_FOR, &&TARGET_INPLACE_ADD, &&TARGET_INPLACE_SUBTRACT, @@ -80,14 +80,14 @@ static void *opcode_targets[256] = { &&TARGET_INPLACE_XOR, &&TARGET_INPLACE_OR, &&_unknown_opcode, - &&TARGET_WITH_CLEANUP_START, - &&TARGET_WITH_CLEANUP_FINISH, + &&_unknown_opcode, + &&_unknown_opcode, &&TARGET_RETURN_VALUE, &&TARGET_IMPORT_STAR, &&TARGET_SETUP_ANNOTATIONS, &&TARGET_YIELD_VALUE, &&TARGET_POP_BLOCK, - &&TARGET_END_FINALLY, + &&_unknown_opcode, &&TARGET_POP_EXCEPT, &&TARGET_STORE_NAME, &&TARGET_DELETE_NAME, @@ -161,8 +161,8 @@ static void *opcode_targets[256] = { &&_unknown_opcode, &&TARGET_LOAD_METHOD, &&TARGET_CALL_METHOD, - &&TARGET_CALL_FINALLY, - &&TARGET_POP_FINALLY, + &&_unknown_opcode, + &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, &&_unknown_opcode, |