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/appendix/changes.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -462,6 +462,8 @@ Added more precise types for references. [#proposal-typedref]_
462
462
463
463
* Refined typing of :ref:`local instructions <valid-instr-variable>` and :ref:`instruction sequences <valid-instr-seq>` to track the :ref:`initialization status <syntax-init>` of :ref:`locals <syntax-local>` with non-:ref:`defaultable <valid-defaultable>` type
464
464
465
+
* Refined decoding of :ref:`active <syntax-elemmode>` :ref:`element segments <binary-elem>` with implicit element type and plain function indices (opcode :math:`0`) to produce :ref:`non-nullable <syntax-nullable>` :ref:`reference type <syntax-reftype>`.
466
+
465
467
* Extended :ref:`table definitions <syntax-table>` with optional initializer expression
Copy file name to clipboardExpand all lines: document/core/exec/modules.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -364,7 +364,7 @@ and list of :ref:`reference <syntax-ref>` vectors for the module's :ref:`element
364
364
365
365
8. For each :ref:`element segment <syntax-elem>` :math:`\elem_i` in :math:`\module.\MELEMS`, do:
366
366
367
-
a. Let :math:`\reftype_i` be the element :ref:`reference type <syntax-reftype>` obtained by `instantiating <type-inst>` :math:`\elem_i.\ETYPE` in :math:`\moduleinst` defined below.
367
+
a. Let :math:`\reftype_i` be the element :ref:`reference type <syntax-reftype>` obtained by :ref:`instantiating <type-inst>` :math:`\elem_i.\ETYPE` in :math:`\moduleinst` defined below.
368
368
369
369
b. Let :math:`\elemaddr_i` be the :ref:`element address <syntax-elemaddr>` resulting from :ref:`allocating <alloc-elem>` a :ref:`element instance <syntax-eleminst>` of :ref:`reference type <syntax-reftype>` :math:`\reftype_i` with contents :math:`(\reff_{\F{e}}^\ast)^\ast[i]`.
Copy file name to clipboardExpand all lines: document/core/valid/instructions.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2601,15 +2601,15 @@ Control Instructions
2601
2601
2602
2602
* The tag :math:`C.\CTAGS[x]` must be defined in the context.
2603
2603
2604
-
* Let :math:`[t^\ast] \to [{t'}^\ast]` be the :ref:`tag type <syntax-tagtype>` :math:`C.\CTAGS[x]`.
2604
+
* Let :math:`[t^\ast] \to [{t'}^\ast]` be the :ref:`expansion <aux-expand-deftype>` of the :ref:`tag type <syntax-tagtype>` :math:`C.\CTAGS[x]`.
2605
2605
2606
2606
* The :ref:`result type <syntax-resulttype>` :math:`[{t'}^\ast]` must be empty.
2607
2607
2608
-
* Then the instruction is valid with type :math:`[t_1^\ast t^\ast] \to [t_2^\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\ast` and :math:`t_2^\ast`.
2608
+
* Then the instruction is valid with type :math:`[t_1^\ast t^\ast] \to [t_2^\ast]`, for any sequences of :ref:`value types <syntax-valtype>` :math:`t_1^\ast` and :math:`t_2^\ast`.
2609
2609
2610
2610
.. math::
2611
2611
\frac{
2612
-
C.\CTAGS[x] = [t^\ast] \to []
2612
+
\expanddt(C.\CTAGS[x]) = [t^\ast] \to []
2613
2613
}{
2614
2614
C \vdashinstr\THROW~x : [t_1^\ast~t^\ast] \to [t_2^\ast]
Copy file name to clipboardExpand all lines: document/core/valid/matching.rst
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -580,14 +580,22 @@ A :ref:`global type <syntax-globaltype>` :math:`(\mut_1~t_1)` matches :math:`(\m
580
580
Tag Types
581
581
~~~~~~~~~
582
582
583
-
A :ref:`tag type <syntax-tagtype>` :math:`\tagtype_1` matches :math:`\tagtype_2` if and only if they are the same.
583
+
A :ref:`tag type <syntax-tagtype>` :math:`\deftype_1` matches :math:`\deftype_2` if and only if the :ref:`defined type <syntax-deftype>` :math:`\deftype_1` :ref:`matches <match-deftype>` :math:`\deftype_2`, and vice versa.
584
584
585
585
.. math::
586
586
\frac{
587
+
C \vdashdeftypematch\deftype_1\matchesdeftype\deftype_2
588
+
\qquad
589
+
C \vdashdeftypematch\deftype_2\matchesdeftype\deftype_1
587
590
}{
588
-
C \vdashtagtypematch\tagtype\matchestagtype\tagtype
591
+
C \vdashtagtypematch\deftype_1\matchestagtype\deftype_2
589
592
}
590
593
594
+
.. note::
595
+
Although the conclusion of this rule looks identical to its premise,
596
+
they in fact describe different relations:
597
+
the premise invokes subtyping on defined types,
598
+
while the conclusion defines it on tag types that happen to be expressed as defined types.
591
599
592
600
.. index:: external type, function type, table type, memory type, global type
0 commit comments