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: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
[](https://github.com/WebAssembly/spec/actions/workflows/ci-spec.yml)
2
-
[](https://github.com/WebAssembly/spec/actions/workflows/ci-interpreter.yml)
1
+
[](https://github.com/wasmfx/specfx/actions/workflows/ci-spec.yml)
2
+
[](https://github.com/wasmfx/specfx/actions/workflows/ci-interpreter.yml)
1. Pre-condition: :math:`\module` is :ref:`valid <valid-module>` with the :ref:`dynamic <syntax-type-dyn>` external import types :math:`\externtype^\ast` and external export types :math:`{\externtype'}^\ast`.
170
+
1. Pre-condition: :math:`\module` is :ref:`valid <valid-module>` with the external import types :math:`\externtype^\ast` and external export types :math:`{\externtype'}^\ast`.
171
171
172
172
2. Let :math:`\import^\ast` be the :ref:`imports <syntax-import>` :math:`\module.\MIMPORTS`.
173
173
@@ -179,7 +179,7 @@ Modules
179
179
180
180
5. Return the concatenation of all :math:`\X{result}_i`, in index order.
181
181
182
-
6. Post-condition: each :ref:`dynamic <syntax-type-dyn>` :math:`\externtype_i` is :ref:`valid <valid-externtype>`.
182
+
6. Post-condition: each :math:`\externtype_i` is :ref:`valid <valid-externtype>` under the empty :ref:`context <context>`.
1. Pre-condition: :math:`\module` is :ref:`valid <valid-module>` with the :ref:`dynamic <syntax-type-dyn>` external import types :math:`\externtype^\ast` and external export types :math:`{\externtype'}^\ast`.
198
+
1. Pre-condition: :math:`\module` is :ref:`valid <valid-module>` with the external import types :math:`\externtype^\ast` and external export types :math:`{\externtype'}^\ast`.
199
199
200
200
2. Let :math:`\export^\ast` be the :ref:`exports <syntax-export>` :math:`\module.\MEXPORTS`.
201
201
@@ -207,7 +207,7 @@ Modules
207
207
208
208
5. Return the concatenation of all :math:`\X{result}_i`, in index order.
209
209
210
-
6. Post-condition: each :ref:`dynamic <syntax-type-dyn>` :math:`\externtype'_i` is :ref:`valid <valid-externtype>`.
210
+
6. Post-condition: each :math:`\externtype'_i` is :ref:`valid <valid-externtype>` under the empty :ref:`context <context>`.
1. Pre-condition: the :ref:`dynamic <syntax-type-dyn>` :math:`\functype` is :ref:`valid <valid-functype>`.
261
-
262
-
2. Let :math:`\typeaddr` be the result of :ref:`allocating a type <alloc-type>` in :math:`\store` for :ref:`function type <syntax-functype>` :math:`\functype`.
263
-
264
-
3. Return the new store paired with :math:`\typeaddr`.
1. Pre-condition: the :ref:`dynamic <syntax-type-dyn>` :math:`\functype` is :ref:`valid <valid-functype>`.
260
+
1. Pre-condition: the :math:`\functype` is :ref:`valid <valid-functype>` under the empty :ref:`context <context>`.
284
261
285
-
2. Let :math:`\funcaddr` be the result of :ref:`allocating a host function <alloc-func>` in :math:`\store` with :ref:`type address <syntax-typeaddr>` :math:`\typeaddr` and host function code :math:`\hostfunc`.
262
+
2. Let :math:`\funcaddr` be the result of :ref:`allocating a host function <alloc-func>` in :math:`\store` with :ref:`function type <syntax-functype>` :math:`\functype` and host function code :math:`\hostfunc`.
286
263
287
264
3. Return the new store paired with :math:`\funcaddr`.
1. Pre-condition: the :ref:`dynamic <syntax-type-dyn>` :math:`\tabletype` is :ref:`valid <valid-tabletype>`.
330
+
1. Pre-condition: the :math:`\tabletype` is :ref:`valid <valid-tabletype>` under the empty :ref:`context <context>`.
354
331
355
332
2. Let :math:`\tableaddr` be the result of :ref:`allocating a table <alloc-table>` in :math:`\store` with :ref:`table type <syntax-tabletype>` :math:`\tabletype` and initialization value :math:`\reff`.
356
333
@@ -369,7 +346,7 @@ Tables
369
346
370
347
1. Return :math:`S.\STABLES[a].\TITYPE`.
371
348
372
-
2. Post-condition: the returned :ref:`dynamic <syntax-type-dyn>` :ref:`table type <syntax-tabletype>` is :ref:`valid <valid-tabletype>`.
349
+
2. Post-condition: the returned :ref:`table type <syntax-tabletype>` is :ref:`valid <valid-tabletype>` under the empty :ref:`context <context>`.
1. Pre-condition: the :ref:`dynamic <syntax-type-dyn>` :math:`\memtype` is :ref:`valid <valid-memtype>`.
442
+
1. Pre-condition: the :math:`\memtype` is :ref:`valid <valid-memtype>` under the empty :ref:`context <context>`.
466
443
467
444
2. Let :math:`\memaddr` be the result of :ref:`allocating a memory <alloc-mem>` in :math:`\store` with :ref:`memory type <syntax-memtype>` :math:`\memtype`.
468
445
@@ -481,7 +458,7 @@ Memories
481
458
482
459
1. Return :math:`S.\SMEMS[a].\MITYPE`.
483
460
484
-
2. Post-condition: the returned :ref:`dynamic <syntax-type-dyn>` :ref:`memory type <syntax-memtype>` is :ref:`valid <valid-memtype>`.
461
+
2. Post-condition: the returned :ref:`memory type <syntax-memtype>` is :ref:`valid <valid-memtype>` under the empty :ref:`context <context>`.
1. Pre-condition: the :ref:`dynamic <syntax-type-dyn>` :math:`\globaltype` is :ref:`valid <valid-globaltype>`.
555
+
1. Pre-condition: the :math:`\globaltype` is :ref:`valid <valid-globaltype>` under the empty :ref:`context <context>`.
579
556
580
557
2. Let :math:`\globaladdr` be the result of :ref:`allocating a global <alloc-global>` in :math:`\store` with :ref:`global type <syntax-globaltype>` :math:`\globaltype` and initialization value :math:`\val`.
581
558
@@ -594,7 +571,7 @@ Globals
594
571
595
572
1. Return :math:`S.\SGLOBALS[a].\GITYPE`.
596
573
597
-
2. Post-condition: the returned :ref:`dynamic <syntax-type-dyn>` :ref:`global type <syntax-globaltype>` is :ref:`valid <valid-globaltype>`.
574
+
2. Post-condition: the returned :ref:`global type <syntax-globaltype>` is :ref:`valid <valid-globaltype>` under the empty :ref:`context <context>`.
598
575
599
576
.. math::
600
577
\begin{array}{lclll}
@@ -638,3 +615,29 @@ Globals
638
615
\F{global\_write}(S, a, v) &=& S' && (\iff S.\SGLOBALS[a].\GITYPE = \MVAR~t \wedge S' = S \with\SGLOBALS[a].\GIVALUE = v) \\
639
616
\F{global\_write}(S, a, v) &=& \ERROR && (\otherwise) \\
640
617
\end{array}
618
+
619
+
620
+
.. index:: reference, reference type
621
+
.. _embed-ref:
622
+
623
+
References
624
+
~~~~~~~~~~
625
+
626
+
:math:`\F{ref\_type}(\store, \reff) : \reftype`
627
+
...............................................
628
+
629
+
1. Pre-condition: the :ref:`reference <syntax-ref>` :math:`\reff` is :ref:`valid <valid-val>` under store :math:`S`.
630
+
631
+
2. Return the :ref:`reference type <syntax-reftype>` :math:`t` with which :math:`\reff` is valid.
632
+
633
+
3. Post-condition: the returned :ref:`reference type <syntax-reftype>` is :ref:`valid <valid-reftype>` under the empty :ref:`context <context>`.
634
+
635
+
.. math::
636
+
\begin{array}{lclll}
637
+
\F{ref\_type}(S, r) &=& t && (\iff S \vdashval r : t) \\
638
+
\end{array}
639
+
640
+
.. note::
641
+
In future versions of WebAssembly,
642
+
not all references may carry precise type information at run time.
643
+
In such cases, this function may return a less precise supertype.
0 commit comments