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

Commit 1edf74d

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

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
@@ -2684,30 +2684,13 @@ Control Instructions
26842684

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

2687-
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])`.
2687+
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.
26882688

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

2691-
a. While the top of the stack is a value, a |handler|, or a |CAUGHTadm| instruction, do:
2691+
5. Push the values :math:`\val^\ast` onto the stack.
26922692

2693-
i. Pop the instruction from the stack.
2694-
2695-
b. Assert: due to :ref:`validation <valid-rethrow>`, the top of the stack now is a label.
2696-
2697-
c. Pop the label from the stack.
2698-
2699-
5. Assert: due to **TODO**, the last two instructions popped are a |CAUGHTadm| instruction and the :math:`l+1`-th label, in that order.
2700-
2701-
.. todo::
2702-
Justify the existence of a |CAUGHTadm| here. Perhaps extend some typing rule?
2703-
2704-
6. Let :math:`\CAUGHTadm\{a~\val^\ast\}` be the instruction after the label :math:`L`.
2705-
2706-
7. Put all the popped values back on the stack, except the last instruction, the |RETHROW|.
2707-
2708-
8. Push the values :math:`\val^\ast` onto the stack.
2709-
2710-
8. :ref:`Throw <exec-throwadm>` an exception with :ref:`tag address <syntax-tagaddr>` :math:`a`.
2693+
6. :ref:`Throw <exec-throwadm>` an exception with :ref:`tag address <syntax-tagaddr>` :math:`a`.
27112694

27122695
.. math::
27132696
~\\[-1ex]

0 commit comments

Comments
 (0)