Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit a3ec6f5

Browse files
committed
Simplified prose, removing loop.
I no longer consider this PR a WIP.
1 parent dce0915 commit a3ec6f5

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

document/core/exec/instructions.rst

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,30 +2719,13 @@ Control Instructions
27192719

27202720
2. Let :math:`L` be the :math:`l`-th label appearing on the stack, starting from the top and counting from zero.
27212721

2722-
3. Assert: due to :ref:`validation <valid-rethrow>`, :math:`L` is a catch label, i.e., a label of the form :math:`(\LCATCH~[t^\ast])`.
2722+
3. Assert: due to :ref:`validation <valid-rethrow>`, :math:`L` is a catch label, i.e., a label of the form :math:`(\LCATCH~[t^\ast])`, which is a label followed by a caught exception in an active catch clause.
27232723

2724-
4. Repeat :math:`l+1` times:
2724+
4. Let :math:`\{a~\val^\ast\}` be the caught exception.
27252725

2726-
a. While the top of the stack is a value, a |handler|, or a |CAUGHTadm| instruction, do:
2727-
2728-
i. Pop the instruction from the stack.
2729-
2730-
b. Assert: due to :ref:`validation <valid-rethrow>`, the top of the stack now is a label.
2731-
2732-
c. Pop the label from the stack.
2733-
2734-
5. Assert: due to **TODO**, the last two instructions popped are a |CAUGHTadm| instruction and the :math:`l+1`-th label, in that order.
2735-
2736-
.. todo::
2737-
Justify the existence of a |CAUGHTadm| here. Perhaps extend some typing rule?
2738-
2739-
6. Let :math:`\CAUGHTadm\{a~\val^\ast\}` be the instruction after the label :math:`L`.
2740-
2741-
7. Put all the popped values back on the stack, except the last instruction, the |RETHROW|.
2742-
2743-
8. Push the values :math:`\val^\ast` onto the stack.
2726+
5. Push the values :math:`\val^\ast` onto the stack.
27442727

2745-
8. :ref:`Throw <exec-throwadm>` an exception with :ref:`tag address <syntax-tagaddr>` :math:`a`.
2728+
6. :ref:`Throw <exec-throwadm>` an exception with :ref:`tag address <syntax-tagaddr>` :math:`a`.
27462729

27472730
.. math::
27482731
~\\[-1ex]

0 commit comments

Comments
 (0)