Skip to content

Commit

Permalink
[spec] Add missing default for vector types (WebAssembly#1464)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored and rossberg committed Mar 1, 2023
1 parent d616d7f commit cf4fabb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion document/core/exec/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ or *external references* pointing to an uninterpreted form of :ref:`extern addre
.. _default-val:

Each :ref:`value type <syntax-valtype>` has an associated *default value*;
it is the respective value :math:`0` for :ref:`number types <syntax-numtype>` and null for :ref:`reference types <syntax-reftype>`.
it is the respective value :math:`0` for :ref:`number types <syntax-numtype>`, :math:`0` for :ref:`vector types <syntax-vectype>`, and null for :ref:`reference types <syntax-reftype>`.

.. math::
\begin{array}{lcl@{\qquad}l}
\default_t &=& t{.}\CONST~0 & (\iff t = \numtype) \\
\default_t &=& t{.}\CONST~0 & (\iff t = \vectype) \\
\default_t &=& \REFNULL~t & (\iff t = \reftype) \\
\end{array}
Expand Down

0 comments on commit cf4fabb

Please sign in to comment.