Skip to content

Commit cbe1701

Browse files
committed
Adds validation for exception results.
Uses the "current" version of exception results, as it will be changed by WebAssembly#226.
1 parent ebb56a5 commit cbe1701

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

document/core/appendix/properties.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,29 @@ Results
5858
S \vdashresult \TRAP : [t^\ast]
5959
}
6060
61-
.. todo::
62-
Add validation for exception results.
61+
62+
:ref:`Results <syntax-result>` :math:`\val^\ast~(\THROWadm~\tagaddr)`
63+
.....................................................................
64+
65+
* The :ref:`tag address <syntax-tagaddr>` :math:`\tagaddr` must be in :math:`\moduleinst.\MITAGS`.
66+
67+
* The :ref:`external value <syntax-externval>` :math:`\EVTAG~\tagaddr` must be :ref:`valid <valid-externval-tag>` with some :ref:`external type <syntax-externtype>` :math:`\ETTAG~\tagtype`.
68+
69+
* Let :math:`[t_1^\ast]\to[]` be the :ref:`tag type <syntax-tagtype>` |tagtype|.
70+
71+
* The values :math:`\val^\ast` must be :ref:`valid <valid-val>` with types :math:`[t_1^\ast]`.
72+
73+
* Then the result is valid with :ref:`result type <syntax-resulttype>` :math:`[t_2^\ast]`, for any sequence :math:`t_2^\ast` of :ref:`value types <syntax-valtype>`.
74+
75+
76+
.. math::
77+
\frac{
78+
\vdashexterntype \ETTAG~[t_1^\ast]\to[]~\ok
79+
\qquad
80+
(S \vdashval \val : t_1)^\ast
81+
}{
82+
S \vdashresult \val^\ast~(\THROWadm~\tagaddr) : [t_2^\ast]
83+
}
6384
6485
6586
.. _module-context:

0 commit comments

Comments
 (0)