Skip to content

Commit ff149b4

Browse files
authored
[spec] Add missing case for declarative elem segments
Fixes #1562.
1 parent f9b461a commit ff149b4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

document/core/exec/modules.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ It is up to the :ref:`embedder <embedder>` to define how such conditions are rep
655655

656656
13. Push the frame :math:`F` to the stack.
657657

658-
14. For each :ref:`element segment <syntax-elem>` :math:`\elem_i` in :math:`\module.\MELEMS` whose :ref:`mode <syntax-elemmode>` is of the form :math:`\EACTIVE~\{ \ETABLE~\tableidx_i, \EOFFSET~\X{einstr}^\ast_i~\END \}`, do:
658+
14. For each :ref:`element segment <syntax-elem>` :math:`\elem_i` in :math:`\module.\MELEMS` whose :ref:`mode <syntax-elemmode>` is either of the form :math:`\EDECLARATIVE` or :math:`\EACTIVE~\{ \ETABLE~\tableidx_i, \EOFFSET~\X{einstr}^\ast_i~\END \}`, do:
659659

660660
a. Let :math:`n` be the length of the vector :math:`\elem_i.\EINIT`.
661661

@@ -685,15 +685,19 @@ It is up to the :ref:`embedder <embedder>` to define how such conditions are rep
685685

686686
g. :ref:`Execute <exec-data.drop>` the instruction :math:`\DATADROP~i`.
687687

688-
16. If the :ref:`start function <syntax-start>` :math:`\module.\MSTART` is not empty, then:
688+
16. For each :ref:`data segment <syntax-data>` :math:`\data_i` in :math:`\module.\MDATAS` whose :ref:`mode <syntax-datamode>` is of the form :math:`\DDECLARATIVE`, do:
689+
690+
a. :ref:`Execute <exec-data.drop>` the instruction :math:`\DATADROP~i`.
691+
692+
17. If the :ref:`start function <syntax-start>` :math:`\module.\MSTART` is not empty, then:
689693

690694
a. Let :math:`\start` be the :ref:`start function <syntax-start>` :math:`\module.\MSTART`.
691695

692696
b. :ref:`Execute <exec-call>` the instruction :math:`\CALL~\start.\SFUNC`.
693697

694-
17. Assert: due to :ref:`validation <valid-module>`, the frame :math:`F` is now on the top of the stack.
698+
18. Assert: due to :ref:`validation <valid-module>`, the frame :math:`F` is now on the top of the stack.
695699

696-
18. Pop the frame :math:`F` from the stack.
700+
19. Pop the frame :math:`F` from the stack.
697701

698702

699703
.. math::

0 commit comments

Comments
 (0)