You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update embedding and execution specs for memory64 (WebAssembly#74)
* Convert table and memory instance storage to sequences
Vectors in the spec are syntactically limited to a maximum size of 2^32.
This is incompatible with memory64, so the storage has been changed to
use sequences instead of vectors. The execution semantics are
unaffected.
* Update memory/table validation/execution/embedding to u64
Memory and table operations in the embedding section have been updated
to use u64 instead of u32, reflecting the changes to `limits`. Various
operations in the execution section were also updated to reflect
`idxtype`'s inclusion in `memtype` and `tabletype`, as well as the
supporting validation rules.
1. Try :ref:`growing <grow-table>` the :ref:`table instance <syntax-tableinst>` :math:`\store.\STABLES[\tableaddr]` by :math:`n` elements with initialization value :math:`\reff`:
Copy file name to clipboardExpand all lines: document/core/exec/modules.rst
+21-27Lines changed: 21 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,11 +94,11 @@ are *allocated* in a :ref:`store <syntax-store>` :math:`S`, as defined by the fo
94
94
95
95
1. Let :math:`\tabletype` be the :ref:`table type <syntax-tabletype>` of the table to allocate and :math:`\reff` the initialization value.
96
96
97
-
2. Let :math:`(\{\LMIN~n, \LMAX~m^?\}~\reftype)` be the structure of :ref:`table type <syntax-tabletype>` :math:`\tabletype`.
97
+
2. Let :math:`(\idxtype~\{\LMIN~n, \LMAX~m^?\}~\reftype)` be the structure of :ref:`table type <syntax-tabletype>` :math:`\tabletype`.
98
98
99
99
3. Let :math:`a` be the first free :ref:`table address <syntax-tableaddr>` in :math:`S`.
100
100
101
-
4. Let :math:`\tableinst` be the :ref:`table instance <syntax-tableinst>` :math:`\{ \TITYPE~\tabletype', \TIELEM~\reff^n \}` with :math:`n` elements set to :math:`\reff`.
101
+
4. Let :math:`\tableinst` be the :ref:`table instance <syntax-tableinst>` :math:`\{ \TITYPE~\tabletype, \TIELEM~\reff^n \}` with :math:`n` elements set to :math:`\reff`.
102
102
103
103
5. Append :math:`\tableinst` to the |STABLES| of :math:`S`.
104
104
@@ -108,7 +108,7 @@ are *allocated* in a :ref:`store <syntax-store>` :math:`S`, as defined by the fo
Copy file name to clipboardExpand all lines: document/core/exec/runtime.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,18 +356,18 @@ Table Instances
356
356
~~~~~~~~~~~~~~~
357
357
358
358
A *table instance* is the runtime representation of a :ref:`table <syntax-table>`.
359
-
It records its :ref:`type <syntax-tabletype>` and holds a vector of :ref:`reference values <syntax-ref>`.
359
+
It records its :ref:`type <syntax-tabletype>` and holds a sequence of :ref:`reference values <syntax-ref>`.
360
360
361
361
.. math::
362
362
\begin{array}{llll}
363
363
\production{table instance} & \tableinst &::=&
364
-
\{ \TITYPE~\tabletype, \TIELEM~\vec(\reff) \} \\
364
+
\{ \TITYPE~\tabletype, \TIELEM~\reff^\ast \} \\
365
365
\end{array}
366
366
367
367
Table elements can be mutated through :ref:`table instructions <syntax-instr-table>`, the execution of an active :ref:`element segment <syntax-elem>`, or by external means provided by the :ref:`embedder <embedder>`.
368
368
369
369
It is an invariant of the semantics that all table elements have a type :ref:`matching <match-reftype>` the element type of :math:`\tabletype`.
370
-
It also is an invariant that the length of the element vector never exceeds the maximum size of :math:`\tabletype`, if present.
370
+
It also is an invariant that the length of the element sequence never exceeds the maximum size of :math:`\tabletype`, if present.
A *memory instance* is the runtime representation of a linear :ref:`memory <syntax-mem>`.
383
-
It records its :ref:`type <syntax-memtype>` and holds a vector of :ref:`bytes <syntax-byte>`.
383
+
It records its :ref:`type <syntax-memtype>` and holds a sequence of :ref:`bytes <syntax-byte>`.
384
384
385
385
.. math::
386
386
\begin{array}{llll}
387
387
\production{memory instance} & \meminst &::=&
388
-
\{ \MITYPE~\memtype, \MIDATA~\vec(\byte) \} \\
388
+
\{ \MITYPE~\memtype, \MIDATA~\byte^\ast \} \\
389
389
\end{array}
390
390
391
-
The length of the vector always is a multiple of the WebAssembly *page size*, which is defined to be the constant :math:`65536` -- abbreviated :math:`64\,\F{Ki}`.
391
+
The length of the sequence always is a multiple of the WebAssembly *page size*, which is defined to be the constant :math:`65536` -- abbreviated :math:`64\,\F{Ki}`.
392
392
393
393
The bytes can be mutated through :ref:`memory instructions <syntax-instr-memory>`, the execution of an active :ref:`data segment <syntax-data>`, or by external means provided by the :ref:`embedder <embedder>`.
0 commit comments