Skip to content

Commit 2ee3c46

Browse files
authored
[spec] Fix refs field in context in appendix (#1741)
1 parent a3a53be commit 2ee3c46

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

document/core/appendix/properties.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,14 @@ Module instances are classified by *module contexts*, which are regular :ref:`co
362362

363363
* Let :math:`\reftype^\ast` be the concatenation of all :math:`\reftype_i` in order.
364364

365+
* Let :math:`m` be the length of :math:`\moduleinst.\MIFUNCS`.
366+
365367
* Let :math:`n` be the length of :math:`\moduleinst.\MIDATAS`.
366368

369+
* Let :math:`x^\ast` be the sequence of :ref:`function indices <syntax-funcidx>` from :math:`0` to :math:`m-1`.
370+
367371
* Then the module instance is valid with :ref:`context <context>`
368-
:math:`\{\CTYPES~\functype^\ast,` :math:`\CFUNCS~{\functype'}^\ast,` :math:`\CTABLES~\tabletype^\ast,` :math:`\CMEMS~\memtype^\ast,` :math:`\CGLOBALS~\globaltype^\ast,` :math:`\CELEMS~\reftype^\ast,` :math:`\CDATAS~{\ok}^n\}`.
372+
:math:`\{\CTYPES~\functype^\ast,` :math:`\CFUNCS~{\functype'}^\ast,` :math:`\CTABLES~\tabletype^\ast,` :math:`\CMEMS~\memtype^\ast,` :math:`\CGLOBALS~\globaltype^\ast,` :math:`\CELEMS~\reftype^\ast,` :math:`\CDATAS~{\ok}^n,` :math:`\CREFS~x^\ast\}`.
369373

370374
.. math::
371375
~\\[-1ex]
@@ -407,7 +411,8 @@ Module instances are classified by *module contexts*, which are regular :ref:`co
407411
\CMEMS & \memtype^\ast, \\
408412
\CGLOBALS & \globaltype^\ast, \\
409413
\CELEMS & \reftype^\ast, \\
410-
\CDATAS & {\ok}^n ~\}
414+
\CDATAS & {\ok}^n, \\
415+
\CREFS & 0 \dots (|\funcaddr^\ast|-1) ~\}
411416
\end{array}
412417
\end{array}
413418
}

0 commit comments

Comments
 (0)