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
[spec] Use optional data instance, not data address (WebAssembly#93)
data.drop must update the store, not the frame. There may be multiple
copies of the frame, so any updates will only update once. We can make
sure that all copies are updated by using an indirection through data
addresses and updating the store instead.
See discussion in PR WebAssembly#92.
Copy file name to clipboardExpand all lines: document/core/exec/runtime.rst
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,9 @@ Store
62
62
The *store* represents all global state that can be manipulated by WebAssembly programs.
63
63
It consists of the runtime representation of all *instances* of :ref:`functions <syntax-funcinst>`, :ref:`tables <syntax-tableinst>`, :ref:`memories <syntax-meminst>`, and :ref:`globals <syntax-globalinst>`, :ref:`element segments <syntax-eleminst>`, and :ref:`data segments <syntax-datainst>` that have been :ref:`allocated <alloc>` during the life time of the abstract machine. [#gc]_
64
64
65
+
Element and data segments can be dropped by the owning module, in which case the respective instances are replaced with :math:`\epsilon`.
66
+
It is an invariant of the semantics that no element or data instance is :ref:`addressed <syntax-addr>` from anywhere else but the owning module instances.
67
+
65
68
Syntactically, the store is defined as a :ref:`record <notation-record>` listing the existing instances of each category:
66
69
67
70
.. math::
@@ -72,8 +75,8 @@ Syntactically, the store is defined as a :ref:`record <notation-record>` listing
72
75
\STABLES & \tableinst^\ast, \\
73
76
\SMEMS & \meminst^\ast, \\
74
77
\SGLOBALS & \globalinst^\ast, \\
75
-
\SELEM & \eleminst^\ast, \\
76
-
\SDATA & \datainst^\ast ~\} \\
78
+
\SELEM & (\eleminst^?)^\ast, \\
79
+
\SDATA & (\datainst^?)^\ast ~\} \\
77
80
\end{array}
78
81
\end{array}
79
82
@@ -170,8 +173,8 @@ and collects runtime representations of all entities that are imported, defined,
0 commit comments