Skip to content

Commit 99a72e2

Browse files
committed
Added the missing prose here after all
as it doesn't make sense on its own in WebAssembly#246.
1 parent 34c7fed commit 99a72e2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

document/core/exec/runtime.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,11 @@ to their associated branch *targets*. A single handler is expressed syntacticall
543543
:ref:`instructions <syntax-instr>` possibly following a :ref:`tag address <syntax-tagaddr>`.
544544
If there is no :ref:`tag address <syntax-tagaddr>`, the instructions of that handler correspond to a |CATCHALL| clause.
545545

546-
.. todo::
547-
Add prose for delegating handlers.
548-
549546
An exception may be temporarily pushed onto the stack when it is :ref:`thrown and caught <exec-throwadm>` by a handler.
550547

548+
A |labelidx| handler points to the outer block in which any exceptions thrown from its scope, will be rethrown (delegated to).
549+
This handler does not catch exceptions, but only rethrows them.
550+
551551
.. math::
552552
\begin{array}{llllll}
553553
\production{(handler)} & \handler &::=& (\tagaddr^?~\instr^\ast)^\ast &|& \labelidx\\
@@ -561,9 +561,7 @@ If the list of handlers is empty, or if the tag address of the thrown exception
561561
When a thrown exception is caught by a handler, the caught exception is pushed onto the stack and the block of that handler's target is :ref:`entered <exec-caughtadm-enter>`.
562562
When exiting a block with a caught exception, the exception is discarded.
563563

564-
565-
.. todo::
566-
Add prose with intuition on delegating handlers.
564+
A handler pointing to a |labelidx| :math:`l` can be thought of as a break to the :math:`l` th label on exception, followed by a rethrow of the exception.
567565

568566

569567
.. _exec-expand:

0 commit comments

Comments
 (0)