Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions document/core/binary/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ Control Instructions
\hex{13}~~y{:}\Btypeidx~~x{:}\Btableidx &\Rightarrow& \RETURNCALLINDIRECT~x~y \\ &&|&
\hex{14}~~x{:}\Btypeidx &\Rightarrow& \CALLREF~x \\ &&|&
\hex{15}~~x{:}\Btypeidx &\Rightarrow& \RETURNCALLREF~x \\ &&|&
\hex{1F}~~\X{bt}{:}\Bblocktype~~c^\ast{:}\Bvec(\Bcatch)~~(\X{in}{:}\Binstr)^\ast~~\hex{0B}
&\Rightarrow& \TRYTABLE~\X{bt}~c^\ast~\X{in}^\ast~\END \\
\hex{1F}~~\X{bt}{:}\Bblocktype~~c^\ast{:}\Bvec(\Bcatch)~~\\&&&~~~~(\X{in}{:}\Binstr)^\ast~~\hex{0B}
&\Rightarrow& \TRYTABLE~\X{bt}~c^\ast~\X{in}^\ast~\END \\ &&|&
\hex{D5}~~l{:}\Blabelidx &\Rightarrow& \BRONNULL~l \\ &&|&
\hex{D6}~~l{:}\Blabelidx &\Rightarrow& \BRONNONNULL~l \\ &&|&
\hex{FB}~~24{:}\Bu32~~(\NULL_1^?,\NULL_2^?){:}\Bcastflags\\&&&~~~~l{:}\Blabelidx~~\X{ht}_1{:}\Bheaptype~~\X{ht}_2{:}\Bheaptype &\Rightarrow& \BRONCAST~l~(\REF~\NULL_1^?~\X{ht}_1)~(\REF~\NULL_2^?~\X{ht}_2) \\ &&|&
Expand Down
19 changes: 10 additions & 9 deletions document/core/text/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Also, for backwards compatibility, the table index to :math:`\text{call\_indirec
\production{plain instruction} &
\text{call\_indirect}~~\Ttypeuse
&\equiv&
\text{call\_indirect}~~0~~\Ttypeuse \\
\text{call\_indirect}~~0~~\Ttypeuse \\ &
\text{return\_call\_indirect}~~\Ttypeuse
&\equiv&
\text{return\_call\_indirect}~~0~~\Ttypeuse \\
Expand Down Expand Up @@ -435,7 +435,7 @@ Lexically, an |Toffset| or |Talign| phrase is considered a single :ref:`keyword
\text{v128.store8\_lane}~~x{:}\Tmemidx~~m{:}\Tmemarg_1~~y{:}\Tu8 &\Rightarrow& \V128.\STORE\K{8\_lane}~x~m~y \\ &&|&
\text{v128.store16\_lane}~~x{:}\Tmemidx~~m{:}\Tmemarg_2~~y{:}\Tu8 &\Rightarrow& \V128.\STORE\K{16\_lane}~x~m~y \\ &&|&
\text{v128.store32\_lane}~~x{:}\Tmemidx~~m{:}\Tmemarg_4~~y{:}\Tu8 &\Rightarrow& \V128.\STORE\K{32\_lane}~x~m~y \\ &&|&
\text{v128.store64\_lane}~~x{:}\Tmemidx~~m{:}\Tmemarg_8~~y{:}\Tu8 &\Rightarrow& \V128.\STORE\K{64\_lane}~x~m~y \\
\text{v128.store64\_lane}~~x{:}\Tmemidx~~m{:}\Tmemarg_8~~y{:}\Tu8 &\Rightarrow& \V128.\STORE\K{64\_lane}~x~m~y \\ &&|&
\text{memory.size}~~x{:}\Tmemidx &\Rightarrow& \MEMORYSIZE~x \\ &&|&
\text{memory.grow}~~x{:}\Tmemidx &\Rightarrow& \MEMORYGROW~x \\ &&|&
\text{memory.fill}~~x{:}\Tmemidx &\Rightarrow& \MEMORYFILL~x \\ &&|&
Expand Down Expand Up @@ -1104,14 +1104,15 @@ Such a folded instruction can appear anywhere a regular instruction can.
&\equiv\quad \text{block}~~\Tlabel~~\Tblocktype~~\Tinstr^\ast~~\text{end} \\ &
\text{(}~\text{loop}~~\Tlabel~~\Tblocktype~~\Tinstr^\ast~\text{)}
&\equiv\quad \text{loop}~~\Tlabel~~\Tblocktype~~\Tinstr^\ast~~\text{end} \\ &
\text{(}~\text{if}~~\Tlabel~~\Tblocktype~~\Tfoldedinstr^\ast
&\hspace{-3ex} \text{(}~\text{then}~~\Tinstr_1^\ast~\text{)}~~(\text{(}~\text{else}~~\Tinstr_2^\ast~\text{)})^?~~\text{)}
\quad\equiv \\ &\qquad
\Tfoldedinstr^\ast~~\text{if}~~\Tlabel
&\hspace{-12ex} \Tblocktype~~\Tinstr_1^\ast~~\text{else}~~(\Tinstr_2^\ast)^?~\text{end} \\ &
\text{(}~\text{if}~~\Tlabel~~\Tblocktype~~\Tfoldedinstr^\ast \\ &
\qquad \text{(}~\text{then}~~\Tinstr_1^\ast~\text{)}~~(\text{(}~\text{else}~~\Tinstr_2^\ast~\text{)})^?~~\text{)}
&\equiv\quad
\Tfoldedinstr^\ast~~\text{if}~~\Tlabel~~\Tblocktype~~\Tinstr_1^\ast~~\\ &
&\qquad\qquad \text{else}~~(\Tinstr_2^\ast)^?~\text{end} \\ &
\text{(}~\text{try\_table}~~\Tlabel~~\Tblocktype~~\Tcatch^\ast~~\Tinstr^\ast~\text{)}
\quad\equiv \\ &\qquad
\text{try\_table}~~\Tlabel~~\Tblocktype~~\Tcatch^\ast~~\Tinstr^\ast~~\text{end} \\
&\equiv\quad
\text{try\_table}~~\Tlabel~~\Tblocktype~~\\ &
&\qquad\qquad \Tcatch^\ast~~\Tinstr^\ast~~\text{end} \\
\end{array}


Expand Down
6 changes: 4 additions & 2 deletions document/core/text/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,11 @@ Furthermore, for backwards compatibility with earlier versions of WebAssembly, i
\production{table use} &
\epsilon &\equiv& \text{(}~\text{table}~~\text{0}~\text{)} \\
\production{element segment} &
\text{(}~\text{elem}~~\Tid^?~~\text{(}~\text{offset}~~\Texpr_I~\text{)}~~\Tvec(\Tfuncidx_I)~\text{)}
\text{(}~\text{elem}~~\Tid^?~~\text{(}~\text{offset}~~\Texpr_I~\text{)}~~\\ &
\qquad \Tvec(\Tfuncidx_I)~\text{)}
&\equiv&
\text{(}~\text{elem}~~\Tid^?~~\text{(}~\text{table}~~\text{0}~\text{)}~~\text{(}~\text{offset}~~\Texpr_I~\text{)}~~\text{func}~~\Tvec(\Tfuncidx_I)~\text{)}
\text{(}~\text{elem}~~\Tid^?~~\text{(}~\text{table}~~\text{0}~\text{)}~~\text{(}~\text{offset}~~\Texpr_I~\text{)}~~\\ &
&&\qquad \text{func}~~\Tvec(\Tfuncidx_I)~\text{)}
\end{array}

As another abbreviation, element segments may also be specified inline with :ref:`table <text-table>` definitions; see the respective section.
Expand Down
Loading