mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
This commit is contained in:
parent
3690688149
commit
81e3aa835c
13 changed files with 107 additions and 73 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue