gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)

This commit is contained in:
Irit Katriel 2023-02-14 11:54:13 +00:00 committed by GitHub
parent 3690688149
commit 81e3aa835c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 107 additions and 73 deletions

View file

@ -3431,7 +3431,7 @@ compiler_try_except(struct compiler *c, stmt_ty s)
[orig, res, rest] Ln+1: LIST_APPEND 1 ) add unhandled exc to res (could be None)
[orig, res] PREP_RERAISE_STAR
[orig, res] CALL_INTRINSIC_2 PREP_RERAISE_STAR
[exc] COPY 1
[exc, exc] POP_JUMP_IF_NOT_NONE RER
[exc] POP_TOP
@ -3580,7 +3580,7 @@ compiler_try_star_except(struct compiler *c, stmt_ty s)
NEW_JUMP_TARGET_LABEL(c, reraise);
USE_LABEL(c, reraise_star);
ADDOP(c, NO_LOCATION, PREP_RERAISE_STAR);
ADDOP_I(c, NO_LOCATION, CALL_INTRINSIC_2, INTRINSIC_PREP_RERAISE_STAR);
ADDOP_I(c, NO_LOCATION, COPY, 1);
ADDOP_JUMP(c, NO_LOCATION, POP_JUMP_IF_NOT_NONE, reraise);