Skip to content

Commit

Permalink
[spec] Fix single-table limitation in module instantiation (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw authored Apr 4, 2022
1 parent 253db39 commit f7e4ad1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions document/core/exec/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -657,19 +657,17 @@ It is up to the :ref:`embedder <embedder>` to define how such conditions are rep

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:

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

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

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

d. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~0`.

e. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~n`.
d. :ref:`Execute <exec-const>` the instruction :math:`\I32.\CONST~n`.

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

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

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:

Expand Down

0 comments on commit f7e4ad1

Please sign in to comment.