You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: document/core/exec/instructions.rst
+4-21Lines changed: 4 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -2719,30 +2719,13 @@ Control Instructions
2719
2719
2720
2720
2. Let :math:`L` be the :math:`l`-th label appearing on the stack, starting from the top and counting from zero.
2721
2721
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.
2723
2723
2724
-
4. Repeat:math:`l+1` times:
2724
+
4. Let:math:`\{a~\val^\ast\}` be the caught exception.
2725
2725
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.
2744
2727
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`.
0 commit comments