Skip to content

Commit

Permalink
Merge pull request #435 from WebAssembly/fix.431
Browse files Browse the repository at this point in the history
Fix rectype opcodes
  • Loading branch information
rossberg authored Sep 20, 2023
2 parents 49ebc97 + 36fa37e commit 5ef10c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion document/core/appendix/index-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Category Constructor
:ref:`Number type <syntax-numtype>` |F32| :math:`\hex{7D}` (-3 as |Bs7|)
:ref:`Number type <syntax-numtype>` |F64| :math:`\hex{7C}` (-4 as |Bs7|)
:ref:`Vector type <syntax-vectype>` |V128| :math:`\hex{7B}` (-5 as |Bs7|)
(reserved) :math:`\hex{7a}` .. :math:`\hex{79}`
(reserved) :math:`\hex{7A}` .. :math:`\hex{79}`
:ref:`Packed type <syntax-packedtype>` |I8| :math:`\hex{78}` (-8 as |Bs7|)
:ref:`Packed type <syntax-packedtype>` |I16| :math:`\hex{77}` (-9 as |Bs7|)
(reserved) :math:`\hex{78}` .. :math:`\hex{74}`
Expand Down
6 changes: 3 additions & 3 deletions document/core/binary/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,20 @@ Composite Types
Recursive Types
~~~~~~~~~~~~~~~

:ref:`Recursive types <syntax-rectype>` are encoded by the byte :math:`\hex{31}` followed by a :ref:`vector <binary-vec>` of :ref:`sub types <syntax-subtype>`.
:ref:`Recursive types <syntax-rectype>` are encoded by the byte :math:`\hex{4E}` followed by a :ref:`vector <binary-vec>` of :ref:`sub types <syntax-subtype>`.
Additional shorthands are recognized for unary recursions and sub types without super types.

.. math::
\begin{array}{llclll@{\qquad\qquad}l}
\production{recursive type} & \Brectype &::=&
\hex{4F}~~\X{st}^\ast{:\,}\Bvec(\Bsubtype)
\hex{4E}~~\X{st}^\ast{:\,}\Bvec(\Bsubtype)
&\Rightarrow& \TREC~\X{st}^\ast \\ &&|&
\X{st}{:}\Bsubtype
&\Rightarrow& \TREC~\X{st} \\
\production{sub type} & \Bsubtype &::=&
\hex{50}~~x^\ast{:\,}\Bvec(\Btypeidx)~~\X{ct}{:}\Bcomptype
&\Rightarrow& \TSUB~x^\ast~\X{ct} \\ &&|&
\hex{4E}~~x^\ast{:\,}\Bvec(\Btypeidx)~~\X{ct}{:}\Bcomptype
\hex{4F}~~x^\ast{:\,}\Bvec(\Btypeidx)~~\X{ct}{:}\Bcomptype
&\Rightarrow& \TSUB~\TFINAL~x^\ast~\X{ct} \\ &&|&
\X{ct}{:}\Bcomptype
&\Rightarrow& \TSUB~\TFINAL~\epsilon~\X{ct} \\
Expand Down

0 comments on commit 5ef10c1

Please sign in to comment.