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
Copy file name to clipboardExpand all lines: document/core/valid/conventions.rst
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -69,14 +69,12 @@ In addition to field access written :math:`C.\K{field}` the following notation i
69
69
* When spelling out a context, empty fields are omitted.
70
70
Likewise, the |CRETURN| field may be omitted when it is |NORETURN|.
71
71
72
-
* :math:`C,\K{field}\,A^\ast` denotes the same context as :math:`C` but with the elements :math:`A^\ast` prepended to its :math:`\K{field}` component sequence.
72
+
* The notation :math:`\K{field}\,A^\ast, C` denotes the same context as :math:`C` but with the elements :math:`A^\ast` prepended to its :math:`\K{field}` component sequence.
73
73
74
74
.. note::
75
-
This notation is defined to *prepend* not *append*.
76
-
It is only used in situations where the original :math:`C.\K{field}` is either empty
75
+
The notation for context extension is only used in situations where the original :math:`C.\K{field}` is either empty
77
76
or :math:`\K{field}` is :math:`\K{labels}`.
78
-
In the latter case adding to the front is desired
79
-
because the :ref:`label index <syntax-labelidx>` space is indexed relatively, that is, in reverse order of addition.
77
+
It is reversed from usual conventions because it *prepends* not *appends*, in accordance with the use of relative indexing to look up a label in the context's label list.
C \vdashinstr\IF~[t^?]~\instr_1^\ast~\ELSE~\instr_2^\ast~\END : [\I32] \to [t^?]
536
536
}
@@ -787,4 +787,7 @@ Constant Expressions
787
787
}
788
788
789
789
.. note::
790
+
Currently, constant expressions occurring as initializers of :ref:`globals <syntax-global>` are further constrained in that contained |GETGLOBAL| instructions are only allowed to refer to *imported* globals.
791
+
This is enforced in the :ref:`validation rule for modules <valid-module>` by constraining the context :math:`C` accordingly.
792
+
790
793
The definition of constant expression may be extended in future versions of WebAssembly.
@@ -454,16 +454,16 @@ Instead, the context :math:`C` for validation of the module's content is constru
454
454
* :math:`C.\CTYPES` is :math:`\module.\MTYPES`,
455
455
456
456
* :math:`C.\CFUNCS` is :math:`\etfuncs(\X{it}^\ast)` concatenated with :math:`\X{ft}^\ast`,
457
-
with the import's :ref:`external types <syntax-extentype>` :math:`\X{it}^\ast` and the internal :math:`function types <syntax-functype>` :math:`\X{ft}^\ast` as determined below,
457
+
with the import's :ref:`external types <syntax-externtype>` :math:`\X{it}^\ast` and the internal :math:`function types <syntax-functype>` :math:`\X{ft}^\ast` as determined below,
458
458
459
459
* :math:`C.\CTABLES` is :math:`\ettables(\X{it}^\ast)` concatenated with :math:`\X{tt}^\ast`,
460
-
with the import's :ref:`external types <syntax-extentype>` :math:`\X{it}^\ast` and the internal :math:`table types <syntax-tabletype>` :math:`\X{tt}^\ast` as determined below,
460
+
with the import's :ref:`external types <syntax-externtype>` :math:`\X{it}^\ast` and the internal :math:`table types <syntax-tabletype>` :math:`\X{tt}^\ast` as determined below,
461
461
462
462
* :math:`C.\CMEMS` is :math:`\etmems(\X{it}^\ast)` concatenated with :math:`\X{mt}^\ast`,
463
-
with the import's :ref:`external types <syntax-extentype>` :math:`\X{it}^\ast` and the internal :math:`memory types <syntax-memtype>` :math:`\X{mt}^\ast` as determined below,
463
+
with the import's :ref:`external types <syntax-externtype>` :math:`\X{it}^\ast` and the internal :math:`memory types <syntax-memtype>` :math:`\X{mt}^\ast` as determined below,
464
464
465
465
* :math:`C.\CGLOBALS` is :math:`\etglobals(\X{it}^\ast)` concatenated with :math:`\X{gt}^\ast`,
466
-
with the import's :ref:`external types <syntax-extentype>` :math:`\X{it}^\ast` and the internal :math:`global types <syntax-globaltype>` :math:`\X{gt}^\ast` as determined below,
466
+
with the import's :ref:`external types <syntax-externtype>` :math:`\X{it}^\ast` and the internal :math:`global types <syntax-globaltype>` :math:`\X{gt}^\ast` as determined below,
0 commit comments