mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309)
This commit is contained in:
parent
6c6e0408a6
commit
32091df41c
10 changed files with 99 additions and 97 deletions
|
@ -635,6 +635,28 @@ iterations of the loop.
|
|||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
.. opcode:: CHECK_EG_MATCH
|
||||
|
||||
Performs exception matching for ``except*``. Applies ``split(TOS)`` on
|
||||
the exception group representing TOS1.
|
||||
|
||||
In case of a match, pops two items from the stack and pushes the
|
||||
non-matching subgroup (``None`` in case of full match) followed by the
|
||||
matching subgroup. When there is no match, pops one item (the match
|
||||
type) and pushes ``None``.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
.. opcode:: PREP_RERAISE_STAR
|
||||
|
||||
Combines the raised and reraised exceptions list from TOS, into an exception
|
||||
group to propagate from a try-except* block. Uses the original exception
|
||||
group from TOS1 to reconstruct the structure of reraised exceptions. Pops
|
||||
two items from the stack and pushes the exception to reraise or ``None``
|
||||
if there isn't one.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
.. opcode:: WITH_EXCEPT_START
|
||||
|
||||
Calls the function in position 4 on the stack with arguments (type, val, tb)
|
||||
|
@ -922,18 +944,6 @@ iterations of the loop.
|
|||
.. versionadded:: 3.1
|
||||
|
||||
|
||||
.. opcode:: JUMP_IF_NOT_EG_MATCH (target)
|
||||
|
||||
Performs exception matching for ``except*``. Applies ``split(TOS)`` on
|
||||
the exception group representing TOS1. Jumps if no match is found.
|
||||
|
||||
Pops one item from the stack (the match type). If a match was found,
|
||||
next item (the exception) and pushes the non-matching part of the
|
||||
exception group followed by the matching part.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
|
||||
.. opcode:: POP_JUMP_IF_NOT_NONE (target)
|
||||
|
||||
If TOS is not none, sets the bytecode counter to *target*. TOS is popped.
|
||||
|
@ -948,17 +958,6 @@ iterations of the loop.
|
|||
.. versionadded:: 3.11
|
||||
|
||||
|
||||
.. opcode:: PREP_RERAISE_STAR
|
||||
|
||||
Combines the raised and reraised exceptions list from TOS, into an exception
|
||||
group to propagate from a try-except* block. Uses the original exception
|
||||
group from TOS1 to reconstruct the structure of reraised exceptions. Pops
|
||||
two items from the stack and pushes the exception to reraise or ``None``
|
||||
if there isn't one.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
|
||||
.. opcode:: JUMP_IF_TRUE_OR_POP (target)
|
||||
|
||||
If TOS is true, sets the bytecode counter to *target* and leaves TOS on the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue