Skip to content

Commit

Permalink
Merge pull request #403 from WebAssembly/no-PACK
Browse files Browse the repository at this point in the history
Make type setting of i8.pack and i16.pack less jarring
  • Loading branch information
rossberg authored Jul 20, 2023
2 parents 76e0d6b + e14adec commit 2dcdf17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions document/core/exec/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ Conventions
.. math::
\begin{array}{@{}lcl}
\packval_{\valtype}(\val) &=& \val \\
\packval_{\packedtype}(\I32.\CONST~i) &=& \packedtype\K{.PACK}~(\wrap_{32,|\packtype|}(i))
\packval_{\packedtype}(\I32.\CONST~i) &=& \packedtype\K{.pack}~(\wrap_{32,|\packtype|}(i))
\end{array}
* The inverse conversion of a :ref:`field value <syntax-fieldval>` to a regular :ref:`value <syntax-val>` is defined as follows:

.. math::
\begin{array}{@{}lcl}
\unpackval_{\valtype}(\val) &=& \val \\
\unpackval^{\sx}_{\packedtype}(\packedtype\K{.PACK}~i) &=& \I32.\CONST~(\extend^{\sx}_{|\packedtype|,32}(i))
\unpackval^{\sx}_{\packedtype}(\packedtype\K{.pack}~i) &=& \I32.\CONST~(\extend^{\sx}_{|\packedtype|,32}(i))
\end{array}
Expand Down
4 changes: 2 additions & 2 deletions document/core/util/macros.def
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,8 @@
.. |AITYPE| mathdef:: \xref{exec/runtime}{syntax-arrayinst}{\K{type}}
.. |AIFIELDS| mathdef:: \xref{exec/runtime}{syntax-arrayinst}{\K{fields}}

.. |I8PACK| mathdef:: \xref{exec/runtime}{syntax-packval}{\K{I8.PACK}}
.. |I16PACK| mathdef:: \xref{exec/runtime}{syntax-packval}{\K{I16.PACK}}
.. |I8PACK| mathdef:: \xref{exec/runtime}{syntax-packval}{\K{i8.pack}}
.. |I16PACK| mathdef:: \xref{exec/runtime}{syntax-packval}{\K{i16.pack}}


.. Instances, non-terminals
Expand Down

0 comments on commit 2dcdf17

Please sign in to comment.