Skip to content

Commit f7e4ad1

Browse files
authored
[spec] Fix single-table limitation in module instantiation (#1434)
1 parent 253db39 commit f7e4ad1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

document/core/exec/modules.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -657,19 +657,17 @@ It is up to the :ref:`embedder <embedder>` to define how such conditions are rep
657657

658658
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:
659659

660-
a. Assert: :math:`\tableidx_i` is :math:`0`.
660+
a. Let :math:`n` be the length of the vector :math:`\elem_i.\EINIT`.
661661

662-
b. Let :math:`n` be the length of the vector :math:`\elem_i.\EINIT`.
662+
b. :ref:`Execute <exec-instr-seq>` the instruction sequence :math:`\X{einstr}^\ast_i`.
663663

664-
c. :ref:`Execute <exec-instr-seq>` the instruction sequence :math:`\X{einstr}^\ast_i`.
664+
c. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~0`.
665665

666-
d. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~0`.
667-
668-
e. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~n`.
666+
d. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~n`.
669667

670-
f. :ref:`Execute <exec-table.init>` the instruction :math:`\TABLEINIT~i`.
668+
e. :ref:`Execute <exec-table.init>` the instruction :math:`\TABLEINIT~\tableidx_i~i`.
671669

672-
g. :ref:`Execute <exec-elem.drop>` the instruction :math:`\ELEMDROP~i`.
670+
f. :ref:`Execute <exec-elem.drop>` the instruction :math:`\ELEMDROP~i`.
673671

674672
15. For each :ref:`data segment <syntax-data>` :math:`\data_i` in :math:`\module.\MDATAS` whose :ref:`mode <syntax-datamode>` is of the form :math:`\DACTIVE~\{ \DMEM~\memidx_i, \DOFFSET~\X{dinstr}^\ast_i~\END \}`, do:
675673

0 commit comments

Comments
 (0)