diff --git a/core/.buildinfo b/core/.buildinfo index 8376729f8c..ff7fac559a 100644 --- a/core/.buildinfo +++ b/core/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 35ae415874d053daf9db09403a80c2b8 +config: a9b2a6c375758cb0fb64ad9d46cf0897 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/core/_download/WebAssembly.pdf b/core/_download/WebAssembly.pdf index f476961998..640394ac78 100644 Binary files a/core/_download/WebAssembly.pdf and b/core/_download/WebAssembly.pdf differ diff --git a/core/_static/documentation_options.js b/core/_static/documentation_options.js index 228b6713cd..a12f10c5dc 100644 --- a/core/_static/documentation_options.js +++ b/core/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '3.0 (Draft 2024-05-03)', + VERSION: '3.0 (Draft 2024-05-17)', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/core/appendix/algorithm.html b/core/appendix/algorithm.html index 2a171b2f81..0ab15e3fa0 100644 --- a/core/appendix/algorithm.html +++ b/core/appendix/algorithm.html @@ -6,7 +6,7 @@ -
New control instruction: \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_ref}}\)
Refined typing of reference instruction \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.func}}\) with more precise result type
Refined typing of local instructions and instruction sequences to track the initialization status of locals with non-defaultable type
Refined typing of local instructions and instruction sequences to track the initialization status of locals with non-defaultable type
Extended table definitions with optional initializer expression
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{promote}}\mathsf{\_low\_f32x4}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{promote}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_f32x4}\)
\(\def\mathdef819#1{\mathtt{0x#1}}\mathdef819{FD}~~\def\mathdef820#1{\mathtt{0x#1}}\mathdef820{5F}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{add}}\mathsf{\_sat\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{add\_sat}}\mathsf{\_s}\)
\(\def\mathdef851#1{\mathtt{0x#1}}\mathdef851{FD}~~\def\mathdef852#1{\mathtt{0x#1}}\mathdef852{6F}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{add}}\mathsf{\_sat\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{add\_sat}}\mathsf{\_u}\)
\(\def\mathdef853#1{\mathtt{0x#1}}\mathdef853{FD}~~\def\mathdef854#1{\mathtt{0x#1}}\mathdef854{70}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{sub}}\mathsf{\_sat\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{sub\_sat}}\mathsf{\_s}\)
\(\def\mathdef857#1{\mathtt{0x#1}}\mathdef857{FD}~~\def\mathdef858#1{\mathtt{0x#1}}\mathdef858{72}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{sub}}\mathsf{\_sat\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{sub\_sat}}\mathsf{\_u}\)
\(\def\mathdef859#1{\mathtt{0x#1}}\mathdef859{FD}~~\def\mathdef860#1{\mathtt{0x#1}}\mathdef860{73}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{avgr}}\mathsf{\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i8x16}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{avgr\_u}}\)
\(\def\mathdef875#1{\mathtt{0x#1}}\mathdef875{FD}~~\def\mathdef876#1{\mathtt{0x#1}}\mathdef876{7B}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{q15mulr\_sat}}\mathsf{\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{q15mulr\_sat\_s}}\)
\(\def\mathdef891#1{\mathtt{0x#1}}\mathdef891{FD}~~\def\mathdef892#1{\mathtt{0x#1}}\mathdef892{82}~~\def\mathdef893#1{\mathtt{0x#1}}\mathdef893{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i8x16\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i8x16\_s}\)
\(\def\mathdef906#1{\mathtt{0x#1}}\mathdef906{FD}~~\def\mathdef907#1{\mathtt{0x#1}}\mathdef907{87}~~\def\mathdef908#1{\mathtt{0x#1}}\mathdef908{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i8x16\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i8x16\_s}\)
\(\def\mathdef909#1{\mathtt{0x#1}}\mathdef909{FD}~~\def\mathdef910#1{\mathtt{0x#1}}\mathdef910{88}~~\def\mathdef911#1{\mathtt{0x#1}}\mathdef911{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i8x16\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i8x16\_u}\)
\(\def\mathdef912#1{\mathtt{0x#1}}\mathdef912{FD}~~\def\mathdef913#1{\mathtt{0x#1}}\mathdef913{89}~~\def\mathdef914#1{\mathtt{0x#1}}\mathdef914{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i8x16\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i8x16\_u}\)
\(\def\mathdef915#1{\mathtt{0x#1}}\mathdef915{FD}~~\def\mathdef916#1{\mathtt{0x#1}}\mathdef916{8A}~~\def\mathdef917#1{\mathtt{0x#1}}\mathdef917{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{avgr}}\mathsf{\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{avgr\_u}}\)
\(\def\mathdef966#1{\mathtt{0x#1}}\mathdef966{FD}~~\def\mathdef967#1{\mathtt{0x#1}}\mathdef967{9B}~~\def\mathdef968#1{\mathtt{0x#1}}\mathdef968{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i8x16\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i8x16\_s}\)
\(\def\mathdef969#1{\mathtt{0x#1}}\mathdef969{FD}~~\def\mathdef970#1{\mathtt{0x#1}}\mathdef970{9C}~~\def\mathdef971#1{\mathtt{0x#1}}\mathdef971{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i8x16\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i8x16\_s}\)
\(\def\mathdef972#1{\mathtt{0x#1}}\mathdef972{FD}~~\def\mathdef973#1{\mathtt{0x#1}}\mathdef973{9D}~~\def\mathdef974#1{\mathtt{0x#1}}\mathdef974{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i8x16\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i8x16\_u}\)
\(\def\mathdef975#1{\mathtt{0x#1}}\mathdef975{FD}~~\def\mathdef976#1{\mathtt{0x#1}}\mathdef976{9E}~~\def\mathdef977#1{\mathtt{0x#1}}\mathdef977{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i8x16\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i16x8}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i8x16\_u}\)
\(\def\mathdef978#1{\mathtt{0x#1}}\mathdef978{FD}~~\def\mathdef979#1{\mathtt{0x#1}}\mathdef979{9F}~~\def\mathdef980#1{\mathtt{0x#1}}\mathdef980{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i16x8\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i16x8\_s}\)
\(\def\mathdef1002#1{\mathtt{0x#1}}\mathdef1002{FD}~~\def\mathdef1003#1{\mathtt{0x#1}}\mathdef1003{A7}~~\def\mathdef1004#1{\mathtt{0x#1}}\mathdef1004{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i16x8\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i16x8\_s}\)
\(\def\mathdef1005#1{\mathtt{0x#1}}\mathdef1005{FD}~~\def\mathdef1006#1{\mathtt{0x#1}}\mathdef1006{A8}~~\def\mathdef1007#1{\mathtt{0x#1}}\mathdef1007{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i16x8\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i16x8\_u}\)
\(\def\mathdef1008#1{\mathtt{0x#1}}\mathdef1008{FD}~~\def\mathdef1009#1{\mathtt{0x#1}}\mathdef1009{A9}~~\def\mathdef1010#1{\mathtt{0x#1}}\mathdef1010{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i16x8\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i16x8\_u}\)
\(\def\mathdef1011#1{\mathtt{0x#1}}\mathdef1011{FD}~~\def\mathdef1012#1{\mathtt{0x#1}}\mathdef1012{AA}~~\def\mathdef1013#1{\mathtt{0x#1}}\mathdef1013{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i16x8\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i16x8\_s}\)
\(\def\mathdef1062#1{\mathtt{0x#1}}\mathdef1062{FD}~~\def\mathdef1063#1{\mathtt{0x#1}}\mathdef1063{BC}~~\def\mathdef1064#1{\mathtt{0x#1}}\mathdef1064{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i16x8\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i16x8\_s}\)
\(\def\mathdef1065#1{\mathtt{0x#1}}\mathdef1065{FD}~~\def\mathdef1066#1{\mathtt{0x#1}}\mathdef1066{BD}~~\def\mathdef1067#1{\mathtt{0x#1}}\mathdef1067{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i16x8\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i16x8\_u}\)
\(\def\mathdef1068#1{\mathtt{0x#1}}\mathdef1068{FD}~~\def\mathdef1069#1{\mathtt{0x#1}}\mathdef1069{BE}~~\def\mathdef1070#1{\mathtt{0x#1}}\mathdef1070{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i16x8\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i16x8\_u}\)
\(\def\mathdef1071#1{\mathtt{0x#1}}\mathdef1071{FD}~~\def\mathdef1072#1{\mathtt{0x#1}}\mathdef1072{BF}~~\def\mathdef1073#1{\mathtt{0x#1}}\mathdef1073{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_s}\)
\(\def\mathdef1095#1{\mathtt{0x#1}}\mathdef1095{FD}~~\def\mathdef1096#1{\mathtt{0x#1}}\mathdef1096{C7}~~\def\mathdef1097#1{\mathtt{0x#1}}\mathdef1097{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i32x4\_s}\)
\(\def\mathdef1098#1{\mathtt{0x#1}}\mathdef1098{FD}~~\def\mathdef1099#1{\mathtt{0x#1}}\mathdef1099{C8}~~\def\mathdef1100#1{\mathtt{0x#1}}\mathdef1100{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_low\_i32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_u}\)
\(\def\mathdef1101#1{\mathtt{0x#1}}\mathdef1101{FD}~~\def\mathdef1102#1{\mathtt{0x#1}}\mathdef1102{C9}~~\def\mathdef1103#1{\mathtt{0x#1}}\mathdef1103{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_high\_i32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extend}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i32x4\_u}\)
\(\def\mathdef1104#1{\mathtt{0x#1}}\mathdef1104{FD}~~\def\mathdef1105#1{\mathtt{0x#1}}\mathdef1105{CA}~~\def\mathdef1106#1{\mathtt{0x#1}}\mathdef1106{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_s}\)
\(\def\mathdef1158#1{\mathtt{0x#1}}\mathdef1158{FD}~~\def\mathdef1159#1{\mathtt{0x#1}}\mathdef1159{DC}~~\def\mathdef1160#1{\mathtt{0x#1}}\mathdef1160{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i32x4\_s}\)
\(\def\mathdef1161#1{\mathtt{0x#1}}\mathdef1161{FD}~~\def\mathdef1162#1{\mathtt{0x#1}}\mathdef1162{DD}~~\def\mathdef1163#1{\mathtt{0x#1}}\mathdef1163{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_low\_i32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_u}\)
\(\def\mathdef1164#1{\mathtt{0x#1}}\mathdef1164{FD}~~\def\mathdef1165#1{\mathtt{0x#1}}\mathdef1165{DE}~~\def\mathdef1166#1{\mathtt{0x#1}}\mathdef1166{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_high\_i32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extmul}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{high}}\mathsf{\_i32x4\_u}\)
\(\def\mathdef1167#1{\mathtt{0x#1}}\mathdef1167{FD}~~\def\mathdef1168#1{\mathtt{0x#1}}\mathdef1168{DF}~~\def\mathdef1169#1{\mathtt{0x#1}}\mathdef1169{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}~\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_f32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc\_sat}}\mathsf{\_f32x4\_s}\)
\(\def\mathdef1239#1{\mathtt{0x#1}}\mathdef1239{FD}~~\def\mathdef1240#1{\mathtt{0x#1}}\mathdef1240{F8}~~\def\mathdef1241#1{\mathtt{0x#1}}\mathdef1241{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_f32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc\_sat}}\mathsf{\_f32x4\_u}\)
\(\def\mathdef1242#1{\mathtt{0x#1}}\mathdef1242{FD}~~\def\mathdef1243#1{\mathtt{0x#1}}\mathdef1243{F9}~~\def\mathdef1244#1{\mathtt{0x#1}}\mathdef1244{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc}}\mathsf{\_sat\_f64x2\_s\_zero}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc\_sat}}\mathsf{\_f64x2\_s\_zero}\)
\(\def\mathdef1251#1{\mathtt{0x#1}}\mathdef1251{FD}~~\def\mathdef1252#1{\mathtt{0x#1}}\mathdef1252{FC}~~\def\mathdef1253#1{\mathtt{0x#1}}\mathdef1253{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc}}\mathsf{\_sat\_f64x2\_u\_zero}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{i32x4}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{trunc\_sat}}\mathsf{\_f64x2\_u\_zero}\)
\(\def\mathdef1254#1{\mathtt{0x#1}}\mathdef1254{FD}~~\def\mathdef1255#1{\mathtt{0x#1}}\mathdef1255{FD}~~\def\mathdef1256#1{\mathtt{0x#1}}\mathdef1256{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{convert}}\mathsf{\_low\_i32x4\_s}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{convert}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_s}\)
\(\def\mathdef1257#1{\mathtt{0x#1}}\mathdef1257{FD}~~\def\mathdef1258#1{\mathtt{0x#1}}\mathdef1258{FE}~~\def\mathdef1259#1{\mathtt{0x#1}}\mathdef1259{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{convert}}\mathsf{\_low\_i32x4\_u}\)
\(\href{../syntax/instructions.html#syntax-shape}{\mathsf{f64x2}}.\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{convert}}\mathsf{\_}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{low}}\mathsf{\_i32x4\_u}\)
\(\def\mathdef1260#1{\mathtt{0x#1}}\mathdef1260{FD}~~\def\mathdef1261#1{\mathtt{0x#1}}\mathdef1261{FF}~~\def\mathdef1262#1{\mathtt{0x#1}}\mathdef1262{01}\)
\([\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}]\)
\(C \href{../valid/types.html#valid-numtype}{\vdash} \href{../syntax/types.html#syntax-numtype}{\mathit{numtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-numtype}{\vdash} \href{../syntax/types.html#syntax-numtype}{\mathit{numtype}} : \href{../valid/types.html#valid-numtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-vectype}{\vdash} \href{../syntax/types.html#syntax-vectype}{\mathit{vectype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-vectype}{\vdash} \href{../syntax/types.html#syntax-vectype}{\mathit{vectype}} : \href{../valid/types.html#valid-vectype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-heaptype}{\vdash} \href{../syntax/types.html#syntax-heaptype}{\mathit{heaptype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-heaptype}{\vdash} \href{../syntax/types.html#syntax-heaptype}{\mathit{heaptype}} : \href{../valid/types.html#valid-heaptype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-reftype}{\vdash} \href{../syntax/types.html#syntax-reftype}{\mathit{reftype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-reftype}{\vdash} \href{../syntax/types.html#syntax-reftype}{\mathit{reftype}} : \href{../valid/types.html#valid-reftype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-valtype}{\vdash} \href{../syntax/types.html#syntax-valtype}{\mathit{valtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-valtype}{\vdash} \href{../syntax/types.html#syntax-valtype}{\mathit{valtype}} : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-packtype}{\vdash} \href{../syntax/types.html#syntax-packtype}{\mathit{packtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-packtype}{\vdash} \href{../syntax/types.html#syntax-packtype}{\mathit{packtype}} : \href{../valid/types.html#valid-packtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-storagetype}{\vdash} \href{../syntax/types.html#syntax-storagetype}{\mathit{storagetype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-storagetype}{\vdash} \href{../syntax/types.html#syntax-storagetype}{\mathit{storagetype}} : \href{../valid/types.html#valid-storagetype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-fieldtype}{\vdash} \href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-fieldtype}{\vdash} \href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}} : \href{../valid/types.html#valid-fieldtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-resulttype}{\vdash} \href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-resulttype}{\vdash} \href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}} : \href{../valid/types.html#valid-resulttype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-instrtype}{\vdash} \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-instrtype}{\vdash} \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}} : \href{../valid/types.html#valid-instrtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-functype}{\vdash} \href{../syntax/types.html#syntax-functype}{\mathit{functype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-functype}{\vdash} \href{../syntax/types.html#syntax-functype}{\mathit{functype}} : \href{../valid/types.html#valid-functype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-structtype}{\vdash} \href{../syntax/types.html#syntax-structtype}{\mathit{structtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-structtype}{\vdash} \href{../syntax/types.html#syntax-structtype}{\mathit{structtype}} : \href{../valid/types.html#valid-structtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-arraytype}{\vdash} \href{../syntax/types.html#syntax-arraytype}{\mathit{arraytype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-arraytype}{\vdash} \href{../syntax/types.html#syntax-arraytype}{\mathit{arraytype}} : \href{../valid/types.html#valid-arraytype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-comptype}{\vdash} \href{../syntax/types.html#syntax-comptype}{\mathit{comptype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-comptype}{\vdash} \href{../syntax/types.html#syntax-comptype}{\mathit{comptype}} : \href{../valid/types.html#valid-comptype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-subtype}{\vdash} \href{../syntax/types.html#syntax-subtype}{\mathit{subtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-subtype}{\vdash} \href{../syntax/types.html#syntax-subtype}{\mathit{subtype}} : \href{../valid/types.html#valid-subtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-rectype}{\vdash} \href{../syntax/types.html#syntax-rectype}{\mathit{rectype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-rectype}{\vdash} \href{../syntax/types.html#syntax-rectype}{\mathit{rectype}} : \href{../valid/types.html#valid-rectype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-deftype}{\vdash} \href{../valid/conventions.html#syntax-deftype}{\mathit{deftype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-deftype}{\vdash} \href{../valid/conventions.html#syntax-deftype}{\mathit{deftype}} : \href{../valid/types.html#valid-deftype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-blocktype}{\vdash} \href{../syntax/instructions.html#syntax-blocktype}{\mathit{blocktype}} : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}\)
\(C \href{../valid/types.html#valid-tabletype}{\vdash} \href{../syntax/types.html#syntax-tabletype}{\mathit{tabletype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-tabletype}{\vdash} \href{../syntax/types.html#syntax-tabletype}{\mathit{tabletype}} : \href{../valid/types.html#valid-tabletype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-memtype}{\vdash} \href{../syntax/types.html#syntax-memtype}{\mathit{memtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-memtype}{\vdash} \href{../syntax/types.html#syntax-memtype}{\mathit{memtype}} : \href{../valid/types.html#valid-memtype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-globaltype}{\vdash} \href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-globaltype}{\vdash} \href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}} : \href{../valid/types.html#valid-globaltype}{\mathsf{ok}}\)
\(C \href{../valid/types.html#valid-externtype}{\vdash} \href{../syntax/types.html#syntax-externtype}{\mathit{externtype}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/types.html#valid-externtype}{\vdash} \href{../syntax/types.html#syntax-externtype}{\mathit{externtype}} : \href{../valid/types.html#valid-externtype}{\mathsf{ok}}\)
\(C \href{../valid/modules.html#valid-types}{\vdash} \href{../syntax/types.html#syntax-rectype}{\mathit{type}}^\ast \mathrel{\mbox{ok}}\)
\(C \href{../valid/modules.html#valid-types}{\vdash} \href{../syntax/types.html#syntax-rectype}{\mathit{type}}^\ast : \href{../valid/modules.html#valid-types}{\mathsf{ok}}\)
\(S;C \href{../valid/instructions.html#valid-instr}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}} : \href{../syntax/types.html#syntax-functype}{\mathit{functype}}\)
\(S;C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../syntax/types.html#syntax-functype}{\mathit{functype}}\)
\(S;C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../syntax/types.html#syntax-functype}{\mathit{functype}}\)
\(C \href{../valid/instructions.html#valid-expr}{\vdash} \href{../syntax/instructions.html#syntax-expr}{\mathit{expr}} : \href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}}\)
\(C \href{../valid/modules.html#valid-data}{\vdash} \href{../syntax/modules.html#syntax-data}{\mathit{data}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/modules.html#valid-data}{\vdash} \href{../syntax/modules.html#syntax-data}{\mathit{data}} : \href{../valid/modules.html#valid-data}{\mathsf{ok}}\)
\(C \href{../valid/modules.html#valid-datamode}{\vdash} \href{../syntax/modules.html#syntax-datamode}{\mathit{datamode}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/modules.html#valid-datamode}{\vdash} \href{../syntax/modules.html#syntax-datamode}{\mathit{datamode}} : \href{../valid/modules.html#valid-datamode}{\mathsf{ok}}\)
\(C \href{../valid/modules.html#valid-start}{\vdash} \href{../syntax/modules.html#syntax-start}{\mathit{start}} \mathrel{\mbox{ok}}\)
\(C \href{../valid/modules.html#valid-start}{\vdash} \href{../syntax/modules.html#syntax-start}{\mathit{start}} : \href{../valid/modules.html#valid-start}{\mathsf{ok}}\)
\(C \href{../valid/modules.html#valid-export}{\vdash} \href{../syntax/modules.html#syntax-export}{\mathit{export}} : \href{../syntax/types.html#syntax-externtype}{\mathit{externtype}}\)
\(S \href{../appendix/properties.html#valid-datainst}{\vdash} \href{../exec/runtime.html#syntax-datainst}{\mathit{datainst}} \mathrel{\mbox{ok}}\)
\(S \href{../appendix/properties.html#valid-datainst}{\vdash} \href{../exec/runtime.html#syntax-datainst}{\mathit{datainst}} : \href{../appendix/properties.html#valid-datainst}{\mathsf{ok}}\)
\(S \href{../appendix/properties.html#valid-structinst}{\vdash} \href{../exec/runtime.html#syntax-structinst}{\mathit{structinst}} \mathrel{\mbox{ok}}\)
\(S \href{../appendix/properties.html#valid-structinst}{\vdash} \href{../exec/runtime.html#syntax-structinst}{\mathit{structinst}} : \href{../appendix/properties.html#valid-structinst}{\mathsf{ok}}\)
\(S \href{../appendix/properties.html#valid-arrayinst}{\vdash} \href{../exec/runtime.html#syntax-arrayinst}{\mathit{arrayinst}} \mathrel{\mbox{ok}}\)
\(S \href{../appendix/properties.html#valid-arrayinst}{\vdash} \href{../exec/runtime.html#syntax-arrayinst}{\mathit{arrayinst}} : \href{../appendix/properties.html#valid-arrayinst}{\mathsf{ok}}\)
\(S \href{../appendix/properties.html#valid-exportinst}{\vdash} \href{../exec/runtime.html#syntax-exportinst}{\mathit{exportinst}} \mathrel{\mbox{ok}}\)
\(S \href{../appendix/properties.html#valid-exportinst}{\vdash} \href{../exec/runtime.html#syntax-exportinst}{\mathit{exportinst}} : \href{../appendix/properties.html#valid-exportinst}{\mathsf{ok}}\)
\(S \href{../appendix/properties.html#valid-moduleinst}{\vdash} \href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}} : C\)
\(\href{../appendix/properties.html#valid-store}{\vdash} \href{../exec/runtime.html#syntax-store}{\mathit{store}} \mathrel{\mbox{ok}}\)
\(\href{../appendix/properties.html#valid-store}{\vdash} \href{../exec/runtime.html#syntax-store}{\mathit{store}} : \href{../appendix/properties.html#valid-store}{\mathsf{ok}}\)
\(\href{../appendix/properties.html#valid-config}{\vdash} \href{../exec/runtime.html#syntax-config}{\mathit{config}} \mathrel{\mbox{ok}}\)
\(\href{../appendix/properties.html#valid-config}{\vdash} \href{../exec/runtime.html#syntax-config}{\mathit{config}} : [t^\ast]\)
\(S;\href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}}^? \href{../appendix/properties.html#valid-thread}{\vdash} \href{../exec/runtime.html#syntax-thread}{\mathit{thread}} : \href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}}\)
\(C \href{../valid/instructions.html#valid-constant}{\vdash} \href{../syntax/instructions.html#syntax-expr}{\mathit{expr}} \href{../valid/instructions.html#valid-constant}{\mathrel{\mbox{const}}}\)
\(C \href{../valid/instructions.html#valid-const}{\vdash} \href{../syntax/instructions.html#syntax-expr}{\mathit{expr}} \href{../valid/instructions.html#valid-const}{\mathsf{const}}\)
\(C \href{../valid/instructions.html#valid-constant}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}} \href{../valid/instructions.html#valid-constant}{\mathrel{\mbox{const}}}\)
\(C \href{../valid/instructions.html#valid-const}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}} \href{../valid/instructions.html#valid-const}{\mathsf{const}}\)
Note
@@ -223,12 +223,12 @@where \(\href{../exec/runtime.html#syntax-val}{\mathit{val}}_1 \gg^+_S \href{../exec/runtime.html#syntax-val}{\mathit{val}}_2\) denotes the transitive closure of the following reachability relation on values:
For each memory address \(\href{../exec/runtime.html#syntax-memaddr}{\mathit{memaddr}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{memaddrs}}\), the external value \(\href{../exec/runtime.html#syntax-externval}{\mathsf{mem}}~\href{../exec/runtime.html#syntax-memaddr}{\mathit{memaddr}}_i\) must be valid with some external type \(\href{../syntax/types.html#syntax-externtype}{\mathsf{mem}}~\href{../syntax/types.html#syntax-memtype}{\mathit{memtype}}_i\).
For each global address \(\href{../exec/runtime.html#syntax-globaladdr}{\mathit{globaladdr}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{globaladdrs}}\), the external value \(\href{../exec/runtime.html#syntax-externval}{\mathsf{global}}~\href{../exec/runtime.html#syntax-globaladdr}{\mathit{globaladdr}}_i\) must be valid with some external type \(\href{../syntax/types.html#syntax-externtype}{\mathsf{global}}~\href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}}_i\).
For each element address \(\href{../exec/runtime.html#syntax-elemaddr}{\mathit{elemaddr}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{elemaddrs}}\), the element instance \(S.\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}[\href{../exec/runtime.html#syntax-elemaddr}{\mathit{elemaddr}}_i]\) must be valid with some reference type \(\href{../syntax/types.html#syntax-reftype}{\mathit{reftype}}_i\).
For each data address \(\href{../exec/runtime.html#syntax-dataaddr}{\mathit{dataaddr}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{dataaddrs}}\), the data instance \(S.\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}[\href{../exec/runtime.html#syntax-dataaddr}{\mathit{dataaddr}}_i]\) must be valid.
For each data address \(\href{../exec/runtime.html#syntax-dataaddr}{\mathit{dataaddr}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{dataaddrs}}\), the data instance \(S.\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}[\href{../exec/runtime.html#syntax-dataaddr}{\mathit{dataaddr}}_i]\) must be valid with \(\mathit{ok}_i\).
Each export instance \(\href{../exec/runtime.html#syntax-exportinst}{\mathit{exportinst}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{exports}}\) must be valid.
For each export instance \(\href{../exec/runtime.html#syntax-exportinst}{\mathit{exportinst}}_i\) in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{exports}}\), the name \(\href{../exec/runtime.html#syntax-exportinst}{\mathit{exportinst}}_i.\href{../exec/runtime.html#syntax-exportinst}{\mathsf{name}}\) must be different from any other name occurring in \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{exports}}\).
Let \(\href{../valid/conventions.html#syntax-deftype}{\mathit{deftype}}^\ast\) be the concatenation of all \(\href{../valid/conventions.html#syntax-deftype}{\mathit{deftype}}_i\) in order.
Let \(\href{../syntax/types.html#syntax-memtype}{\mathit{memtype}}^\ast\) be the concatenation of all \(\href{../syntax/types.html#syntax-memtype}{\mathit{memtype}}_i\) in order.
Let \(\href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}}^\ast\) be the concatenation of all \(\href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}}_i\) in order.
Let \(\href{../syntax/types.html#syntax-reftype}{\mathit{reftype}}^\ast\) be the concatenation of all \(\href{../syntax/types.html#syntax-reftype}{\mathit{reftype}}_i\) in order.
Let \(\mathit{ok}^\ast\) be the concatenation of all \(\mathit{ok}_i\) in order.
Let \(m\) be the length of \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{funcaddrs}}\).
Let \(n\) be the length of \(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{dataaddrs}}\).
Let \(x^\ast\) be the sequence of function indices from \(0\) to \(m-1\).
Then the module instance is valid with context -\(\{\href{../valid/conventions.html#context}{\mathsf{types}}~\href{../valid/conventions.html#syntax-deftype}{\mathit{deftype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{funcs}}~\href{../syntax/types.html#syntax-functype}{\mathit{functype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{tables}}~\href{../syntax/types.html#syntax-tabletype}{\mathit{tabletype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{mems}}~\href{../syntax/types.html#syntax-memtype}{\mathit{memtype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{globals}}~\href{../syntax/types.html#syntax-globaltype}{\mathit{globaltype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{elems}}~\href{../syntax/types.html#syntax-reftype}{\mathit{reftype}}^\ast,\) \(\href{../valid/conventions.html#context}{\mathsf{datas}}~{\mathrel{\mbox{ok}}}^n,\) \(\href{../valid/conventions.html#context}{\mathsf{refs}}~x^\ast\}\).
The frame \(F\) must be valid with a context \(C\).
Let \(C'\) be the same context as \(C\), but with \(\href{../valid/conventions.html#context}{\mathsf{return}}\) set to \(\href{../syntax/types.html#syntax-resulttype}{\mathit{resulttype}}^?\).
Under context \(C'\), -the instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) must be valid with some type \([] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [t^\ast]\).
Then the thread is valid with the result type \([t^\ast]\).
The instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_0^\ast\) must be valid with some type \([t_1^n] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^*]\).
The instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_0^\ast\) must be valid with some type \([t_1^n] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^*]\).
Let \(C'\) be the same context as \(C\), but with the result type \([t_1^n]\) prepended to the \(\href{../valid/conventions.html#context}{\mathsf{labels}}\) list.
Under context \(C'\), -the instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) must be valid with type \([] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{{x'}^\ast} [t_2^*]\).
Then the compound instruction is valid with type \([] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}} [t_2^*]\).
Theorem (Principal Types). -If an instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid with some closed instruction type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}\)), -then it is also valid with a possibly open instruction type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}\)), -such that for every closed type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\) with which \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid (i.e., for all \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\)), +If an instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid with some closed instruction type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}\)), +then it is also valid with a possibly open instruction type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}\)), +such that for every closed type \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\) with which \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid (i.e., for all \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\)), there exists a substitution \(\sigma\), such that \(\sigma(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min})\) is a subtype of \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\) (i.e., \(C \href{../valid/matching.html#match-instrtype}{\vdash} \sigma(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}) \href{../valid/matching.html#match-instrtype}{\leq} \href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}'\)). Furthermore, \(\href{../valid/conventions.html#syntax-instrtype}{\mathit{instrtype}}_{\min}\) is unique up to the choice of type variables.
Theorem (Closed Principal Forward Types). -If closed input type \([t_1^\ast]\) is given and the instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid with instruction type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\)), -then it is also valid with instruction type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [\alpha_{\href{../syntax/types.html#syntax-valtype}{\mathit{valtype}}^\ast}~t^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [\alpha_{\href{../syntax/types.html#syntax-valtype}{\mathit{valtype}}^\ast}~t^\ast]\)), +If closed input type \([t_1^\ast]\) is given and the instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid with instruction type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\)), +then it is also valid with instruction type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [\alpha_{\href{../syntax/types.html#syntax-valtype}{\mathit{valtype}}^\ast}~t^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [\alpha_{\href{../syntax/types.html#syntax-valtype}{\mathit{valtype}}^\ast}~t^\ast]\)), where all \(t^\ast\) are closed, -such that for every closed result type \([{t'_2}^\ast]\) with which \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid (i.e., for all \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [{t'_2}^\ast]\)), +such that for every closed result type \([{t'_2}^\ast]\) with which \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) is valid (i.e., for all \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [{t'_2}^\ast]\)), there exists a substitution \(\sigma\), such that \([{t'_2}^\ast] = [\sigma(\alpha_{\href{../syntax/types.html#syntax-valtype}{\mathit{valtype}}^\ast})~t^\ast]\).
@@ -1149,11 +1149,11 @@Theorem (Greatest Lower Bounds for Value Types). For any two value types \(t_1\) and \(t_2\) that are valid -(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t_1 \mathrel{\mbox{ok}}\) and \(C \href{../valid/types.html#valid-valtype}{\vdash} t_2 \mathrel{\mbox{ok}}\)), +(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t_1 : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/types.html#valid-valtype}{\vdash} t_2 : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\)), there exists a valid value type \(t\) that is a subtype of both \(t_1\) and \(t_2\) -(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t \mathrel{\mbox{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t \href{../valid/matching.html#match-valtype}{\leq} t_1\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t \href{../valid/matching.html#match-valtype}{\leq} t_2\)), +(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t \href{../valid/matching.html#match-valtype}{\leq} t_1\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t \href{../valid/matching.html#match-valtype}{\leq} t_2\)), such that every valid value type \(t'\) that also is a subtype of both \(t_1\) and \(t_2\) -(i.e., for all \(C \href{../valid/types.html#valid-valtype}{\vdash} t' \mathrel{\mbox{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t' \href{../valid/matching.html#match-valtype}{\leq} t_1\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t' \href{../valid/matching.html#match-valtype}{\leq} t_2\)), +(i.e., for all \(C \href{../valid/types.html#valid-valtype}{\vdash} t' : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t' \href{../valid/matching.html#match-valtype}{\leq} t_1\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t' \href{../valid/matching.html#match-valtype}{\leq} t_2\)), is a subtype of \(t\) (i.e., \(C \href{../valid/matching.html#match-valtype}{\vdash} t' \href{../valid/matching.html#match-valtype}{\leq} t\)).
Theorem (Conditional Least Upper Bounds for Value Types). Any two value types \(t_1\) and \(t_2\) that are valid -(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t_1 \mathrel{\mbox{ok}}\) and \(C \href{../valid/types.html#valid-valtype}{\vdash} t_2 \mathrel{\mbox{ok}}\)) +(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t_1 : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/types.html#valid-valtype}{\vdash} t_2 : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\)) either have no common supertype, or there exists a valid value type \(t\) that is a supertype of both \(t_1\) and \(t_2\) -(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t \mathrel{\mbox{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_1 \href{../valid/matching.html#match-valtype}{\leq} t\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_2 \href{../valid/matching.html#match-valtype}{\leq} t\)), +(i.e., \(C \href{../valid/types.html#valid-valtype}{\vdash} t : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_1 \href{../valid/matching.html#match-valtype}{\leq} t\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_2 \href{../valid/matching.html#match-valtype}{\leq} t\)), such that every valid value type \(t'\) that also is a supertype of both \(t_1\) and \(t_2\) -(i.e., for all \(C \href{../valid/types.html#valid-valtype}{\vdash} t' \mathrel{\mbox{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_1 \href{../valid/matching.html#match-valtype}{\leq} t'\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_2 \href{../valid/matching.html#match-valtype}{\leq} t'\)), +(i.e., for all \(C \href{../valid/types.html#valid-valtype}{\vdash} t' : \href{../valid/types.html#valid-valtype}{\mathsf{ok}}\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_1 \href{../valid/matching.html#match-valtype}{\leq} t'\) and \(C \href{../valid/matching.html#match-valtype}{\vdash} t_2 \href{../valid/matching.html#match-valtype}{\leq} t'\)), is a supertype of \(t\) (i.e., \(C \href{../valid/matching.html#match-valtype}{\vdash} t \href{../valid/matching.html#match-valtype}{\leq} t'\)).
Valid instruction sequences can be freely composed, as long as their types match up.
+Valid instruction sequences can be freely composed, as long as their types match up.
Theorem (Composition). -If two instruction sequences \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\) and \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast\) are valid with types \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \([t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\), respectively (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\)), -then the concatenated instruction sequence \((\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\;\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast)\) is valid with type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast\,x_2^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\;\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast\,x_2^\ast} [t_2^\ast]\)).
+If two instruction sequences \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\) and \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast\) are valid with types \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \([t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\), respectively (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\)), +then the concatenated instruction sequence \((\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\;\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast)\) is valid with type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast\,x_2^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\;\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast\,x_2^\ast} [t_2^\ast]\)).Note
More generally, instead of a shared type \([t^\ast]\), it suffices if the output type of \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\) is a subtype of the input type of \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\), since the subtype can always be weakened to its supertype by subsumption.
Inversely, valid instruction sequences can also freely be decomposed, that is, splitting them anywhere produces two instruction sequences that are both valid.
+Inversely, valid instruction sequences can also freely be decomposed, that is, splitting them anywhere produces two instruction sequences that are both valid.
Theorem (Decomposition). -If an instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) that is valid with type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\)) +If an instruction sequence \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast\) that is valid with type \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\) (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x^\ast} [t_2^\ast]\)) is split into two instruction sequences \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\) and \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast\) at any point (i.e., \(\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}^\ast = \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast\;\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_2^\ast\)), -then these are separately valid with some types \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \([t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\), respectively (i.e., \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \(C \href{../valid/instructions.html#valid-instr-seq}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\)), +then these are separately valid with some types \([t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \([t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\), respectively (i.e., \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t_1^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_1^\ast} [t^\ast]\) and \(C \href{../valid/instructions.html#valid-instrs}{\vdash} \href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}_1^\ast : [t^\ast] \mathrel{\href{../valid/conventions.html#syntax-instrtype}{\rightarrow}}_{x_2^\ast} [t_2^\ast]\)), where \(x^\ast = x_1^\ast\;x_2^\ast\).
Note
diff --git a/core/binary/conventions.html b/core/binary/conventions.html index 75260177b5..a28cf2d4d8 100644 --- a/core/binary/conventions.html +++ b/core/binary/conventions.html @@ -6,7 +6,7 @@ -The execution of an instruction may also end in a jump to a designated target, which defines the next instruction to execute.
Execution can enter and exit instruction sequences that form blocks.
Instruction sequences are implicitly executed in order, unless a trap or jump occurs.
Execution can enter and exit instruction sequences that form blocks.
Instruction sequences are implicitly executed in order, unless a trap or jump occurs.
In various places the rules contain assertions expressing crucial invariants about the program state.
WebAssembly computation is performed by executing individual instructions.
Do nothing.
Trap.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c)\) from the stack.
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}_2\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_1)\) from the stack.
If \({|{{{\mathit{unop}}}{{}_{{\mathit{nt}}}}}{(c_1)}|}\) is \(1\), then:
+Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
If \({|{{\mathit{unop}}}{{}_{{\mathit{nt}}}}{(c_1)}|}\) is \(1\), then:
-
- -
Let \(c\) be \({{{\mathit{unop}}}{{}_{{\mathit{nt}}}}}{(c_1)}\).
- +
Push the value \(({\mathit{nt}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{\mathit{unop}}}{{}_{{\mathit{nt}}}}{(c_1)}\).
Push the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
If \({{{\mathit{unop}}}{{}_{{\mathit{nt}}}}}{(c_1)}\) is \(\epsilon\), then:
+If \({{\mathit{unop}}}{{}_{{\mathit{nt}}}}{(c_1)}\) is \(\epsilon\), then:
- @@ -231,28 +231,28 @@
Trap.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& ({\mathit{nt}}{.}\mathsf{const}~c_1)~({\mathit{nt}} . {\mathit{unop}}) &\hookrightarrow& ({\mathit{nt}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{{\mathit{unop}}}{{}_{{\mathit{nt}}}}}{(c_1)} = c \\ -& ({\mathit{nt}}{.}\mathsf{const}~c_1)~({\mathit{nt}} . {\mathit{unop}}) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~{{{\mathit{unop}}}{{}_{{\mathit{nt}}}}}{(c_1)} = \epsilon \\ +& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}} {.} {\mathit{unop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{unop}}}{{}_{{\mathit{nt}}}}{(c_1)} = c \\ +& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}} {.} {\mathit{unop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~{{\mathit{unop}}}{{}_{{\mathit{nt}}}}{(c_1)} = \epsilon \\ \end{array}\end{split}\]
Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_1)\) from the stack.
If \({|{{{\mathit{binop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)}|}\) is \(1\), then:
+Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
If \({|{{\mathit{binop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)}|}\) is \(1\), then:
-
- -
Let \(c\) be \({{{\mathit{binop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)}\).
- +
Push the value \(({\mathit{nt}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{\mathit{binop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)}\).
Push the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
If \({{{\mathit{binop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)}\) is \(\epsilon\), then:
+If \({{\mathit{binop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)}\) is \(\epsilon\), then:
- @@ -268,19 +268,19 @@
Trap.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& ({\mathit{nt}}{.}\mathsf{const}~c_1)~({\mathit{nt}}{.}\mathsf{const}~c_2)~({\mathit{nt}} . {\mathit{binop}}) &\hookrightarrow& ({\mathit{nt}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{{\mathit{binop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)} = c \\ -& ({\mathit{nt}}{.}\mathsf{const}~c_1)~({\mathit{nt}}{.}\mathsf{const}~c_2)~({\mathit{nt}} . {\mathit{binop}}) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~{{{\mathit{binop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)} = \epsilon \\ +& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{nt}} {.} {\mathit{binop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{binop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)} = c \\ +& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{nt}} {.} {\mathit{binop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~{{\mathit{binop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)} = \epsilon \\ \end{array}\end{split}\]
Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_1)\) from the stack.
Let \(c\) be \({{{\mathit{testop}}}{{}_{{\mathit{nt}}}}}{(c_1)}\).
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c)\) to the stack.
Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
Let \(c\) be \({{\mathit{testop}}}{{}_{{\mathit{nt}}}}{(c_1)}\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -290,19 +290,19 @@Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
Assert: Due to validation, a value of value type \({\mathit{nt}}\) is on the top of the stack.
Pop the value \(({\mathit{nt}}{.}\mathsf{const}~c_1)\) from the stack.
Let \(c\) be \({{{\mathit{relop}}}{{}_{{\mathit{nt}}}}}{(c_1,\, c_2)}\).
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c)\) to the stack.
Pop the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
Let \(c\) be \({{\mathit{relop}}}{{}_{{\mathit{nt}}}}{(c_1,\, c_2)}\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -312,24 +312,24 @@Assert: Due to validation, a value of value type \({\mathit{nt}}_1\) is on the top of the stack.
Pop the value \(({\mathit{nt}}_1{.}\mathsf{const}~c_1)\) from the stack.
If \({|{{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}}{(c_1)}|}\) is \(1\), then:
+Pop the value \(({\mathit{nt}}_1{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
If \({|{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(c_1)}|}\) is \(1\), then:
-
- -
Let \(c\) be \({{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}}{(c_1)}\).
- +
Push the value \(({\mathit{nt}}_2{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(c_1)}\).
Push the value \(({\mathit{nt}}_2{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
If \({{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}}{(c_1)}\) is \(\epsilon\), then:
+If \({{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(c_1)}\) is \(\epsilon\), then:
- @@ -345,10 +345,10 @@
Trap.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& ({\mathit{nt}}_1{.}\mathsf{const}~c_1)~({\mathit{nt}}_2 . {{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{\mathsf{\_}}}{{\mathit{nt}}_1}) &\hookrightarrow& ({\mathit{nt}}_2{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}}{(c_1)} = c \\ -& ({\mathit{nt}}_1{.}\mathsf{const}~c_1)~({\mathit{nt}}_2 . {{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{\mathsf{\_}}}{{\mathit{nt}}_1}) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~{{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}}{(c_1)} = \epsilon \\ +& ({\mathit{nt}}_1{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}}_2 {.} {{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{\mathsf{\_}}{{\mathit{nt}}_1}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& ({\mathit{nt}}_2{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(c_1)} = c \\ +& ({\mathit{nt}}_1{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{nt}}_2 {.} {{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{\mathsf{\_}}{{\mathit{nt}}_1}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~{{\href{../syntax/instructions.html#syntax-cvtop}{\mathit{cvtop}}}}{{{}_{{\mathit{nt}}_1, {\mathit{nt}}_2}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(c_1)} = \epsilon \\ \end{array}\end{split}\]
Let \(z\) be the current state.
Assert: Due to validation, \(x\) is less than \({|z{.}\mathsf{module}{.}\mathsf{funcs}|}\).
Push the value \((\mathsf{ref.func}~z{.}\mathsf{module}{.}\mathsf{funcs}{}[x])\) to the stack.
Assert: Due to validation, \(x\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{module}}{.}\mathsf{funcs}|}\).
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}func}}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{module}}{.}\mathsf{funcs}{}[x])\) to the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) from the stack.
If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) is of the case \(\mathsf{ref.null}\), then:
+If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1)\) to the stack.
Else:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~0)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~0)\) to the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) from the stack.
If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) is of the case \(\mathsf{ref.null}\), then:
+If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
- @@ -440,37 +440,37 @@
Trap.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~\mathsf{ref.as\_non\_null} &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} = (\mathsf{ref.null}~{\mathit{ht}}) \\ -& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~\mathsf{ref.as\_non\_null} &\hookrightarrow& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} +& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.as\_non\_null}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} = (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}}) \\ +& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.as\_non\_null}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_2\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_1\) from the stack.
If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_1\) is of the case \(\mathsf{ref.null}\) and \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_2\) is of the case \(\mathsf{ref.null}\), then:
+If \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_1\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\) and \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_2\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1)\) to the stack.
Else if \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_1\) is \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}_2\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1)\) to the stack.
Else:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~0)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~0)\) to the stack.
Let \(f\) be the current frame.
Assert: Due to validation, a value is on the top of the stack.
If \({\mathit{rt}'}\) matches \({{\href{../exec/types.html#type-inst}{\mathrm{clos}}}}_{f{.}\mathsf{module}}({\mathit{rt}})\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1)\) to the stack.
Else:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~0)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~0)\) to the stack.
Let \(f\) be the current frame.
Assert: Due to validation, a value is on the top of the stack.
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
Push the value \((\mathsf{ref.i{\scriptstyle31}}~{{{\href{../exec/numerics.html#op-wrap}{\mathrm{wrap}}}}_{32, 31}}{(i)})\) to the stack.
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}i31}}~{{{\href{../exec/numerics.html#op-wrap}{\mathrm{wrap}}}}_{32, 31}}{(i)})\) to the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.i{\scriptstyle31}\_num}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}i31}}\), then:
-
- -
Let \((\mathsf{ref.i{\scriptstyle31}}~i)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{31, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(i)})\) to the stack.
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}i31}}~i)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{31, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(i)})\) to the stack.
Let \(z\) be the current state.
Let \(a\) be \({|z{.}\mathsf{structs}|}\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{struct}\).
Let \((\mathsf{struct}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
Let \(a\) be \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}|}\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\mathsf{mut}^?},\, {\mathit{zt}})^{n}}\) be \(y_0\).
Assert: Due to validation, there are at least \(n\) values on the top of the stack.
Pop the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}\) from the stack.
Let \({\mathit{si}}\) be \(\{ \begin{array}[t]{@{}l@{}}\mathsf{type}~z{.}\mathsf{types}{}[x],\; \mathsf{fields}~{{{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})^{n}} \}\end{array}\).
Push the value \((\mathsf{ref.struct}~a)\) to the stack.
Perform \(z{}[\mathsf{structs} = ..{\mathit{si}}]\).
Let \({\mathit{si}}\) be \(\{ \begin{array}[t]{@{}l@{}}\mathsf{type}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x],\; \mathsf{fields}~{{{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})^{n}} \}\end{array}\).
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)\) to the stack.
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{structs}} = ..{\mathit{si}}]\).
Todo
@@ -697,26 +697,26 @@Let \(z\) be the current state.
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{struct}\).
Let \((\mathsf{struct}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\mathsf{mut}^?},\, {\mathit{zt}})^\ast}\) be \(y_0\).
Assert: Due to validation, \({|{{\mathsf{mut}^?}^\ast}|}\) is \({|{{\mathit{zt}}^\ast}|}\).
Assert: Due to validation, for all \({({\mathit{zt}})^\ast}\), \({{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}\) is defined.
Let \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^\ast}\) be \({{{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}^\ast}\).
Assert: Due to validation, \({|{{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^\ast}|}\) is \({|{{\mathit{zt}}^\ast}|}\).
Push the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^\ast}\) to the stack.
Execute the instruction \((\mathsf{struct.new}~x)\).
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.new}}~x)\).
Todo
@@ -742,35 +742,35 @@Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{struct}\).
Let \((\mathsf{struct}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\mathsf{mut}^?},\, {\mathit{zt}})^\ast}\) be \(y_0\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.struct\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}\), then:
-
- -
Let \((\mathsf{ref.struct}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(i\) is less than \({|z{.}\mathsf{structs}{}[a]{.}\mathsf{fields}|}\) and \(a\) is less than \({|z{.}\mathsf{structs}|}\) and \({|{{\mathsf{mut}^?}^\ast}|}\) is \({|{{\mathit{zt}}^\ast}|}\) and \(i\) is less than \({|{{\mathit{zt}}^\ast}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -807,36 +807,36 @@
If \(i\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\mathsf{fields}|}\) and \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}|}\) and \({|{{\mathsf{mut}^?}^\ast}|}\) is \({|{{\mathit{zt}}^\ast}|}\) and \(i\) is less than \({|{{\mathit{zt}}^\ast}|}\), then:
-
- +
Push the value \({{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{{\mathit{zt}}^\ast}{}[i]}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\mathsf{structs}{}[a]{.}\mathsf{fields}{}[i])}\) to the stack.
Push the value \({{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{{\mathit{zt}}^\ast}{}[i]}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\mathsf{fields}{}[i])}\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~({{\mathsf{struct.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x~i) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.struct}~a)~({{\mathsf{struct.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x~i) &\hookrightarrow& {{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{{\mathit{zt}}^\ast}{}[i]}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\mathsf{structs}{}[a]{.}\mathsf{fields}{}[i])} - &\qquad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{struct}~{({\mathsf{mut}^?}~{\mathit{zt}})^\ast} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~({\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)~({\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{{\mathit{zt}}^\ast}{}[i]}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\mathsf{fields}{}[i])} + &\qquad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{({\mathsf{mut}^?}~{\mathit{zt}})^\ast} \\ \end{array}\end{split}\]-- \(\mathsf{struct.set}~x~i\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.set}}~x~i\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{struct}\).
- +
Let \((\mathsf{struct}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \({({\mathsf{mut}^?},\, {\mathit{zt}})^\ast}\) be \(y_0\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.struct\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}\), then:
-
- +
Let \((\mathsf{ref.struct}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -876,39 +876,39 @@
If \({|{{\mathsf{mut}^?}^\ast}|}\) is \({|{{\mathit{zt}}^\ast}|}\) and \(i\) is less than \({|{{\mathit{zt}}^\ast}|}\), then:
-
- +
Perform \(z{}[\mathsf{structs}{}[a].\mathsf{fields}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{{\mathit{zt}}^\ast}{}[i]}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})]\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{{\mathit{zt}}^\ast}{}[i]}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})]\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{struct.set}~x~i) &\hookrightarrow& z ; \mathsf{trap} \\ -& z ; (\mathsf{ref.struct}~a)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{struct.set}~x~i) &\hookrightarrow& z{}[\mathsf{structs}{}[a].\mathsf{fields}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{{\mathit{zt}}^\ast}{}[i]}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})] ; \epsilon - &\qquad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{struct}~{({\mathsf{mut}^?}~{\mathit{zt}})^\ast} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.set}}~x~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z ; \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-struct}{\mathsf{struct.set}}~x~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{{\mathit{zt}}^\ast}{}[i]}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})] ; \epsilon + &\qquad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{({\mathsf{mut}^?}~{\mathit{zt}})^\ast} \\ \end{array}\end{split}\]- \(\mathsf{array.new}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new}}~x\)¶
-
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- -
Push the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}\) to the stack.
- +
Execute the instruction \((\mathsf{array.new\_fixed}~x~n)\).
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new}~x) &\hookrightarrow& {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\mathsf{array.new\_fixed}~x~n) \\ +& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n) \\ \end{array}\end{split}\]- \(\mathsf{array.new\_default}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_default}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
Assert: Due to validation, \({{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}\) is defined.
Let \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) be \({{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}\).
- -
Push the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}\) to the stack.
- +
Execute the instruction \((\mathsf{array.new\_fixed}~x~n)\).
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n)\).
Todo
@@ -931,24 +931,24 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new\_default}~x) &\hookrightarrow& {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\mathsf{array.new\_fixed}~x~n) - &\qquad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}}) \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_default}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n) + &\qquad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}}) \\ &&&&\qquad {\land}~{{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} \\ \end{array}\end{split}\]-- \(\mathsf{array.new\_fixed}~x~n\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n\)¶
Let \(z\) be the current state.
Assert: Due to validation, there are at least \(n\) values on the top of the stack.
- -
Pop the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}\) from the stack.
- -
Let \(a\) be \({|z{.}\mathsf{arrays}|}\).
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
- +
Let \(a\) be \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
- -
Let \({\mathit{ai}}\) be \(\{ \begin{array}[t]{@{}l@{}}\mathsf{type}~z{.}\mathsf{types}{}[x],\; \mathsf{fields}~{{{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})^{n}} \}\end{array}\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- +
Perform \(z{}[\mathsf{arrays} = ..{\mathit{ai}}]\).
- +
Let \({\mathit{ai}}\) be \(\{ \begin{array}[t]{@{}l@{}}\mathsf{type}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x],\; \mathsf{fields}~{{{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})^{n}} \}\end{array}\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}} = ..{\mathit{ai}}]\).
Todo
@@ -977,25 +977,26 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\mathsf{array.new\_fixed}~x~n) &\hookrightarrow& \multicolumn{2}{l@{}}{ z{}[\mathsf{arrays} = ..{\mathit{ai}}] ; (\mathsf{ref.array}~a) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ - &&& \multicolumn{2}{l@{}}{\quad {\land}~a = {|z{.}\mathsf{arrays}|} \land {\mathit{ai}} = \{ \begin{array}[t]{@{}l@{}} -\mathsf{type}~z{.}\mathsf{types}{}[x],\; \mathsf{fields}~{({{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}))^{n}} \}\end{array}} \\ +& z ; {{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}} = ..{\mathit{ai}}] ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ + &&& \multicolumn{2}{l@{}}{\quad {\land}~a = {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|} \land {\mathit{ai}} = \{ \begin{array}[t]{@{}l@{}} +\mathsf{type}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x],\; \mathsf{fields}~{({{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}))^{n}} \}\end{array}} \\ \end{array}\end{split}\]-- \(\mathsf{array.new\_data}~x~y\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_data}}~x~y\)¶
-
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
If \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}({\href{../syntax/types.html#syntax-rectype}{\mathit{type}}}(x))\) is of the case \(\mathsf{array}\), then:
+- +
Let \(z\) be the current state.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- @@ -1050,61 +1051,61 @@
If \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\), then:
-
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}({\href{../syntax/types.html#syntax-rectype}{\mathit{type}}}(x))\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
If \(i + n \cdot {|{\mathit{zt}}|} / 8\) is greater than \({|{\href{../syntax/modules.html#syntax-data}{\mathit{data}}}(y){.}\mathsf{bytes}|}\), then:
+If \(i + n \cdot {|{\mathit{zt}}|} / 8\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}|}\), then:
- @@ -1003,11 +1004,11 @@
Trap.
Quick search
- -
Let \({\mathit{cnn}}\) be \({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})\).
- +
Let \({b^\ast}\) be \({\href{../syntax/modules.html#syntax-data}{\mathit{data}}}(y){.}\mathsf{bytes}{}[i : n \cdot {|{\mathit{zt}}|} / 8]\).
Let \({b^\ast}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}{}[i : n \cdot {|{\mathit{zt}}|} / 8]\).
Let \({{\mathit{gb}}^\ast}\) be \({\mathrm{group}}_{{\mathit{bytes}}_{\mathit{by}}}({|{\mathit{zt}}|} / 8, {b^\ast})\).
- -
Let \({c^{n}}\) be \({{\mathrm{inverse}}_{{\mathit{of}}_{\mathit{ibytes}}}({|{\mathit{zt}}|}, {\mathit{gb}})^\ast}\).
- -
Push the values \({({\mathit{cnn}}{.}\mathsf{const}~c)^{n}}\) to the stack.
- +
Execute the instruction \((\mathsf{array.new\_fixed}~x~n)\).
- +
Push the values \({({\mathit{cnn}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)^{n}}\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n)\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new\_data}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ - &&& \multicolumn{2}{l@{}}{\quad {\land}~i + n \cdot {|{\mathit{zt}}|} / 8 > {|z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}|}} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new\_data}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ {({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\mathsf{const}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c))^{n}}~(\mathsf{array.new\_fixed}~x~n) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ - &&& \multicolumn{2}{l@{}}{\quad {\land}~{\href{../syntax/conventions.html#notation-concat}{\mathrm{concat}}}({{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{zt}}}(c)^{n}}) = z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}{}[i : n \cdot {|{\mathit{zt}}|} / 8]} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ + &&& \multicolumn{2}{l@{}}{\quad {\land}~i + n \cdot {|{\mathit{zt}}|} / 8 > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}|}} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ {({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c))^{n}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ + &&& \multicolumn{2}{l@{}}{\quad {\land}~{\href{../syntax/conventions.html#notation-concat}{\mathrm{concat}}}({{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{zt}}}(c)^{n}}) = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}{}[i : n \cdot {|{\mathit{zt}}|} / 8]} \\ \end{array}\end{split}\]- \(\mathsf{array.new\_elem}~x~y\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_elem}}~x~y\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
If \(i + n\) is greater than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- -
If \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
Trap.
- +
Let \({{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}}\) be \(z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[i : n]\).
Let \({{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[i : n]\).
- -
Push the values \({{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}}\) to the stack.
- +
Execute the instruction \((\mathsf{array.new\_fixed}~x~n)\).
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new\_elem}~x~y) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~i + n > {|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.new\_elem}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ {{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}}~(\mathsf{array.new\_fixed}~x~n) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}} = z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[i : n]} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ {{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.new\_fixed}}~x~n) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}^{n}} = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[i : n]} \\ \end{array}\end{split}\]- \({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x\)¶
++ \({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i\) is greater than or equal to \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i\) is greater than or equal to \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\), then:
- @@ -1114,16 +1115,16 @@
Trap.
Quick search
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(i\) is less than \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\) and \(a\) is less than \({|z{.}\mathsf{arrays}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -1168,35 +1169,35 @@
If \(i\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\) and \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\), then:
-
- +
Push the value \({{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{\mathit{zt}}}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}{}[i])}\) to the stack.
Push the value \({{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{\mathit{zt}}}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}{}[i])}\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~i \geq {|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\hookrightarrow& \multicolumn{2}{l@{}}{ {{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{\mathit{zt}}}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}{}[i])} } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i \geq {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ {{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{\mathit{zt}}}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}{}[i])} } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ \end{array}\end{split}\]-- \(\mathsf{array.set}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
@@ -1255,34 +1256,34 @@- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i\) is greater than or equal to \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i\) is greater than or equal to \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\), then:
- @@ -1206,13 +1207,13 @@
Trap.
Quick search
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Perform \(z{}[\mathsf{arrays}{}[a].\mathsf{fields}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})]\).
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\href{../exec/runtime.html#syntax-arrayinst}{\mathsf{fields}}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})]\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{array.set}~x) &\hookrightarrow& z ; \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{array.set}~x) &\hookrightarrow& z ; \mathsf{trap} - &\qquad \mbox{if}~i \geq {|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{array.set}~x) &\hookrightarrow& \multicolumn{2}{l@{}}{ z{}[\mathsf{arrays}{}[a].\mathsf{fields}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})] ; \epsilon } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z ; \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z ; \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i \geq {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\href{../exec/runtime.html#syntax-arrayinst}{\mathsf{fields}}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})] ; \epsilon } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ \end{array}\end{split}\]-- \(\mathsf{array.len}\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.len}}\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -1298,31 +1299,31 @@
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|})\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|})\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~\mathsf{array.len} &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~\mathsf{array.len} &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}) \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.len}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.len}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}) \\ \end{array}\end{split}\]- \(\mathsf{array.fill}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i + n\) is greater than \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\), then:
- @@ -1339,16 +1340,16 @@
Trap.
Quick search
- @@ -1363,55 +1364,55 @@
Else:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- -
Execute the instruction \((\mathsf{array.set}~x)\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.fill}~x)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x)\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.fill}~x) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.fill}~x) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~i + n > {|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.fill}~x) &\hookrightarrow& \epsilon +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \epsilon &\qquad \mbox{otherwise, if}~n = 0 \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.fill}~x) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{array.set}~x) \\ (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{array.fill}~x) \end{array} } +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.fill}}~x) \end{array} } &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]- \(\mathsf{array.copy}~x_1~x_2\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\) and the type of \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is ref, then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\) and the type of \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is ref, then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\mathsf{ref.null}\) and the type of \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is ref, then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\) and the type of \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is ref, then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
If \(a_1\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i_1 + n\) is greater than \({|z{.}\mathsf{arrays}{}[a_1]{.}\mathsf{fields}|}\), then:
+- -
If \(a_1\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i_1 + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a_1]{.}\mathsf{fields}|}\), then:
Trap.
- -
Let \((\mathsf{ref.array}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
If \(a_2\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i_2 + n\) is greater than \({|z{.}\mathsf{arrays}{}[a_2]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
If \(a_2\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i_2 + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a_2]{.}\mathsf{fields}|}\), then:
- @@ -1424,7 +1425,7 @@
Trap.
Quick search
If \(n\) is \(0\), then:
-
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
- @@ -1437,27 +1438,27 @@
Do nothing.
Quick search
Else if \(i_1\) is greater than \(i_2\), then:
-
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x_2])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x_2])\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}}_2)\) be \(y_0\).
- -
Let \((\mathsf{ref.array}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -1467,27 +1468,27 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- +
Let \((\mathsf{ref.array}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
- -
Let \({{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}\) be \({\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\mathit{zt}}_2)\).
- -
Push the value \((\mathsf{ref.array}~a_1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1 + n - 1)\) to the stack.
- -
Push the value \((\mathsf{ref.array}~a_2)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2 + n - 1)\) to the stack.
- -
Execute the instruction \(({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)\).
- -
Execute the instruction \((\mathsf{array.set}~x_1)\).
- -
Push the value \((\mathsf{ref.array}~a_1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)\) to the stack.
- -
Push the value \((\mathsf{ref.array}~a_2)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.copy}~x_1~x_2)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1 + n - 1)\) to the stack.
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2 + n - 1)\) to the stack.
- +
Execute the instruction \(({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x_1)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)\) to the stack.
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2)\).
Quick search
Else:
-
- -
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x_2])\) is of the case \(\mathsf{array}\).
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x_2])\).
- +
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}}_2)\) be \(y_0\).
- -
Let \((\mathsf{ref.array}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- @@ -1593,51 +1594,51 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- +
Let \((\mathsf{ref.array}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle1}}}\).
- -
Let \({{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}\) be \({\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\mathit{zt}}_2)\).
- -
Push the value \((\mathsf{ref.array}~a_1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)\) to the stack.
- -
Push the value \((\mathsf{ref.array}~a_2)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)\) to the stack.
- -
Execute the instruction \(({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)\).
- -
Execute the instruction \((\mathsf{array.set}~x_1)\).
- -
Push the value \((\mathsf{ref.array}~a_1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1 + 1)\) to the stack.
- -
Push the value \((\mathsf{ref.array}~a_2)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2 + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.copy}~x_1~x_2)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)\) to the stack.
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)\) to the stack.
- +
Execute the instruction \(({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x_1)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1 + 1)\) to the stack.
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2 + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2)\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}}_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \mathsf{trap} \\ -& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.null}~{\mathit{ht}}_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i_1 + n > {|z{.}\mathsf{arrays}{}[a_1]{.}\mathsf{fields}|}} \\ -& z ; (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i_2 + n > {|z{.}\mathsf{arrays}{}[a_2]{.}\mathsf{fields}|}} \\ -& z ; (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \multicolumn{2}{l@{}}{ \epsilon } \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}}_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}}_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i_1 + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a_1]{.}\mathsf{fields}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i_2 + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a_2]{.}\mathsf{fields}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \epsilon } \\ & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~n = 0} \\ -& z ; (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1) \\ (\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2) \\ ({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)~(\mathsf{array.set}~x_1) \\ (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1 + 1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2 + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{array.copy}~x_1~x_2) \end{array} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\mathsf{types}{}[x_2] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}}_2)} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2) \\ ({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x_1) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1 + 1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2 + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) \end{array} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}}_2)} \\ & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~i_1 \leq i_2 \land {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?} = {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\mathit{zt}}_2)} \\ -& z ; (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.copy}~x_1~x_2) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1 + n - 1) \\ (\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2 + n - 1) \\ ({{\mathsf{array.get}}{\mathsf{\_}}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)~(\mathsf{array.set}~x_1) \\ (\mathsf{ref.array}~a_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_1)~(\mathsf{ref.array}~a_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i_2)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{array.copy}~x_1~x_2) \end{array} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\mathsf{types}{}[x_2] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}}_2)} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1 + n - 1) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2 + n - 1) \\ ({\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.get}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}~x_2)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x_1) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_1)~(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i_2)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.copy}}~x_1~x_2) \end{array} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x_2] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}}_2)} \\ & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?} = {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\mathit{zt}}_2)} \\ \end{array}\end{split}\]Where:
\[\begin{split}\begin{array}{@{}lcl@{}l@{}} {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\href{../syntax/types.html#syntax-consttype}{\mathit{consttype}}}) &=& \epsilon \\ -{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\href{../syntax/types.html#syntax-packtype}{\mathit{packtype}}}) &=& \mathsf{s} \\ +{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}({\href{../syntax/types.html#syntax-packtype}{\mathit{packtype}}}) &=& \href{../syntax/instructions.html#syntax-sx}{\mathsf{S}} \\ \end{array}\end{split}\]-- \(\mathsf{array.init\_data}~x~y\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i + n\) is greater than \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\), then:
-
- @@ -1646,9 +1647,9 @@
Trap.
Quick search
If \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\) is not of the case \(\mathsf{array}\), then:
+If \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is not of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}\), then:
-
If \(n\) is \(0\) and \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \(n\) is \(0\) and \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
- @@ -1659,12 +1660,12 @@
Do nothing.
Quick search
Else:
-
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
If \(j + n \cdot {|{\mathit{zt}}|} / 8\) is greater than \({|z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}|}\), then:
+If \(j + n \cdot {|{\mathit{zt}}|} / 8\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}|}\), then:
- @@ -1681,19 +1682,19 @@
Trap.
Quick search
- @@ -1763,41 +1764,41 @@
Else:
-
- +
Let \((\mathsf{array}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\mathsf{types}{}[x])\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~y_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
- -
Let \(({\mathsf{mut}^?},\, {\mathit{zt}})\) be \(y_0\).
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{zbytes}}}({\mathit{zt}}, z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}{}[j : {|{\mathit{zt}}|} / 8])\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- -
Push the value \({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\mathsf{const}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c)\) to the stack.
- -
Execute the instruction \((\mathsf{array.set}~x)\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + {|{\mathit{zt}}|} / 8)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.init\_data}~x~y)\).
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{zbytes}}}({\mathit{zt}}, z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}{}[j : {|{\mathit{zt}}|} / 8])\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- +
Push the value \({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c)\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + {|{\mathit{zt}}|} / 8)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y)\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_data}~x~y) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_data}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_data}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~j + n \cdot {|{\mathit{zt}}|} / 8 > {|z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}|}} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_data}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \epsilon } \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~j + n \cdot {|{\mathit{zt}}|} / 8 > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \epsilon } \\ & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~n = 0} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_data}~x~y) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\mathsf{const}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c))~(\mathsf{array.set}~x) \\ (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + {|{\mathit{zt}}|} / 8)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{array.init\_data}~x~y) \end{array} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\mathsf{types}{}[x] \approx \mathsf{array}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{zt}}}(c) = z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}{}[j : {|{\mathit{zt}}|} / 8]} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}}){.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{\href{../exec/numerics.html#aux-unpacknum}{\mathrm{unpack}}}}_{{\mathit{zt}}}(c))~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + {|{\mathit{zt}}|} / 8)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_data}}~x~y) \end{array} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x] \approx \href{../syntax/types.html#syntax-comptype}{\mathsf{array}}~({\mathsf{mut}^?}~{\mathit{zt}})} \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad {\land}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{zt}}}(c) = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{datas}}{}[y]{.}\mathsf{bytes}{}[j : {|{\mathit{zt}}|} / 8]} \\ \end{array}\end{split}\]-- \(\mathsf{array.init\_elem}~x~y\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
Trap.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\mathsf{arrays}|}\) and \(i + n\) is greater than \({|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}\), then:
+- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
If \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}|}\) and \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}\), then:
-
- @@ -1806,32 +1807,32 @@
Trap.
Quick search
If \(j + n\) is greater than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+If \(j + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
-
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
Trap.
If \(n\) is \(0\) and \(j\) is less than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+If \(n\) is \(0\) and \(j\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
-
- -
Let \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) be \(z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[j]\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- +
Let \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[j]\).
- @@ -1842,7 +1843,7 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) to the stack.
- -
Execute the instruction \((\mathsf{array.set}~x)\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.init\_elem}~x~y)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y)\).
Quick search
Else if \(n\) is \(0\), then:
-
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- @@ -1961,8 +1962,8 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
- @@ -1853,23 +1854,23 @@
Do nothing.
Quick search
Else:
-
If \(j\) is less than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+If \(j\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
-
- -
Let \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) be \(z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[j]\).
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.array\_addr}\), then:
+- +
Let \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[j]\).
- @@ -1887,34 +1888,34 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}\), then:
-
- -
Let \((\mathsf{ref.array}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- +
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) to the stack.
- -
Execute the instruction \((\mathsf{array.set}~x)\).
- -
Push the value \((\mathsf{ref.array}~a)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{array.init\_elem}~x~y)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x)\).
- +
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y)\).
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{ref.null}~{\mathit{ht}})~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_elem}~x~y) &\hookrightarrow& \mathsf{trap} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_elem}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\mathsf{arrays}{}[a]{.}\mathsf{fields}|}} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_elem}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~j + n > {|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_elem}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \epsilon } \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{arrays}}{}[a]{.}\mathsf{fields}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~j + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \epsilon } \\ & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~n = 0} \\ -& z ; (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{array.init\_elem}~x~y) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{array.set}~x) \\ (\mathsf{ref.array}~a)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{array.init\_elem}~x~y) \end{array} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} = z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[j]} \\ +& z ; (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.set}}~x) \\ (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}array}}~a)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-array}{\mathsf{array.init\_elem}}~x~y) \end{array} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{otherwise, if}~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}} = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[j]} \\ \end{array}\end{split}\]-- \(\mathsf{any.convert\_extern}\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{any.convert\_extern}}\)¶
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- -
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
-
- +
Push the value \((\mathsf{ref.null}~\mathsf{any})\) to the stack.
Push the value \((\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~\href{../syntax/types.html#syntax-heaptype}{\mathsf{any}})\) to the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.extern}\), then:
+If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}extern}}\), then:
@@ -1928,19 +1929,19 @@-
- +
Let \((\mathsf{ref.extern}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}extern}}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
Push the value \({\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{ref.null}~{\mathit{ht}})~\mathsf{any.convert\_extern} &\hookrightarrow& (\mathsf{ref.null}~\mathsf{any}) \\ -& (\mathsf{ref.extern}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})~\mathsf{any.convert\_extern} &\hookrightarrow& {\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}} \\ +& (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{any.convert\_extern}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~\href{../syntax/types.html#syntax-heaptype}{\mathsf{any}}) \\ +& (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}extern}}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})~\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{any.convert\_extern}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}} \\ \end{array}\end{split}\]-- \(\mathsf{extern.convert\_any}\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{extern.convert\_any}}\)¶
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) from the stack.
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\mathsf{ref.null}\), then:
+- @@ -1948,7 +1949,7 @@
If \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\) is of the case \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}\), then:
-
- +
Push the value \((\mathsf{ref.null}~\mathsf{extern})\) to the stack.
Push the value \((\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~\href{../syntax/types.html#syntax-heaptype}{\mathsf{extern}})\) to the stack.
Quick search
- -
Let \({\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}\) be \({\mathit{admin}}_{\mathit{u{\scriptstyle0}}}\).
- +
Push the value \((\mathsf{ref.extern}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})\) to the stack.
Push the value \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}extern}}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}})\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{ref.null}~{\mathit{ht}})~\mathsf{extern.convert\_any} &\hookrightarrow& (\mathsf{ref.null}~\mathsf{extern}) \\ -& {\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}~\mathsf{extern.convert\_any} &\hookrightarrow& (\mathsf{ref.extern}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}) \\ +& (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~{\mathit{ht}})~\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{extern.convert\_any}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref.null}}~\href{../syntax/types.html#syntax-heaptype}{\mathsf{extern}}) \\ +& {\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}~\href{../syntax/instructions.html#syntax-instr-extern}{\mathsf{extern.convert\_any}} &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}extern}}~{\href{../exec/runtime.html#syntax-addrref}{\mathit{addrref}}}) \\ \end{array}\end{split}\]@@ -1998,98 +1999,98 @@Quick search
No formal reduction rule is required for this instruction, since \(\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{const}}\) instructions coincide with values.
- \(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}\)¶
++ -\(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{{\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1)} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{\href{../syntax/instructions.html#syntax-vvunop}{\mathit{vvunop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1)} \\ \end{array}\end{split}\]- \(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}\)¶
++ -\(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1,\, c_2)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1,\, c_2)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{{\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1,\, c_2)} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{\href{../syntax/instructions.html#syntax-vvbinop}{\mathit{vvbinop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1,\, c_2)} \\ \end{array}\end{split}\]- \(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}\)¶
++ -\(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_3)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_3)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1,\, c_2,\, c_3)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1,\, c_2,\, c_3)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_3)~(\mathsf{v{\scriptstyle128}} . {\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}) &\hookrightarrow& \multicolumn{2}{l@{}}{ (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~c = {{{\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}}{{}_{\mathsf{v{\scriptstyle128}}}}}{(c_1,\, c_2,\, c_3)}} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_3)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} {\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~c = {{\href{../syntax/instructions.html#syntax-vvternop}{\mathit{vvternop}}}}{{}_{\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}}}{(c_1,\, c_2,\, c_3)}} \\ \end{array}\end{split}\]- \(\mathsf{v{\scriptstyle128}} . \mathsf{any\_true}\)¶
++ \(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} \href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{any\_true}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{\href{../exec/numerics.html#op-ine}{\mathrm{ine}}}}_{{|\mathsf{v{\scriptstyle128}}|}}(c_1, 0)\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\href{../exec/numerics.html#op-ine}{\mathrm{ine}}}}_{{|\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}|}}(c_1, 0)\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}} . \mathsf{any\_true}) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{\href{../exec/numerics.html#op-ine}{\mathrm{ine}}}}_{{|\mathsf{v{\scriptstyle128}}|}}(c_1, 0) \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}} {.} \href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{any\_true}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{\href{../exec/numerics.html#op-ine}{\mathrm{ine}}}}_{{|\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}|}}(c_1, 0) \\ \end{array}\end{split}\]- \({\mathit{sh}} . {\mathit{vunop}}\)¶
+\({\mathit{sh}} {.} {\mathit{vunop}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{\mathit{vunop}}}{{}_{{\mathit{sh}}}}}{(c_1)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\mathit{vunop}}}{{}_{{\mathit{sh}}}}{(c_1)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~({\mathit{sh}} . {\mathit{vunop}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{{\mathit{vunop}}}{{}_{{\mathit{sh}}}}}{(c_1)} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{sh}} {.} {\mathit{vunop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{\mathit{vunop}}}{{}_{{\mathit{sh}}}}{(c_1)} \\ \end{array}\end{split}\]- -\({\mathit{sh}} . {\mathit{vbinop}}\)¶
+\({\mathit{sh}} {.} {\mathit{vbinop}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
If \({|{{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)}|}\) is \(1\), then:
+- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- -
If \({|{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)}|}\) is \(1\), then:
-
- -
Let \(c\) be \({{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
If \({{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)}\) is \(\epsilon\), then:
+If \({{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)}\) is \(\epsilon\), then:
- @@ -2105,51 +2106,51 @@
Trap.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~({\mathit{sh}} . {\mathit{vbinop}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)} = c \\ -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~({\mathit{sh}} . {\mathit{vbinop}}) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~{{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)} = \epsilon \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{sh}} {.} {\mathit{vbinop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)} = c \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{sh}} {.} {\mathit{vbinop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~{{\mathit{vbinop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)} = \epsilon \\ \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N} . \mathsf{all\_true}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N} {.} \href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{all\_true}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) from the stack.
- +
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c)\).
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) from the stack.
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c)\).
If for all \({({\mathit{ci}}_1)^\ast}\), \({\mathit{ci}}_1\) is not \(0\), then:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1)\) to the stack.
Else:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~0)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~0)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)~({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N} . \mathsf{all\_true}) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~1) - &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c) \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)~({{\mathsf{i}}{n}}{\mathsf{x}}{N} {.} \href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{all\_true}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~1) + &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c) \\ &&&&\qquad {\land}~({\mathit{ci}}_1 \neq 0)^\ast \\ -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)~({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N} . \mathsf{all\_true}) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~0) +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)~({{\mathsf{i}}{n}}{\mathsf{x}}{N} {.} \href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{all\_true}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~0) &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]- \({\mathit{sh}} . {\mathit{vrelop}}\)¶
+\({\mathit{sh}} {.} {\mathit{vrelop}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{\mathit{vrelop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{\mathit{vrelop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2168,8 +2169,8 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~({\mathit{sh}} . {\mathit{vrelop}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{{\mathit{vrelop}}}{{}_{{\mathit{sh}}}}}{(c_1,\, c_2)} = c \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{sh}} {.} {\mathit{vrelop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{vrelop}}}{{}_{{\mathit{sh}}}}{(c_1,\, c_2)} = c \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2182,16 +2183,16 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N} . {\mathit{vshiftop}}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N} {.} {\mathit{vshiftop}}\)¶
-
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \({{c'}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)\).
- -
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{{\mathit{vshiftop}}}{{}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}}}{({c'},\, n)}^\ast})}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \({{c'}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1)\).
- +
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{\mathit{vshiftop}}}{{}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}}{({c'},\, n)}^\ast})}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2209,9 +2210,9 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N} . {\mathit{vshiftop}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1) \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{{\mathit{vshiftop}}}{{}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}}}{({c'},\, n)}^\ast})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~({{\mathsf{i}}{n}}{\mathsf{x}}{N} {.} {\mathit{vshiftop}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1) \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{\mathit{vshiftop}}}{{}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}}{({c'},\, n)}^\ast})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2225,14 +2226,14 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{bitmask}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{bitmask}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) from the stack.
- -
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c)\).
- -
Let \({\mathit{ci}}\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{ibits}}}(32, {{{{{\href{../exec/numerics.html#op-ilt}{\mathrm{ilt}}}}_{{|{\mathsf{i}}{n}|}}^{\mathsf{s}}}}{({\mathit{ci}}_1,\, 0)}^\ast})\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{\mathit{ci}})\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) from the stack.
- +
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c)\).
- +
Let \({\mathit{ci}}\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{ibits}}}(32, {{{{{\href{../exec/numerics.html#op-ilt}{\mathrm{ilt}}}}_{{|{\mathsf{i}}{n}|}}^{\href{../syntax/instructions.html#syntax-sx}{\mathsf{S}}}}}{({\mathit{ci}}_1,\, 0)}^\ast})\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{\mathit{ci}})\) to the stack.
Todo
@@ -2250,9 +2251,9 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)~(({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{bitmask}) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{\mathit{ci}}) - &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c) \\ - &&&&\qquad {\land}~{{\href{../exec/numerics.html#aux-bits}{\mathrm{bits}}}}_{{\mathsf{i}}{32}}({\mathit{ci}}) = {{{{{\href{../exec/numerics.html#op-ilt}{\mathrm{ilt}}}}_{{|{\mathsf{i}}{n}|}}^{\mathsf{s}}}}{({\mathit{ci}}_1,\, 0)}^\ast} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)~(({{\mathsf{i}}{n}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{bitmask}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{\mathit{ci}}) + &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c) \\ + &&&&\qquad {\land}~{{\href{../exec/numerics.html#aux-bits}{\mathrm{bits}}}}_{{\href{../syntax/types.html#syntax-numtype}{\mathit{numtype}}}{32}}({\mathit{ci}}) = {{{{{\href{../exec/numerics.html#op-ilt}{\mathrm{ilt}}}}_{{|{\mathsf{i}}{n}|}}^{\href{../syntax/instructions.html#syntax-sx}{\mathsf{S}}}}}{({\mathit{ci}}_1,\, 0)}^\ast} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{lcl@{\qquad}l} @@ -2261,19 +2262,19 @@-Quick search
\\ \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{swizzle}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{swizzle}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \({c^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)~{0^{256 - N}}\).
- +
Let \({{\mathit{ci}}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_2)\).
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \({c^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1)~{0^{256 - N}}\).
Let \({{\mathit{ci}}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_2)\).
Assert: Due to validation, for all \({(k)^{k<N}}\), \({{\mathit{ci}}^\ast}{}[k]\) is less than \({|{c^\ast}|}\).
- -
Assert: Due to validation, for all \({(k)^{k<N}}\), \(k\) is less than \({|{{\mathit{ci}}^\ast}|}\).
- -
Let \({c'}\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{c^\ast}{}[{{\mathit{ci}}^\ast}{}[k]]^{k<N}})}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~{c'})\) to the stack.
- +
Let \({c'}\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{c^\ast}{}[{{\mathit{ci}}^\ast}{}[k]]^{k<N}})}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{c'})\) to the stack.
Todo
@@ -2291,10 +2292,10 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~(({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{swizzle}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~{c'}) - &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_2) \\ - &&&&\qquad {\land}~{c^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)~{0^{256 - N}} \\ - &&&&\qquad {\land}~{c'} = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{c^\ast}{}[{{\mathit{ci}}^\ast}{}[k]]^{k<N}})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~(({{\mathsf{i}}{n}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{swizzle}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{c'}) + &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_2) \\ + &&&&\qquad {\land}~{c^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1)~{0^{256 - N}} \\ + &&&&\qquad {\land}~{c'} = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{c^\ast}{}[{{\mathit{ci}}^\ast}{}[k]]^{k<N}})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2309,18 +2310,18 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{shuffle}~{i^\ast}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{shuffle}}~{i^\ast}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- -
Assert: Due to validation, for all \({(k)^{k<N}}\), \(k\) is less than \({|{i^\ast}|}\).
- +
Let \({{c'}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)~{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_2)\).
Let \({{c'}^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1)~{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_2)\).
- -
Assert: Due to validation, for all \({(k)^{k<N}}\), \({i^\ast}{}[k]\) is less than \({|{{c'}^\ast}|}\).
- -
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{c'}^\ast}{}[{i^\ast}{}[k]]^{k<N}})}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{c'}^\ast}{}[{i^\ast}{}[k]]^{k<N}})}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2339,9 +2340,9 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~(({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{shuffle}~{i^\ast}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)~{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_2) \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{c'}^\ast}{}[{i^\ast}{}[k]]^{k<N}})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~(({{\mathsf{i}}{n}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{shuffle}}~{i^\ast}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1)~{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_2) \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{c'}^\ast}{}[{i^\ast}{}[k]]^{k<N}})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2355,13 +2356,13 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{splat}\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{splat}}\)¶
- -
Assert: Due to validation, a value of value type \({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n})\) is on the top of the stack.
- -
Pop the value \(({\mathit{nt}}_0{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_1)^{N}})}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \(({\mathit{nt}}_0{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_1)^{N}})}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2377,8 +2378,8 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& ({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n}){.}\mathsf{const}~c_1)~(({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{splat}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_1)^{N}})} \\ +& ({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n}){.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(({{\mathsf{i}}{n}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{splat}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_1)^{N}})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{lcl@{\qquad}l} @@ -2388,20 +2389,20 @@-Quick search
\\ \end{array}\end{split}\]- \({{{{\mathit{lanet}}_{\mathit{u{\scriptstyle0}}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{extract\_lane\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}_{\mathit{u{\scriptstyle1}}}^?}}~i\)¶
++ \({{{\mathit{lanet}}_{\mathit{u{\scriptstyle0}}}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extract\_lane}}}{\mathsf{\_}}{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}_{\mathit{u{\scriptstyle1}}}^?}}~i\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
If \({{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}_{\mathit{u{\scriptstyle1}}}^?}\) is not defined and the type of \({\mathit{lanet}}_{\mathit{u{\scriptstyle0}}}\) is numtype, then:
- -
Let \({\mathit{nt}}\) be \({\mathit{lanet}}_{\mathit{u{\scriptstyle0}}}\).
If \(i\) is less than \({|{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{nt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)|}\), then:
+- @@ -2416,11 +2417,11 @@
If \(i\) is less than \({|{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{nt}}}{\mathsf{x}}{N}}(c_1)|}\), then:
-
- -
Let \(c_2\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{nt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[i]\).
- +
Push the value \(({\mathit{nt}}{.}\mathsf{const}~c_2)\) to the stack.
- +
Let \(c_2\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{nt}}}{\mathsf{x}}{N}}(c_1){}[i]\).
Push the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) to the stack.
Quick search
- -
Let \({\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}\) be \({{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}_{\mathit{u{\scriptstyle1}}}^?}\).
If \(i\) is less than \({|{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{pt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1)|}\), then:
+- @@ -2446,10 +2447,10 @@
If \(i\) is less than \({|{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{pt}}}{\mathsf{x}}{N}}(c_1)|}\), then:
-
- -
Let \(c_2\) be \({{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{{|{\mathit{pt}}|}, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{pt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[i])}\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c_2)\) to the stack.
- +
Let \(c_2\) be \({{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{{|{\mathit{pt}}|}, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{pt}}}{\mathsf{x}}{N}}(c_1){}[i])}\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) to the stack.
Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{vextract\_lane}~({{{\mathit{nt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N})~i) &\hookrightarrow& ({\mathit{nt}}{.}\mathsf{const}~c_2) - &\qquad \mbox{if}~c_2 = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{nt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[i] \\ -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~({({{{\mathit{pt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{extract\_lane\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}~i) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~c_2) - &\qquad \mbox{if}~c_2 = {{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{{|{\mathit{pt}}|}, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{pt}}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[i])} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extract\_lane}}~({{\mathit{nt}}}{\mathsf{x}}{N})~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2) + &\qquad \mbox{if}~c_2 = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{nt}}}{\mathsf{x}}{N}}(c_1){}[i] \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({({{\mathit{pt}}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{extract\_lane}}}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2) + &\qquad \mbox{if}~c_2 = {{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{{|{\mathit{pt}}|}, 32}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{pt}}}{\mathsf{x}}{N}}(c_1){}[i])} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2463,15 +2464,15 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}{.}\mathsf{replace\_lane}~i\)¶
++ \({{\mathsf{i}}{n}}{\mathsf{x}}{N}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{replace\_lane}}~i\)¶
- -
Assert: Due to validation, a value of value type \({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n})\) is on the top of the stack.
- +
Pop the value \(({\mathit{nt}}_0{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \(({\mathit{nt}}_0{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[{}[i] = {{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_2)])}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1){}[{}[i] = {{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_2)])}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2490,8 +2491,8 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n}){.}\mathsf{const}~c_2)~(({{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}){.}\mathsf{replace\_lane}~i) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}^{{-1}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N}}(c_1){}[{}[i] = {{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_2)])} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathsf{i}}{n}){.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~(({{\mathsf{i}}{n}}{\mathsf{x}}{N}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{replace\_lane}}~i) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}^{{-1}}}}{({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathsf{i}}{n}}{\mathsf{x}}{N}}(c_1){}[{}[i] = {{\href{../exec/numerics.html#aux-packnum}{\mathrm{pack}}}}_{{\mathsf{i}}{n}}(c_2)])} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2506,12 +2507,12 @@Quick search
\end{array}\end{split}\]- \({\mathit{sh}}_1 . {{{{{\mathit{vextunop}}}{\mathsf{\_}}}{{\mathit{sh}}_2}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
+\({\mathit{sh}}_1 {.} {{\mathit{vextunop}}}{\mathsf{\_}}{{\mathit{sh}}_2}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- -
Let \(c\) be \({\href{../syntax/instructions.html#syntax-vextunop}{\mathit{vextunop}}}({\mathit{sh}}_1, {\mathit{sh}}_2, {\mathit{vextunop}}, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}, c_1)\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2529,7 +2530,7 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~({\mathit{sh}}_1 . {{{{{\mathit{vextunop}}}{\mathsf{\_}}}{{\mathit{sh}}_2}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~({\mathit{sh}}_1 {.} {{\mathit{vextunop}}}{\mathsf{\_}}{{\mathit{sh}}_2}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) &\qquad \mbox{if}~{\href{../syntax/instructions.html#syntax-vextunop}{\mathit{vextunop}}}({\mathit{sh}}_1, {\mathit{sh}}_2, {\mathit{vextunop}}, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}, c_1) = c \\ \end{array}\end{split}\]@@ -2546,14 +2547,14 @@Quick search
\end{array}\end{split}\]- \({\mathit{sh}}_1 . {{{{{\mathit{vextbinop}}}{\mathsf{\_}}}{{\mathit{sh}}_2}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
+\({\mathit{sh}}_1 {.} {{\mathit{vextbinop}}}{\mathsf{\_}}{{\mathit{sh}}_2}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- -
Let \(c\) be \({\href{../syntax/instructions.html#syntax-vextbinop}{\mathit{vextbinop}}}({\mathit{sh}}_1, {\mathit{sh}}_2, {\mathit{vextbinop}}, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}, c_1, c_2)\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2586,7 +2587,7 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~({\mathit{sh}}_1 . {{{{{\mathit{vextbinop}}}{\mathsf{\_}}}{{\mathit{sh}}_2}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({\mathit{sh}}_1 {.} {{\mathit{vextbinop}}}{\mathsf{\_}}{{\mathit{sh}}_2}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) &\qquad \mbox{if}~{\href{../syntax/instructions.html#syntax-vextbinop}{\mathit{vextbinop}}}({\mathit{sh}}_1, {\mathit{sh}}_2, {\mathit{vextbinop}}, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}, c_1, c_2) = c \\ \end{array}\end{split}\]@@ -2638,19 +2639,19 @@-Quick search
\end{array} \end{array}\end{split}\]- \({{{{{{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}{.}\mathsf{narrow}}{\mathsf{\_}}}{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
++ \({{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}{.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{narrow}}}{\mathsf{\_}}{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}\)¶
- -
Assert: Due to validation, a value is on the top of the stack.
- +
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)\) from the stack.
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)\) from the stack.
- -
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)\) from the stack.
- -
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_1)\).
- +
Let \({{\mathit{ci}}_2^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_2)\).
- +
Pop the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)\) from the stack.
- +
Let \({{\mathit{ci}}_1^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_1)\).
Let \({{\mathit{ci}}_2^\ast}\) be \({{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_2)\).
Let \({{\mathit{cj}}_1^\ast}\) be \({{{{{\href{../exec/numerics.html#op-narrow}{\mathrm{narrow}}}}_{{|{{\mathsf{i}}{n}}_1|}, {|{{\mathsf{i}}{n}}_2|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{{\mathit{ci}}_1}^\ast}\).
- -
Let \({{\mathit{cj}}_2^\ast}\) be \({{{{{\href{../exec/numerics.html#op-narrow}{\mathrm{narrow}}}}_{{|{{\mathsf{i}}{n}}_1|}, {|{{\mathsf{i}}{n}}_2|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{{\mathit{ci}}_2}^\ast}\).
- -
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}}^{{-1}}}}{({{\mathit{cj}}_1^\ast}~{{\mathit{cj}}_2^\ast})}\).
- +
Push the value \((\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}}^{{-1}}}}{({{\mathit{cj}}_1^\ast}~{{\mathit{cj}}_2^\ast})}\).
Push the value \((\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
Todo
@@ -2671,12 +2672,12 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_2)~({{{{({{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}){.}\mathsf{narrow}}{\mathsf{\_}}}{{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}}{N_1}}}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_1) \\ - &&&&\qquad {\land}~{{\mathit{ci}}_2^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_2) \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_2)~({({{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}){.}\href{../syntax/instructions.html#syntax-instr-vec}{\mathsf{narrow}}}{\mathsf{\_}}{({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1})}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{ci}}_1^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_1) \\ + &&&&\qquad {\land}~{{\mathit{ci}}_2^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_2) \\ &&&&\qquad {\land}~{{\mathit{cj}}_1^\ast} = {{{{{\href{../exec/numerics.html#op-narrow}{\mathrm{narrow}}}}_{{|{{\mathsf{i}}{n}}_1|}, {|{{\mathsf{i}}{n}}_2|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{{\mathit{ci}}_1}^\ast} \\ &&&&\qquad {\land}~{{\mathit{cj}}_2^\ast} = {{{{{\href{../exec/numerics.html#op-narrow}{\mathrm{narrow}}}}_{{|{{\mathsf{i}}{n}}_1|}, {|{{\mathsf{i}}{n}}_2|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{{\mathit{ci}}_2}^\ast} \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}}^{{-1}}}}{({{\mathit{cj}}_1^\ast}~{{\mathit{cj}}_2^\ast})} \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}}^{{-1}}}}{({{\mathit{cj}}_1^\ast}~{{\mathit{cj}}_2^\ast})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2708,9 +2709,9 @@Quick search
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(({{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}) . {{{\mathit{vcvtop}}}{\mathsf{\_}}}{{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}}{N_1}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_1) \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}, {{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {c'})^\ast})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(({{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}) {.} {{\mathit{vcvtop}}}{\mathsf{\_}}{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{c'}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_1) \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {c'})^\ast})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2750,9 +2751,9 @@\(t_2\mathsf{x}N\mathsf{.}\href{.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(({{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}) . {{{\mathit{vcvtop}}}{\mathsf{\_}}}{{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}}{N_1}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_1){}[{\href{../syntax/instructions.html#syntax-half}{\mathit{half}}}({\href{../syntax/instructions.html#syntax-half}{\mathit{half}}}, 0, N_2) : N_2] \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{{{\mathsf{i}}{n}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}, {{{{\mathsf{i}}{n}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {\mathit{ci}})^\ast})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(({{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}) {.} {{\mathit{vcvtop}}}{\mathsf{\_}}{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}}(c_1){}[{\href{../syntax/instructions.html#syntax-half}{\mathit{half}}}({\href{../syntax/instructions.html#syntax-half}{\mathit{half}}}, 0, N_2) : N_2] \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{N_1}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {\mathit{ci}})^\ast})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2789,9 +2790,9 @@\(t_2\mathsf{x}N\mathsf{.}\href{.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c_1)~(({{{\mathit{nt}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}) . {{{\mathit{vcvtop}}}{\mathsf{\_}}}{{{{\mathit{nt}}_1}{\mathsf{x}}}{N_1}}) &\hookrightarrow& (\mathsf{v{\scriptstyle128}}{.}\mathsf{const}~c) - &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{nt}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}}(c_1) \\ - &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{{\mathit{nt}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{{\mathit{nt}}_1}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_1}, {{{\mathit{nt}}_2}{\href{../syntax/instructions.html#syntax-shape}{\mathsf{x}}}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {\mathit{ci}})^\ast}~{0^{N_1}})} \\ +& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c_1)~(({{\mathit{nt}}_2}{\mathsf{x}}{N_2}) {.} {{\mathit{vcvtop}}}{\mathsf{\_}}{{{\mathit{nt}}_1}{\mathsf{x}}{N_1}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-vectype}{\mathsf{v128}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) + &\qquad \mbox{if}~{{\mathit{ci}}^\ast} = {{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{nt}}_1}{\mathsf{x}}{N_1}}(c_1) \\ + &&&&\qquad {\land}~c = {{{{\href{../exec/numerics.html#aux-lanes}{\mathrm{lanes}}}}_{{{\mathit{nt}}_2}{\mathsf{x}}{N_2}}^{{-1}}}}{({{\href{../syntax/instructions.html#syntax-vcvtop}{\mathit{vcvtop}}}({{\mathit{nt}}_1}{\mathsf{x}}{N_1}, {{\mathit{nt}}_2}{\mathsf{x}}{N_2}, {\mathit{vcvtop}}, {{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}, {\mathit{ci}})^\ast}~{0^{N_1}})} \\ \end{array}\end{split}\]\[\begin{split}\begin{array}{l} @@ -2807,158 +2808,158 @@\(t_2\mathsf{x}N\mathsf{.}\href{.
Variable Instructions¶
-- \(\mathsf{local.get}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.get}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, \(z{.}\mathsf{locals}{}[x]\) is defined.
- +
Let \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) be \(z{.}\mathsf{locals}{}[x]\).
- +
Assert: Due to validation, \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{locals}}{}[x]\) is defined.
Let \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{locals}}{}[x]\).
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{local.get}~x) &\hookrightarrow& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} - &\qquad \mbox{if}~z{.}\mathsf{locals}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.get}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} + &\qquad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{locals}}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} \\ \end{array}\end{split}\]- \(\mathsf{local.set}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.set}}~x\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- +
Perform \(z{}[\mathsf{locals}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}]\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{locals}}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}]\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{local.set}~x) &\hookrightarrow& z{}[\mathsf{locals}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}] ; \epsilon \\ +& z ; {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{locals}}{}[x] = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}] ; \epsilon \\ \end{array}\end{split}\]- \(\mathsf{local.tee}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.tee}}~x\)¶
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- +
Execute the instruction \((\mathsf{local.set}~x)\).
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.set}}~x)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{local.tee}~x) &\hookrightarrow& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{local.set}~x) \\ +& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.tee}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{local.set}}~x) \\ \end{array}\end{split}\]- \(\mathsf{global.get}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.get}}~x\)¶
- -
Let \(z\) be the current state.
- +
Let \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) be \(z{.}\mathsf{globals}{}[x]{.}\mathsf{value}\).
Let \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) be \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{globals}}{}[x]{.}\mathsf{value}\).
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{global.get}~x) &\hookrightarrow& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} - &\qquad \mbox{if}~z{.}\mathsf{globals}{}[x]{.}\mathsf{value} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.get}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} + &\qquad \mbox{if}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{globals}}{}[x]{.}\mathsf{value} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}} \\ \end{array}\end{split}\]- \(\mathsf{global.set}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.set}}~x\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- +
Perform \(z{}[\mathsf{globals}{}[x].\mathsf{value} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}]\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{globals}}{}[x]{.}\href{../exec/runtime.html#syntax-globalinst}{\mathsf{value}} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}]\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{global.set}~x) &\hookrightarrow& z{}[\mathsf{globals}{}[x].\mathsf{value} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}] ; \epsilon \\ +& z ; {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-variable}{\mathsf{global.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{globals}}{}[x]{.}\href{../exec/runtime.html#syntax-globalinst}{\mathsf{value}} = {\href{../exec/runtime.html#syntax-val}{\mathit{val}}}] ; \epsilon \\ \end{array}\end{split}\]Table Instructions¶
-- \(\mathsf{table.get}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
If \(i\) is greater than or equal to \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- -
If \(i\) is greater than or equal to \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\), then:
Trap.
- +
Push the value \(z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}{}[i]\) to the stack.
Push the value \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}{}[i]\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{table.get}~x) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~i \geq {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{table.get}~x) &\hookrightarrow& z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}{}[i] - &\qquad \mbox{if}~i < {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i \geq {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}{}[i] + &\qquad \mbox{if}~i < {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} \\ \end{array}\end{split}\]- \(\mathsf{table.set}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x\)¶
Let \(z\) be the current state.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
If \(i\) is greater than or equal to \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- -
If \(i\) is greater than or equal to \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\), then:
Trap.
- +
Perform \(z{}[\mathsf{tables}{}[x].\mathsf{refs}{}[i] = {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}]\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\href{../exec/runtime.html#syntax-tableinst}{\mathsf{elem}}{}[i] = {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}]\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{table.set}~x) &\hookrightarrow& z ; \mathsf{trap} - &\qquad \mbox{if}~i \geq {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{table.set}~x) &\hookrightarrow& z{}[\mathsf{tables}{}[x].\mathsf{refs}{}[i] = {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}] ; \epsilon - &\qquad \mbox{if}~i < {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z ; \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i \geq {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\href{../exec/runtime.html#syntax-tableinst}{\mathsf{elem}}{}[i] = {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}] ; \epsilon + &\qquad \mbox{if}~i < {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} \\ \end{array}\end{split}\]- \(\mathsf{table.size}~x\)¶
++ -\(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.size}}~x\)¶
- -
Let \(z\) be the current state.
- -
Let \(n\) be \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) to the stack.
- +
Let \(n\) be \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) to the stack.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{table.size}~x) &\hookrightarrow& (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n) - &\qquad \mbox{if}~{|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} = n \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.size}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n) + &\qquad \mbox{if}~{|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} = n \\ \end{array}\end{split}\]- \(\mathsf{table.grow}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.grow}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
Pop the value \({\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}\) from the stack.
Either:
-
- -
Let \({\mathit{ti}}\) be \({\href{../exec/modules.html#grow-table}{\mathrm{growtable}}}(z{.}\mathsf{tables}{}[x], n, {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}})\).
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|})\) to the stack.
- +
Perform \(z{}[\mathsf{tables}{}[x] = {\mathit{ti}}]\).
- +
Let \({\mathit{ti}}\) be \({\href{../exec/modules.html#grow-table}{\mathrm{growtable}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x], n, {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}})\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|})\) to the stack.
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x] = {\mathit{ti}}]\).
- @@ -2971,9 +2972,9 @@
Or:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{{{{\href{../exec/numerics.html#aux-signed}{\mathrm{signed}}}}_{32}^{{-1}}}}{({-1})})\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{{{\href{../exec/numerics.html#aux-signed}{\mathrm{signed}}}}_{32}^{{-1}}}}{({-1})})\) to the stack.
\(t_2\mathsf{x}N\mathsf{.}\href{.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.grow}~x) &\hookrightarrow& \multicolumn{2}{l@{}}{ z{}[\mathsf{tables}{}[x] = {\mathit{ti}}] ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{\mathit{ti}} = {\href{../exec/modules.html#grow-table}{\mathrm{growtable}}}(z{.}\mathsf{tables}{}[x], n, {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}})} \\ -& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.grow}~x) &\hookrightarrow& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~{{{{\href{../exec/numerics.html#aux-signed}{\mathrm{signed}}}}_{32}^{{-1}}}}{({-1})}) \\ +& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.grow}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x] = {\mathit{ti}}] ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{\mathit{ti}} = {\href{../exec/modules.html#grow-table}{\mathrm{growtable}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x], n, {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}})} \\ +& z ; {\href{../exec/runtime.html#syntax-ref}{\mathit{ref}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.grow}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{{{\href{../exec/numerics.html#aux-signed}{\mathrm{signed}}}}_{32}^{{-1}}}}{({-1})}) \\ \end{array}\end{split}\]-Note
@@ -2985,17 +2986,17 @@\(t_2\mathsf{x}N\mathsf{.}\href{. In practice, the choice depends on the resources available to the embedder.
- \(\mathsf{table.fill}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
Assert: Due to validation, a value is on the top of the stack.
- -
Pop the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
If \(i + n\) is greater than \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
If \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\), then:
- @@ -3011,45 +3012,45 @@
Trap.
\(t_2\mathsf{x}N\mathsf{.}\href{.
Else:
-
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- -
Execute the instruction \((\mathsf{table.set}~x)\).
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x)\).
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- -
Push the value \({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{table.fill}~x)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.fill}~x) &\hookrightarrow& \mathsf{trap} - &\qquad \mbox{if}~i + n > {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.fill}~x) &\hookrightarrow& \epsilon +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} + &\qquad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \epsilon &\qquad \mbox{otherwise, if}~n = 0 \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.fill}~x) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{table.set}~x) \\ (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{table.fill}~x) \end{array} } +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) \\ (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}~x) \end{array} } &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]-- \(\mathsf{table.copy}~x~y\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) from the stack.
If \(i + n\) is greater than \({|z{.}\mathsf{tables}{}[y]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) from the stack.
- -
If \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[y]{.}\mathsf{refs}|}\), then:
Trap.
If \(j + n\) is greater than \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\), then:
+If \(j + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\), then:
- @@ -3066,64 +3067,64 @@
Trap.
\(t_2\mathsf{x}N\mathsf{.}\href{.
If \(j\) is less than or equal to \(i\), then:
-
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- -
Execute the instruction \((\mathsf{table.get}~y)\).
- -
Execute the instruction \((\mathsf{table.set}~x)\).
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~y)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- -
Else:
-
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + n - 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + n - 1)\) to the stack.
- -
Execute the instruction \((\mathsf{table.get}~y)\).
- -
Execute the instruction \((\mathsf{table.set}~x)\).
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) to the stack.
- +
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + n - 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + n - 1)\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~y)\).
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) to the stack.
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{table.copy}~x~y)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.copy}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\mathsf{tables}{}[y]{.}\mathsf{refs}|} \lor j + n > {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.copy}~x~y) &\hookrightarrow& \epsilon +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[y]{.}\mathsf{refs}|} \lor j + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \epsilon &\qquad \mbox{otherwise, if}~n = 0 \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.copy}~x~y) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{table.get}~y)~(\mathsf{table.set}~x) \\ (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{table.copy}~x~y) \end{array} } +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~y)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) \\ (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) \end{array} } &\qquad \mbox{otherwise, if}~j \leq i \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.copy}~x~y) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + n - 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + n - 1)~(\mathsf{table.get}~y)~(\mathsf{table.set}~x) \\ (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{table.copy}~x~y) \end{array} } +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + n - 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + n - 1)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}~y)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) \\ (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}~x~y) \end{array} } &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]-- \(\mathsf{table.init}~x~y\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- -
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) from the stack.
If \(i + n\) is greater than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
- +
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) from the stack.
- -
If \(i + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
Trap.
If \(j + n\) is greater than \({|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}\), then:
+If \(j + n\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}\), then:
--
- @@ -3135,38 +3136,38 @@
Trap.
\(t_2\mathsf{x}N\mathsf{.}\href{.
Do nothing.
Else if \(i\) is less than \({|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|}\), then:
+Else if \(i\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|}\), then:
-
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)\) to the stack.
- -
Push the value \(z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[i]\) to the stack.
- -
Execute the instruction \((\mathsf{table.set}~x)\).
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)\) to the stack.
- -
Push the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)\) to the stack.
- +
Execute the instruction \((\mathsf{table.init}~x~y)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)\) to the stack.
- +
Push the value \(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[i]\) to the stack.
- +
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x)\).
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)\) to the stack.
- +
Push the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)\) to the stack.
Execute the instruction \((\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y)\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.init}~x~y) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}|} \lor j + n > {|z{.}\mathsf{tables}{}[x]{.}\mathsf{refs}|}} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.init}~x~y) &\hookrightarrow& \epsilon +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + & \multicolumn{4}{@{}l@{}}{\qquad\quad \mbox{if}~i + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}|} \lor j + n > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{tables}}{}[x]{.}\mathsf{refs}|}} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \epsilon &\qquad \mbox{otherwise, if}~n = 0 \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n)~(\mathsf{table.init}~x~y) &\hookrightarrow& \\ - & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j)~z{.}\mathsf{elems}{}[y]{.}\mathsf{refs}{}[i]~(\mathsf{table.set}~x) \\ (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~j + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i + 1)~(\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~n - 1)~(\mathsf{table.init}~x~y) \end{array} } +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \\ + & \multicolumn{3}{@{}l@{}}{\qquad \begin{array}[t]{@{}l@{}} (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j)~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[y]{.}\mathsf{refs}{}[i]~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}~x) \\ (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~j + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i + 1)~(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~n - 1)~(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}~x~y) \end{array} } &\qquad \mbox{otherwise} \\ \end{array}\end{split}\]-- @@ -3180,25 +3181,25 @@\(\mathsf{elem.drop}~x\)¶
++ \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{elem.drop}}~x\)¶
- -
Let \(z\) be the current state.
- +
Perform \(z{}[\mathsf{elems}{}[x].\mathsf{refs} = \epsilon]\).
Perform \(z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[x]{.}\href{../exec/runtime.html#syntax-eleminst}{\mathsf{elem}} = \epsilon]\).
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{elem.drop}~x) &\hookrightarrow& z{}[\mathsf{elems}{}[x].\mathsf{refs} = \epsilon] ; \epsilon \\ +& z ; (\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{elem.drop}}~x) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& z{}[\href{../exec/runtime.html#syntax-store}{\mathsf{elems}}{}[x]{.}\href{../exec/runtime.html#syntax-eleminst}{\mathsf{elem}} = \epsilon] ; \epsilon \\ \end{array}\end{split}\]\(t_2\mathsf{x}N\mathsf{.}\href{. Unaligned access violating that property is still allowed and must succeed regardless of the annotation. However, it may be substantially slower on some hardware.
- \({{\mathit{numty}}_{\mathit{u{\scriptstyle0}}}{.}\mathsf{load}}{{{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{{\mathit{sx}}_{\mathit{u{\scriptstyle1}}}}^?}}~x~{\mathit{ao}}\)¶
++ \({{\mathit{numty}}_{\mathit{u{\scriptstyle0}}}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}}{{{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{{\mathit{sx}}_{\mathit{u{\scriptstyle1}}}}^?}}~x~{\mathit{ao}}\)¶
- -
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
- @@ -3210,7 +3211,7 @@
If \({{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{{\mathit{sx}}_{\mathit{u{\scriptstyle1}}}}^?}\) is not defined, then:
- -
Let \({\mathit{nt}}\) be \({\mathit{numty}}_{\mathit{u{\scriptstyle0}}}\).
If \(i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8\) is greater than \({|z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}|}\), then:
+- -
If \(i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}|}\), then:
Trap.
- -
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{nbytes}}}({\mathit{nt}}, z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : {|{\mathit{nt}}|} / 8])\).
- +
Push the value \(({\mathit{nt}}{.}\mathsf{const}~c)\) to the stack.
- +
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{nbytes}}}({\mathit{nt}}, z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : {|{\mathit{nt}}|} / 8])\).
Push the value \(({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) to the stack.
\(t_2\mathsf{x}N\mathsf{.}\href{.
Let \(y_0\) be \({{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{{\mathit{sx}}_{\mathit{u{\scriptstyle1}}}}^?}\).
- -
Let \((n,\, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}})\) be \(y_0\).
If \(i + {\mathit{ao}}{.}\mathsf{offset} + n / 8\) is greater than \({|z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}|}\), then:
+If \(i + {\mathit{ao}}{.}\mathsf{offset} + n / 8\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}|}\), then:
-
- @@ -3226,8 +3227,8 @@
Trap.
\(t_2\mathsf{x}N\mathsf{.}\href{.
@@ -3275,14 +3276,14 @@
Let \(y_0\) be \({{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{{\mathit{sx}}_{\mathit{u{\scriptstyle1}}}}^?}\).
- -
Let \((n,\, {\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}})\) be \(y_0\).
- -
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{ibytes}}}(n, z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : n / 8])\).
- +
Push the value \(({\mathsf{i}}{n}{.}\mathsf{const}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{n, {|{\mathsf{i}}{n}|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(c)})\) to the stack.
- +
Let \(c\) be \({\mathrm{inverse}}_{{\mathit{of}}_{\mathit{ibytes}}}(n, z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : n / 8])\).
Push the value \(({\mathsf{i}}{n}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{n, {|{\mathsf{i}}{n}|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(c)})\) to the stack.
\(t_2\mathsf{x}N\mathsf{.}\href{.
\[\begin{split}\begin{array}{@{}l@{}rcl@{}l@{}} -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({\mathit{nt}}{.}\mathsf{load}~x~{\mathit{ao}}) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8 > {|z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}|}} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({\mathit{nt}}{.}\mathsf{load}~x~{\mathit{ao}}) &\hookrightarrow& \multicolumn{2}{l@{}}{ ({\mathit{nt}}{.}\mathsf{const}~c) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{nt}}}(c) = z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : {|{\mathit{nt}}|} / 8]} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({{\mathsf{i}}{n}{.}\mathsf{load}}{{{n}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}~x~{\mathit{ao}}) &\hookrightarrow& \multicolumn{2}{l@{}}{ \mathsf{trap} } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~i + {\mathit{ao}}{.}\mathsf{offset} + n / 8 > {|z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}|}} \\ -& z ; (\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)~({{\mathsf{i}}{n}{.}\mathsf{load}}{{{n}{\mathsf{\_}}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}~x~{\mathit{ao}}) &\hookrightarrow& \multicolumn{2}{l@{}}{ ({\mathsf{i}}{n}{.}\mathsf{const}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{n, {|{\mathsf{i}}{n}|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(c)}) } \\ - &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathsf{i}}{n}}(c) = z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : n / 8]} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~x~{\mathit{ao}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8 > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}|}} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}~x~{\mathit{ao}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ ({\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\mathit{nt}}}(c) = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : {|{\mathit{nt}}|} / 8]} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({{\mathsf{i}}{n}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}}{{n}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}~x~{\mathit{ao}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ \href{../exec/runtime.html#syntax-trap}{\mathsf{trap}} } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~i + {\mathit{ao}}{.}\mathsf{offset} + n / 8 > {|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}|}} \\ +& z ; (\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)~({{\mathsf{i}}{n}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{load}}}{{n}{\mathsf{\_}}{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}~x~{\mathit{ao}}) &\href{../exec/conventions.html#exec-notation}{\hookrightarrow}& \multicolumn{2}{l@{}}{ ({\mathsf{i}}{n}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~{{{{\href{../exec/numerics.html#op-ext}{\mathrm{extend}}}}_{n, {|{\mathsf{i}}{n}|}}^{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}}}}{(c)}) } \\ + &&& \multicolumn{2}{l@{}}{\quad \mbox{if}~{{\href{../exec/numerics.html#aux-bytes}{\mathrm{bytes}}}}_{{\href{../syntax/types.html#syntax-numtype}{\mathit{numtype}}}{n}}(c) = z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}{}[i + {\mathit{ao}}{.}\mathsf{offset} : n / 8]} \\ \end{array}\end{split}\]@@ -3485,18 +3486,18 @@ \(t_2\mathsf{x}N\mathsf{.}\href{. (\mathrel{\mbox{otherwise}}) \\ \end{array}\end{split}\]
- \({{\mathit{nt}}{.}\mathsf{store}}{{{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{\mathit{u{\scriptstyle1}}}^?}}~x~{\mathit{ao}}\)¶
++ \({{\mathit{nt}}{.}\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{store}}}{{{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{\mathit{u{\scriptstyle1}}}^?}}~x~{\mathit{ao}}\)¶
Let \(z\) be the current state.
- -
Assert: Due to validation, a value of value type \({\mathit{numty}}_{\mathit{u{\scriptstyle0}}}\) is on the top of the stack.
- -
Pop the value \(({\mathit{numty}}_{\mathit{u{\scriptstyle0}}}{.}\mathsf{const}~c)\) from the stack.
- -
Assert: Due to validation, a value of value type \(\mathsf{i{\scriptstyle32}}\) is on the top of the stack.
- +
Pop the value \((\mathsf{i{\scriptstyle32}}{.}\mathsf{const}~i)\) from the stack.
- +
Pop the value \(({\mathit{numty}}_{\mathit{u{\scriptstyle0}}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~c)\) from the stack.
- +
Assert: Due to validation, a value of value type \(\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}\) is on the top of the stack.
Pop the value \((\href{../syntax/types.html#syntax-numtype}{\mathsf{i32}}{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{const}}~i)\) from the stack.
If \({\mathit{numty}}_{\mathit{u{\scriptstyle0}}}\) is \({\mathit{nt}}\), then:
-
If \(i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8\) is greater than \({|z{.}\mathsf{mems}{}[x]{.}\mathsf{bytes}|}\) and \({{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{\mathit{u{\scriptstyle1}}}^?}\) is not defined, then:
+If \(i + {\mathit{ao}}{.}\mathsf{offset} + {|{\mathit{nt}}|} / 8\) is greater than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{mems}}{}[x]{.}\mathsf{bytes}|}\) and \({{\href{../syntax/instructions.html#syntax-sz}{\mathit{sz}}}_{\mathit{u{\scriptstyle1}}}^?}\) is not defined, then: