diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-02-02 10:02:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 10:02:57 (GMT) |
commit | 0675b8f032c69d265468b31d5cadac6a7ce4bd9c (patch) | |
tree | c486ce5616413963e20d80b4e07c8030c556e5d3 /Python/opcode_metadata.h | |
parent | ee21110086e277a0ac24f5f768f35847b4db3380 (diff) | |
download | cpython-0675b8f032c69d265468b31d5cadac6a7ce4bd9c.zip cpython-0675b8f032c69d265468b31d5cadac6a7ce4bd9c.tar.gz cpython-0675b8f032c69d265468b31d5cadac6a7ce4bd9c.tar.bz2 |
gh-98831: rewrite RERAISE and CLEANUP_THROW in the instruction definition DSL (#101511)
Diffstat (limited to 'Python/opcode_metadata.h')
-rw-r--r-- | Python/opcode_metadata.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/opcode_metadata.h b/Python/opcode_metadata.h index f0bdede..ca3dde3 100644 --- a/Python/opcode_metadata.h +++ b/Python/opcode_metadata.h @@ -105,13 +105,13 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) { case POP_EXCEPT: return 1; case RERAISE: - return -1; + return oparg + 1; case PREP_RERAISE_STAR: return 2; case END_ASYNC_FOR: return 2; case CLEANUP_THROW: - return -1; + return 3; case LOAD_ASSERTION_ERROR: return 0; case LOAD_BUILD_CLASS: @@ -451,13 +451,13 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) { case POP_EXCEPT: return 0; case RERAISE: - return -1; + return oparg; case PREP_RERAISE_STAR: return 1; case END_ASYNC_FOR: return 0; case CLEANUP_THROW: - return -1; + return 1; case LOAD_ASSERTION_ERROR: return 1; case LOAD_BUILD_CLASS: |