-
Notifications
You must be signed in to change notification settings - Fork 36
Add prose for exiting a CAUGHTadm block. #227
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3039,17 +3039,32 @@ Throwing an exception with :ref:`tag address <syntax-tagaddr>` :math:`a` | |||||
|
||||||
.. _exec-caughtadm: | ||||||
|
||||||
Holding a caught exception with |CAUGHTadm| | ||||||
........................................... | ||||||
Exiting a |CAUGHTadm| | ||||||
..................... | ||||||
|
||||||
When the |END| of a |CAUGHTadm|, is reached without a jump, exception, or trap, then the following steps are performed. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
1. Let :math:`\val^\ast` be the values on the top of the stack. | ||||||
|
||||||
2. Pop the values :math:`\val^\ast` from the stack. | ||||||
|
||||||
3. Assert: due to :ref:`validation <valid-instr-seq>`, an administrative instruction :math:`\CAUGHTadm\{a~\val_0^\ast\}` is now on the top of the stack. | ||||||
|
||||||
4. Pop the |CAUGHTadm| from the stack. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
5. Push :math:`\val^\ast` back to the stack. | ||||||
Comment on lines
+3047
to
+3055
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other similar sections ('Exiting an exception handler' and 'Exiting
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aheejin "Exiting instr with label L" uses |
||||||
|
||||||
6. Jump to the position after the |END| of the administrative instruction associated with the |CAUGHTadm| instruction. | ||||||
|
||||||
.. todo:: | ||||||
Add prose describing the administrative |CAUGHTadm| execution step. | ||||||
|
||||||
.. math:: | ||||||
\begin{array}{rcl} | ||||||
\CAUGHTadm\{a~\val^n\}~\val^m~\END &\stepto& \val^m | ||||||
\CAUGHTadm\{a~\val_0^\ast\}~\val^\ast~\END &\stepto& \val^\ast | ||||||
\end{array} | ||||||
|
||||||
.. note:: | ||||||
An exception can only be rethrown from the scope of the |CAUGHTadm| administrative instruction holding it, i.e., from the scope of the |CATCH| or |CATCHALL| block of a :ref:`try-catch <syntax-try-catch>` instruction that caught it. Upon exit from a |CAUGHTadm|, the exception it holds is discarded. | ||||||
|
||||||
|
||||||
.. index:: ! call, function, function instance, label, frame | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made PR #240 with this and the other changes requested.