summaryrefslogtreecommitdiffstats
path: root/Python/opcode_targets.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2019-11-21 09:11:43 (GMT)
committerGitHub <noreply@github.com>2019-11-21 09:11:43 (GMT)
commitfee552669f21ca294f57fe0df826945edc779090 (patch)
tree13b461df5a1231220b8f72c197d2731e9cb88d85 /Python/opcode_targets.h
parent5dcc06f6e0d7b5d6589085692b86c63e35e2325e (diff)
downloadcpython-fee552669f21ca294f57fe0df826945edc779090.zip
cpython-fee552669f21ca294f57fe0df826945edc779090.tar.gz
cpython-fee552669f21ca294f57fe0df826945edc779090.tar.bz2
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.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h
index d39bad0..e4f4a8c 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,