Skip to content

Commit babba57

Browse files
committed
Fix binary encoding of tag types
1 parent 1b99eaa commit babba57

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

document/core/binary/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ It decodes into a vector of :ref:`imports <syntax-import>` that represent the |M
181181
\hex{01}~~\X{tt}{:}\Btabletype &\Rightarrow& \IDTABLE~\X{tt} \\ &&|&
182182
\hex{02}~~\X{mt}{:}\Bmemtype &\Rightarrow& \IDMEM~\X{mt} \\ &&|&
183183
\hex{03}~~\X{gt}{:}\Bglobaltype &\Rightarrow& \IDGLOBAL~\X{gt} \\ &&|&
184-
\hex{04}~~\X{tt}{:}\Btagtype &\Rightarrow& \IDTAG~\X{tt} \\
184+
\hex{04}~~x{:}\Btagtype &\Rightarrow& \IDTAG~x \\
185185
\end{array}
186186
187187

document/core/binary/types.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,17 +321,14 @@ Global Types
321321
Tag Types
322322
~~~~~~~~~
323323

324-
:ref:`Tag types <syntax-tagtype>` are encoded by their function type.
324+
:ref:`Tag types <syntax-tagtype>` are encoded by a :ref:`type index <syntax-typeidx>` denoting a :ref:`function type <syntax-functype>`.
325325

326326
.. math::
327327
\begin{array}{llclll}
328328
\production{tag type} & \Btagtype &::=&
329-
\hex{00}~~ft{:}\Bfunctype &\Rightarrow& ft \\
329+
\hex{00}~~x{:}\Btypeidx &\Rightarrow& x \\
330330
\end{array}
331331
332-
The |Bfunctype| of a tag is used to characterise exceptions.
333-
The :math:`\hex{00}` bit signifies an exception and is currently the only allowed value.
334-
335332
.. note::
336333
In future versions of WebAssembly,
337334
the preceding zero byte may encode additional flags.

document/core/syntax/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ The |MIMPORTS| component of a module defines a set of *imports* that are require
445445
\IDTABLE~\tabletype \\&&|&
446446
\IDMEM~\memtype \\&&|&
447447
\IDGLOBAL~\globaltype \\&&|&
448-
\IDTAG~\tagtype \\
448+
\IDTAG~\typeidx \\
449449
\end{array}
450450
451451
Each import is labeled by a two-level :ref:`name <syntax-name>` space, consisting of a |IMODULE| name and a |INAME| for an entity within that module.

0 commit comments

Comments
 (0)