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
@@ -2684,30 +2684,13 @@ Control Instructions
2684
2684
2685
2685
2. Let :math:`L` be the :math:`l`-th label appearing on the stack, starting from the top and counting from zero.
2686
2686
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.
2688
2688
2689
-
4. Repeat:math:`l+1` times:
2689
+
4. Let:math:`\{a~\val^\ast\}` be the caught exception.
2690
2690
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.
2692
2692
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`.
0 commit comments