wasm-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/build/wasm-proposals-main.json +1 -0
- package/build/wasm-sections-js-api-main.json +1 -0
- package/build/wasm-sections-web-api-main.json +1 -0
- package/build/wasm-spec-core-main.json +1 -0
- package/dist/mcp/_args.d.ts +22 -0
- package/dist/mcp/_args.js +25 -0
- package/dist/mcp/instructions.d.ts +1 -0
- package/dist/mcp/instructions.js +67 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +63 -0
- package/dist/mcp/tool_meta.d.ts +32 -0
- package/dist/mcp/tool_meta.js +100 -0
- package/dist/mcp/tools/instruction_get.d.ts +32 -0
- package/dist/mcp/tools/instruction_get.js +39 -0
- package/dist/mcp/tools/instruction_list.d.ts +67 -0
- package/dist/mcp/tools/instruction_list.js +52 -0
- package/dist/mcp/tools/instruction_search.d.ts +28 -0
- package/dist/mcp/tools/instruction_search.js +33 -0
- package/dist/mcp/tools/proposal_list.d.ts +51 -0
- package/dist/mcp/tools/proposal_list.js +44 -0
- package/dist/mcp/tools/section_get.d.ts +29 -0
- package/dist/mcp/tools/section_get.js +32 -0
- package/dist/mcp/tools/section_list.d.ts +49 -0
- package/dist/mcp/tools/section_list.js +56 -0
- package/dist/mcp/tools/spec_search.d.ts +35 -0
- package/dist/mcp/tools/spec_search.js +34 -0
- package/dist/mcp/tools/spec_version.d.ts +28 -0
- package/dist/mcp/tools/spec_version.js +30 -0
- package/dist/mcp/tools/type_get.d.ts +22 -0
- package/dist/mcp/tools/type_get.js +31 -0
- package/dist/parser/bikeshed.d.ts +8 -0
- package/dist/parser/bikeshed.js +106 -0
- package/dist/parser/instructions.d.ts +171 -0
- package/dist/parser/instructions.js +241 -0
- package/dist/parser/proposals.d.ts +30 -0
- package/dist/parser/proposals.js +188 -0
- package/dist/parser/sections.d.ts +27 -0
- package/dist/parser/sections.js +213 -0
- package/dist/parser/types.d.ts +37 -0
- package/dist/parser/types.js +116 -0
- package/dist/parser/upstream.d.ts +7 -0
- package/dist/parser/upstream.js +230 -0
- package/dist/paths.d.ts +3 -0
- package/dist/paths.js +12 -0
- package/dist/spec/catalog.d.ts +10 -0
- package/dist/spec/catalog.js +20 -0
- package/dist/spec/instructions_query.d.ts +46 -0
- package/dist/spec/instructions_query.js +120 -0
- package/dist/spec/pin.d.ts +13 -0
- package/dist/spec/pin.js +39 -0
- package/dist/spec/proposals_query.d.ts +15 -0
- package/dist/spec/proposals_query.js +23 -0
- package/dist/spec/sections_query.d.ts +43 -0
- package/dist/spec/sections_query.js +89 -0
- package/dist/spec/spec_data.d.ts +46 -0
- package/dist/spec/spec_data.js +92 -0
- package/dist/spec/tool_inventory.d.ts +5 -0
- package/dist/spec/tool_inventory.js +17 -0
- package/dist/versions.d.ts +12 -0
- package/dist/versions.js +22 -0
- package/package.json +76 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"pin":{"key":"spec/main","sha":"7a366e1531e6aab089c9a07ae5608909e187bb13","spec":"core","version":"main"},"instructions":[{"mnemonic":"unreachable","opcodes":[0],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-unreachable","execution":"exec-unreachable"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unreachable","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unreachable"}},{"mnemonic":"nop","opcodes":[1],"category":"control","version":"1.0","signature":{"params_raw":"[]","results_raw":"[]"},"anchors":{"validation":"valid-nop","execution":"exec-nop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-nop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-nop"}},{"mnemonic":"block","opcodes":[2],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-block","execution":"exec-block"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-block","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-block"}},{"mnemonic":"loop","opcodes":[3],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-loop","execution":"exec-loop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-loop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-loop"}},{"mnemonic":"if","opcodes":[4],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast~\\I32]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-if","execution":"exec-if"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-if","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-if"}},{"mnemonic":"throw","opcodes":[8],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast~t_x^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-throw","execution":"exec-throw"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-throw","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-throw"}},{"mnemonic":"throw_ref","opcodes":[10],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast~\\EXNREF]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-throw_ref","execution":"exec-throw_ref"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-throw_ref","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-throw_ref"}},{"mnemonic":"br","opcodes":[12],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast~t^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-br","execution":"exec-br"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br"}},{"mnemonic":"br_if","opcodes":[13],"category":"control","version":"1.0","signature":{"params_raw":"[t^\\ast~\\I32]","results_raw":"[t^\\ast]"},"anchors":{"validation":"valid-br_if","execution":"exec-br_if"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_if","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_if"}},{"mnemonic":"br_table","opcodes":[14],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast~t^\\ast~\\I32]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-br_table","execution":"exec-br_table"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_table","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_table"}},{"mnemonic":"return","opcodes":[15],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast~t^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-return","execution":"exec-return"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return"}},{"mnemonic":"call","opcodes":[16],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-call","execution":"exec-call"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call"}},{"mnemonic":"call_indirect","opcodes":[17],"category":"control","version":"1.0","signature":{"params_raw":"[t_1^\\ast~\\I32]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-call_indirect","execution":"exec-call_indirect"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call_indirect","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call_indirect"}},{"mnemonic":"return_call","opcodes":[18],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-return_call","execution":"exec-return_call"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call"}},{"mnemonic":"return_call_indirect","opcodes":[19],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast~\\I32]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-return_call_indirect","execution":"exec-return_call_indirect"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call_indirect","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call_indirect"}},{"mnemonic":"call_ref","opcodes":[20],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast~(\\REF~\\NULL~x)]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-call_ref","execution":"exec-call_ref"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call_ref","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call_ref"}},{"mnemonic":"return_call_ref","opcodes":[21],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast~(\\REF~\\NULL~x)]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-return_call_ref","execution":"exec-return_call_ref"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call_ref","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call_ref"}},{"mnemonic":"drop","opcodes":[26],"category":"parametric","version":"1.0","signature":{"params_raw":"[t]","results_raw":"[]"},"anchors":{"validation":"valid-drop","execution":"exec-drop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-drop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-drop"}},{"mnemonic":"select","opcodes":[27],"category":"parametric","version":"1.0","signature":{"params_raw":"[t~t~\\I32]","results_raw":"[t]"},"anchors":{"validation":"valid-select","execution":"exec-select"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-select","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-select"}},{"mnemonic":"select","opcodes":[28],"category":"parametric","version":"2.0","signature":{"params_raw":"[t~t~\\I32]","results_raw":"[t]"},"anchors":{"validation":"valid-select","execution":"exec-select"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-select","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-select"}},{"mnemonic":"try_table","opcodes":[31],"category":"control","version":"3.0","signature":{"params_raw":"[t_1^\\ast]","results_raw":"[t_2^\\ast]"},"anchors":{"validation":"valid-try_table","execution":"exec-try_table"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-try_table","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-try_table"}},{"mnemonic":"local.get","opcodes":[32],"category":"variable","version":"1.0","signature":{"params_raw":"[]","results_raw":"[t]"},"anchors":{"validation":"valid-local.get","execution":"exec-local.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.get"}},{"mnemonic":"local.set","opcodes":[33],"category":"variable","version":"1.0","signature":{"params_raw":"[t]","results_raw":"[]"},"anchors":{"validation":"valid-local.set","execution":"exec-local.set"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.set","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.set"}},{"mnemonic":"local.tee","opcodes":[34],"category":"variable","version":"1.0","signature":{"params_raw":"[t]","results_raw":"[t]"},"anchors":{"validation":"valid-local.tee","execution":"exec-local.tee"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.tee","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.tee"}},{"mnemonic":"global.get","opcodes":[35],"category":"variable","version":"1.0","signature":{"params_raw":"[]","results_raw":"[t]"},"anchors":{"validation":"valid-global.get","execution":"exec-global.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-global.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-global.get"}},{"mnemonic":"global.set","opcodes":[36],"category":"variable","version":"1.0","signature":{"params_raw":"[t]","results_raw":"[]"},"anchors":{"validation":"valid-global.set","execution":"exec-global.set"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-global.set","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-global.set"}},{"mnemonic":"table.get","opcodes":[37],"category":"table","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[t]"},"anchors":{"validation":"valid-table.get","execution":"exec-table.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.get"}},{"mnemonic":"table.set","opcodes":[38],"category":"table","version":"2.0","signature":{"params_raw":"[\\X{at}~t]","results_raw":"[]"},"anchors":{"validation":"valid-table.set","execution":"exec-table.set"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.set","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.set"}},{"mnemonic":"i32.load","opcodes":[40],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-load-val","execution":"exec-load-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-val"}},{"mnemonic":"i64.load","opcodes":[41],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-val","execution":"exec-load-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-val"}},{"mnemonic":"f32.load","opcodes":[42],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-load-val","execution":"exec-load-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-val"}},{"mnemonic":"f64.load","opcodes":[43],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-load-val","execution":"exec-load-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-val"}},{"mnemonic":"i32.load8_s","opcodes":[44],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i32.load8_u","opcodes":[45],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i32.load16_s","opcodes":[46],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i32.load16_u","opcodes":[47],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load8_s","opcodes":[48],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load8_u","opcodes":[49],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load16_s","opcodes":[50],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load16_u","opcodes":[51],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load32_s","opcodes":[52],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i64.load32_u","opcodes":[53],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-load-pack","execution":"exec-load-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-pack"}},{"mnemonic":"i32.store","opcodes":[54],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-store-val","execution":"exec-store-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-val"}},{"mnemonic":"i64.store","opcodes":[55],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I64]","results_raw":"[]"},"anchors":{"validation":"valid-store-val","execution":"exec-store-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-val"}},{"mnemonic":"f32.store","opcodes":[56],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\F32]","results_raw":"[]"},"anchors":{"validation":"valid-store-val","execution":"exec-store-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-val"}},{"mnemonic":"f64.store","opcodes":[57],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\F64]","results_raw":"[]"},"anchors":{"validation":"valid-store-val","execution":"exec-store-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-val"}},{"mnemonic":"i32.store8","opcodes":[58],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-store-pack","execution":"exec-store-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-pack"}},{"mnemonic":"i32.store16","opcodes":[59],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-store-pack","execution":"exec-store-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-pack"}},{"mnemonic":"i64.store8","opcodes":[60],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I64]","results_raw":"[]"},"anchors":{"validation":"valid-store-pack","execution":"exec-store-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-pack"}},{"mnemonic":"i64.store16","opcodes":[61],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I64]","results_raw":"[]"},"anchors":{"validation":"valid-store-pack","execution":"exec-store-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-pack"}},{"mnemonic":"i64.store32","opcodes":[62],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}~\\I64]","results_raw":"[]"},"anchors":{"validation":"valid-store-pack","execution":"exec-store-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-pack"}},{"mnemonic":"memory.size","opcodes":[63],"category":"memory","version":"1.0","signature":{"params_raw":"[]","results_raw":"[\\X{at}]"},"anchors":{"validation":"valid-memory.size","execution":"exec-memory.size"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.size","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.size"}},{"mnemonic":"memory.grow","opcodes":[64],"category":"memory","version":"1.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\X{at}]"},"anchors":{"validation":"valid-memory.grow","execution":"exec-memory.grow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.grow","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.grow"}},{"mnemonic":"i32.const","opcodes":[65],"category":"numeric","version":"1.0","signature":{"params_raw":"[]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-const","execution":"exec-const"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-const","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-const"}},{"mnemonic":"i64.const","opcodes":[66],"category":"numeric","version":"1.0","signature":{"params_raw":"[]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-const","execution":"exec-const"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-const","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-const"}},{"mnemonic":"f32.const","opcodes":[67],"category":"numeric","version":"1.0","signature":{"params_raw":"[]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-const","execution":"exec-const"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-const","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-const"}},{"mnemonic":"f64.const","opcodes":[68],"category":"numeric","version":"1.0","signature":{"params_raw":"[]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-const","execution":"exec-const"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-const","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-const"}},{"mnemonic":"i32.eqz","opcodes":[69],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-testop","execution":"exec-testop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-testop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-testop"}},{"mnemonic":"i32.eq","opcodes":[70],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.ne","opcodes":[71],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.lt_s","opcodes":[72],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.lt_u","opcodes":[73],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.gt_s","opcodes":[74],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.gt_u","opcodes":[75],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.le_s","opcodes":[76],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.le_u","opcodes":[77],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.ge_s","opcodes":[78],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.ge_u","opcodes":[79],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.eqz","opcodes":[80],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-testop","execution":"exec-testop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-testop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-testop"}},{"mnemonic":"i64.eq","opcodes":[81],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.ne","opcodes":[82],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.lt_s","opcodes":[83],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.lt_u","opcodes":[84],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.gt_s","opcodes":[85],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.gt_u","opcodes":[86],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.le_s","opcodes":[87],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.le_u","opcodes":[88],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.ge_s","opcodes":[89],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i64.ge_u","opcodes":[90],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.eq","opcodes":[91],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.ne","opcodes":[92],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.lt","opcodes":[93],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.gt","opcodes":[94],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.le","opcodes":[95],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f32.ge","opcodes":[96],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.eq","opcodes":[97],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.ne","opcodes":[98],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.lt","opcodes":[99],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.gt","opcodes":[100],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.le","opcodes":[101],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"f64.ge","opcodes":[102],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-relop","execution":"exec-relop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"}},{"mnemonic":"i32.clz","opcodes":[103],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i32.ctz","opcodes":[104],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i32.popcnt","opcodes":[105],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i32.add","opcodes":[106],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.sub","opcodes":[107],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.mul","opcodes":[108],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.div_s","opcodes":[109],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.div_u","opcodes":[110],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.rem_s","opcodes":[111],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.rem_u","opcodes":[112],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.and","opcodes":[113],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.or","opcodes":[114],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.xor","opcodes":[115],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.shl","opcodes":[116],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.shr_s","opcodes":[117],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.shr_u","opcodes":[118],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.rotl","opcodes":[119],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.rotr","opcodes":[120],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.clz","opcodes":[121],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.ctz","opcodes":[122],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.popcnt","opcodes":[123],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.add","opcodes":[124],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.sub","opcodes":[125],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.mul","opcodes":[126],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.div_s","opcodes":[127],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.div_u","opcodes":[128],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.rem_s","opcodes":[129],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.rem_u","opcodes":[130],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.and","opcodes":[131],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.or","opcodes":[132],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.xor","opcodes":[133],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.shl","opcodes":[134],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.shr_s","opcodes":[135],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.shr_u","opcodes":[136],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.rotl","opcodes":[137],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i64.rotr","opcodes":[138],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64~\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.abs","opcodes":[139],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.neg","opcodes":[140],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.ceil","opcodes":[141],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.floor","opcodes":[142],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.trunc","opcodes":[143],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.nearest","opcodes":[144],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.sqrt","opcodes":[145],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f32.add","opcodes":[146],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.sub","opcodes":[147],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.mul","opcodes":[148],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.div","opcodes":[149],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.min","opcodes":[150],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.max","opcodes":[151],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f32.copysign","opcodes":[152],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32~\\F32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.abs","opcodes":[153],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.neg","opcodes":[154],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.ceil","opcodes":[155],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.floor","opcodes":[156],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.trunc","opcodes":[157],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.nearest","opcodes":[158],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.sqrt","opcodes":[159],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"f64.add","opcodes":[160],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.sub","opcodes":[161],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.mul","opcodes":[162],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.div","opcodes":[163],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.min","opcodes":[164],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.max","opcodes":[165],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"f64.copysign","opcodes":[166],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64~\\F64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-binop","execution":"exec-binop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"}},{"mnemonic":"i32.wrap_i64","opcodes":[167],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_f32_s","opcodes":[168],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_f32_u","opcodes":[169],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_f64_s","opcodes":[170],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_f64_u","opcodes":[171],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.extend_i32_s","opcodes":[172],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.extend_i32_u","opcodes":[173],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_f32_s","opcodes":[174],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_f32_u","opcodes":[175],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_f64_s","opcodes":[176],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_f64_u","opcodes":[177],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.convert_i32_s","opcodes":[178],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.convert_i32_u","opcodes":[179],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.convert_i64_s","opcodes":[180],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.convert_i64_u","opcodes":[181],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.demote_f64","opcodes":[182],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.convert_i32_s","opcodes":[183],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.convert_i32_u","opcodes":[184],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.convert_i64_s","opcodes":[185],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.convert_i64_u","opcodes":[186],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.promote_f32","opcodes":[187],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.reinterpret_f32","opcodes":[188],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.reinterpret_f64","opcodes":[189],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f32.reinterpret_i32","opcodes":[190],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"f64.reinterpret_i64","opcodes":[191],"category":"numeric","version":"1.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.extend8_s","opcodes":[192],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i32.extend16_s","opcodes":[193],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.extend8_s","opcodes":[194],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.extend16_s","opcodes":[195],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"i64.extend32_s","opcodes":[196],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-unop","execution":"exec-unop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"}},{"mnemonic":"ref.null","opcodes":[208],"category":"ref","version":"2.0","signature":{"params_raw":"[]","results_raw":"[(\\REF~\\NULL~\\X{ht})]"},"anchors":{"validation":"valid-ref.null","execution":"exec-ref.null"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.null","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.null"}},{"mnemonic":"ref.is_null","opcodes":[209],"category":"ref","version":"2.0","signature":{"params_raw":"[(\\REF~\\NULL~\\X{ht})]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-ref.is_null","execution":"exec-ref.is_null"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.is_null","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.is_null"}},{"mnemonic":"ref.func","opcodes":[210],"category":"ref","version":"2.0","signature":{"params_raw":"[]","results_raw":"[\\REF~\\X{ht}]"},"anchors":{"validation":"valid-ref.func","execution":"exec-ref.func"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.func","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.func"}},{"mnemonic":"ref.eq","opcodes":[211],"category":"ref","version":"3.0","signature":{"params_raw":"[\\EQREF~\\EQREF]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-ref.eq","execution":"exec-ref.eq"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.eq","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.eq"}},{"mnemonic":"ref.as_non_null","opcodes":[212],"category":"ref","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~\\X{ht})]","results_raw":"[(\\REF~\\X{ht})]"},"anchors":{"validation":"valid-ref.as_non_null","execution":"exec-ref.as_non_null"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.as_non_null","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.as_non_null"}},{"mnemonic":"br_on_null","opcodes":[213],"category":"control","version":"3.0","signature":{"params_raw":"[t^\\ast~(\\REF~\\NULL~\\X{ht})]","results_raw":"[t^\\ast~(\\REF~\\X{ht})]"},"anchors":{"validation":"valid-br_on_null","execution":"exec-br_on_null"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_null","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_null"}},{"mnemonic":"br_on_non_null","opcodes":[214],"category":"control","version":"3.0","signature":{"params_raw":"[t^\\ast~(\\REF~\\NULL~\\X{ht})]","results_raw":"[t^\\ast]"},"anchors":{"validation":"valid-br_on_non_null","execution":"exec-br_on_non_null"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_non_null","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_non_null"}},{"mnemonic":"struct.new","opcodes":[251,0],"category":"struct","version":"3.0","signature":{"params_raw":"[t^\\ast]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-struct.new","execution":"exec-struct.new"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.new","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.new"}},{"mnemonic":"struct.new_default","opcodes":[251,1],"category":"struct","version":"3.0","signature":{"params_raw":"[]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-struct.new_default","execution":"exec-struct.new_default"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.new_default","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.new_default"}},{"mnemonic":"struct.get","opcodes":[251,2],"category":"struct","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)]","results_raw":"[t]"},"anchors":{"validation":"valid-struct.get","execution":"exec-struct.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.get"}},{"mnemonic":"struct.get_s","opcodes":[251,3],"category":"struct","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-struct.get","execution":"exec-struct.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.get"}},{"mnemonic":"struct.get_u","opcodes":[251,4],"category":"struct","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-struct.get","execution":"exec-struct.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.get"}},{"mnemonic":"struct.set","opcodes":[251,5],"category":"struct","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~t]","results_raw":"[]"},"anchors":{"validation":"valid-struct.set","execution":"exec-struct.set"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.set","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.set"}},{"mnemonic":"array.new","opcodes":[251,6],"category":"array","version":"3.0","signature":{"params_raw":"[t~\\I32]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-array.new","execution":"exec-array.new"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new"}},{"mnemonic":"array.new_default","opcodes":[251,7],"category":"array","version":"3.0","signature":{"params_raw":"[\\I32]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-array.new","execution":"exec-array.new"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new"}},{"mnemonic":"array.new_fixed","opcodes":[251,8],"category":"array","version":"3.0","signature":{"params_raw":"[t^n]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-array.new_fixed","execution":"exec-array.new_fixed"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_fixed","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_fixed"}},{"mnemonic":"array.new_data","opcodes":[251,9],"category":"array","version":"3.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-array.new_data","execution":"exec-array.new_data"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_data","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_data"}},{"mnemonic":"array.new_elem","opcodes":[251,10],"category":"array","version":"3.0","signature":{"params_raw":"[\\I32~\\I32]","results_raw":"[(\\REF~x)]"},"anchors":{"validation":"valid-array.new_elem","execution":"exec-array.new_elem"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_elem","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_elem"}},{"mnemonic":"array.get","opcodes":[251,11],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32]","results_raw":"[t]"},"anchors":{"validation":"valid-array.get","execution":"exec-array.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.get"}},{"mnemonic":"array.get_s","opcodes":[251,12],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-array.get","execution":"exec-array.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.get"}},{"mnemonic":"array.get_u","opcodes":[251,13],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-array.get","execution":"exec-array.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.get"}},{"mnemonic":"array.set","opcodes":[251,14],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32~t]","results_raw":"[]"},"anchors":{"validation":"valid-array.set","execution":"exec-array.set"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.set","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.set"}},{"mnemonic":"array.len","opcodes":[251,15],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~\\ARRAY)]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-array.len","execution":"exec-array.len"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.len","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.len"}},{"mnemonic":"array.fill","opcodes":[251,16],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32~t~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-array.fill","execution":"exec-array.fill"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.fill","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.fill"}},{"mnemonic":"array.copy","opcodes":[251,17],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32~(\\REF~\\NULL~y)~\\I32~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-array.copy","execution":"exec-array.copy"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.copy","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.copy"}},{"mnemonic":"array.init_data","opcodes":[251,18],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32~\\I32~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-array.init_data","execution":"exec-array.init_data"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.init_data","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.init_data"}},{"mnemonic":"array.init_elem","opcodes":[251,19],"category":"array","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~x)~\\I32~\\I32~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-array.init_elem","execution":"exec-array.init_elem"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.init_elem","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.init_elem"}},{"mnemonic":"ref.test","opcodes":[251,20],"category":"ref","version":"3.0","signature":{"params_raw":"[(\\REF~t')]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-ref.test","execution":"exec-ref.test"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.test","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.test"}},{"mnemonic":"ref.test","opcodes":[251,21],"category":"ref","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~t')]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-ref.test","execution":"exec-ref.test"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.test","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.test"}},{"mnemonic":"ref.cast","opcodes":[251,22],"category":"ref","version":"3.0","signature":{"params_raw":"[(\\REF~t')]","results_raw":"[(\\REF~t)]"},"anchors":{"validation":"valid-ref.cast","execution":"exec-ref.cast"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.cast","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.cast"}},{"mnemonic":"ref.cast","opcodes":[251,23],"category":"ref","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~t')]","results_raw":"[(\\REF~\\NULL~t)]"},"anchors":{"validation":"valid-ref.cast","execution":"exec-ref.cast"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.cast","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.cast"}},{"mnemonic":"br_on_cast","opcodes":[251,24],"category":"control","version":"3.0","signature":{"params_raw":"[t_1]","results_raw":"[t_1\\reftypediff t_2]"},"anchors":{"validation":"valid-br_on_cast","execution":"exec-br_on_cast"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_cast","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_cast"}},{"mnemonic":"br_on_cast_fail","opcodes":[251,25],"category":"control","version":"3.0","signature":{"params_raw":"[t_1]","results_raw":"[t_2]"},"anchors":{"validation":"valid-br_on_cast_fail","execution":"exec-br_on_cast_fail"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_cast_fail","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_cast_fail"}},{"mnemonic":"any.convert_extern","opcodes":[251,26],"category":"extern","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~\\EXTERN)]","results_raw":"[(\\REF~\\NULL~\\ANY)]"},"anchors":{"validation":"valid-any.convert_extern","execution":"exec-any.convert_extern"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-any.convert_extern","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-any.convert_extern"}},{"mnemonic":"extern.convert_any","opcodes":[251,27],"category":"extern","version":"3.0","signature":{"params_raw":"[(\\REF~\\NULL~\\ANY)]","results_raw":"[(\\REF~\\NULL~\\EXTERN)]"},"anchors":{"validation":"valid-extern.convert_any","execution":"exec-extern.convert_any"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-extern.convert_any","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-extern.convert_any"}},{"mnemonic":"ref.i31","opcodes":[251,28],"category":"i31","version":"3.0","signature":{"params_raw":"[\\I32]","results_raw":"[(\\REF~\\I31)]"},"anchors":{"validation":"valid-ref.i31","execution":"exec-ref.i31"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.i31","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.i31"}},{"mnemonic":"i31.get_s","opcodes":[251,29],"category":"i31","version":"3.0","signature":{"params_raw":"[\\I31REF]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-i31.get","execution":"exec-i31.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-i31.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-i31.get"}},{"mnemonic":"i31.get_u","opcodes":[251,30],"category":"i31","version":"3.0","signature":{"params_raw":"[\\I31REF]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-i31.get","execution":"exec-i31.get"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-i31.get","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-i31.get"}},{"mnemonic":"i32.trunc_sat_f32_s","opcodes":[252,0],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_sat_f32_u","opcodes":[252,1],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_sat_f64_s","opcodes":[252,2],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i32.trunc_sat_f64_u","opcodes":[252,3],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_sat_f32_s","opcodes":[252,4],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_sat_f32_u","opcodes":[252,5],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_sat_f64_s","opcodes":[252,6],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"i64.trunc_sat_f64_u","opcodes":[252,7],"category":"numeric","version":"2.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-cvtop","execution":"exec-cvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"}},{"mnemonic":"memory.init","opcodes":[252,8],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\I32~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-memory.init","execution":"exec-memory.init"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.init","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.init"}},{"mnemonic":"data.drop","opcodes":[252,9],"category":"memory","version":"2.0","signature":{"params_raw":"[]","results_raw":"[]"},"anchors":{"validation":"valid-data.drop","execution":"exec-data.drop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-data.drop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-data.drop"}},{"mnemonic":"memory.copy","opcodes":[252,10],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}_1~\\X{at}_2~\\X{at}]","results_raw":"[]"},"anchors":{"validation":"valid-memory.copy","execution":"exec-memory.copy"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.copy","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.copy"}},{"mnemonic":"memory.fill","opcodes":[252,11],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\I32~\\X{at}]","results_raw":"[]"},"anchors":{"validation":"valid-memory.fill","execution":"exec-memory.fill"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.fill","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.fill"}},{"mnemonic":"table.init","opcodes":[252,12],"category":"table","version":"2.0","signature":{"params_raw":"[\\X{at}~\\I32~\\I32]","results_raw":"[]"},"anchors":{"validation":"valid-table.init","execution":"exec-table.init"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.init","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.init"}},{"mnemonic":"elem.drop","opcodes":[252,13],"category":"table","version":"2.0","signature":{"params_raw":"[]","results_raw":"[]"},"anchors":{"validation":"valid-elem.drop","execution":"exec-elem.drop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-elem.drop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-elem.drop"}},{"mnemonic":"table.copy","opcodes":[252,14],"category":"table","version":"2.0","signature":{"params_raw":"[\\X{at}_1~\\X{at}_2~\\X{at}]","results_raw":"[]"},"anchors":{"validation":"valid-table.copy","execution":"exec-table.copy"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.copy","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.copy"}},{"mnemonic":"table.grow","opcodes":[252,15],"category":"table","version":"2.0","signature":{"params_raw":"[t~\\X{at}]","results_raw":"[\\X{at}]"},"anchors":{"validation":"valid-table.grow","execution":"exec-table.grow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.grow","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.grow"}},{"mnemonic":"table.size","opcodes":[252,16],"category":"table","version":"2.0","signature":{"params_raw":"[]","results_raw":"[\\X{at}]"},"anchors":{"validation":"valid-table.size","execution":"exec-table.size"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.size","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.size"}},{"mnemonic":"table.fill","opcodes":[252,17],"category":"table","version":"2.0","signature":{"params_raw":"[\\X{at}~t~\\X{at}]","results_raw":"[]"},"anchors":{"validation":"valid-table.fill","execution":"exec-table.fill"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.fill","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.fill"}},{"mnemonic":"v128.load","opcodes":[253,0],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-val","execution":"exec-vload-val"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-val","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-val"}},{"mnemonic":"v128.load8x8_s","opcodes":[253,1],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load8x8_u","opcodes":[253,2],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load16x4_s","opcodes":[253,3],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load16x4_u","opcodes":[253,4],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load32x2_s","opcodes":[253,5],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load32x2_u","opcodes":[253,6],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-pack","execution":"exec-vload-pack"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"}},{"mnemonic":"v128.load8_splat","opcodes":[253,7],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-splat","execution":"exec-vload-splat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-splat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-splat"}},{"mnemonic":"v128.load16_splat","opcodes":[253,8],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-splat","execution":"exec-vload-splat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-splat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-splat"}},{"mnemonic":"v128.load32_splat","opcodes":[253,9],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-splat","execution":"exec-vload-splat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-splat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-splat"}},{"mnemonic":"v128.load64_splat","opcodes":[253,10],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-splat","execution":"exec-vload-splat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-splat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-splat"}},{"mnemonic":"v128.store","opcodes":[253,11],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[]"},"anchors":{"validation":"valid-vstore","execution":"exec-vstore"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore"}},{"mnemonic":"v128.const","opcodes":[253,12],"category":"vec","version":"2.0","signature":{"params_raw":"[]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vconst","execution":"exec-vconst"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vconst","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vconst"}},{"mnemonic":"i8x16.shuffle","opcodes":[253,13],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshuffle","execution":"exec-vshuffle"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshuffle","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshuffle"}},{"mnemonic":"i8x16.swizzle","opcodes":[253,14],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vswizzlop","execution":"exec-vswizzlop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vswizzlop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vswizzlop"}},{"mnemonic":"i8x16.splat","opcodes":[253,15],"category":"vec","version":"2.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"i16x8.splat","opcodes":[253,16],"category":"vec","version":"2.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"i32x4.splat","opcodes":[253,17],"category":"vec","version":"2.0","signature":{"params_raw":"[\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"i64x2.splat","opcodes":[253,18],"category":"vec","version":"2.0","signature":{"params_raw":"[\\I64]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"f32x4.splat","opcodes":[253,19],"category":"vec","version":"2.0","signature":{"params_raw":"[\\F32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"f64x2.splat","opcodes":[253,20],"category":"vec","version":"2.0","signature":{"params_raw":"[\\F64]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vsplat","execution":"exec-vsplat"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"}},{"mnemonic":"i8x16.extract_lane_s","opcodes":[253,21],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i8x16.extract_lane_u","opcodes":[253,22],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i8x16.replace_lane","opcodes":[253,23],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"i16x8.extract_lane_s","opcodes":[253,24],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i16x8.extract_lane_u","opcodes":[253,25],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i16x8.replace_lane","opcodes":[253,26],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"i32x4.extract_lane","opcodes":[253,27],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i32x4.replace_lane","opcodes":[253,28],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"i64x2.extract_lane","opcodes":[253,29],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I64]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"i64x2.replace_lane","opcodes":[253,30],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I64]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"f32x4.extract_lane","opcodes":[253,31],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\F32]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"f32x4.replace_lane","opcodes":[253,32],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\F32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"f64x2.extract_lane","opcodes":[253,33],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\F64]"},"anchors":{"validation":"valid-vextract_lane","execution":"exec-vextract_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"}},{"mnemonic":"f64x2.replace_lane","opcodes":[253,34],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\F64]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vreplace_lane","execution":"exec-vreplace_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"}},{"mnemonic":"i8x16.eq","opcodes":[253,35],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.ne","opcodes":[253,36],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.lt_s","opcodes":[253,37],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.lt_u","opcodes":[253,38],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.gt_s","opcodes":[253,39],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.gt_u","opcodes":[253,40],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.le_s","opcodes":[253,41],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.le_u","opcodes":[253,42],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.ge_s","opcodes":[253,43],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i8x16.ge_u","opcodes":[253,44],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.eq","opcodes":[253,45],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.ne","opcodes":[253,46],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.lt_s","opcodes":[253,47],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.lt_u","opcodes":[253,48],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.gt_s","opcodes":[253,49],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.gt_u","opcodes":[253,50],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.le_s","opcodes":[253,51],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.le_u","opcodes":[253,52],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.ge_s","opcodes":[253,53],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i16x8.ge_u","opcodes":[253,54],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.eq","opcodes":[253,55],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.ne","opcodes":[253,56],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.lt_s","opcodes":[253,57],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.lt_u","opcodes":[253,58],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.gt_s","opcodes":[253,59],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.gt_u","opcodes":[253,60],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.le_s","opcodes":[253,61],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.le_u","opcodes":[253,62],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.ge_s","opcodes":[253,63],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"i32x4.ge_u","opcodes":[253,64],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.eq","opcodes":[253,65],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.ne","opcodes":[253,66],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.lt","opcodes":[253,67],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.gt","opcodes":[253,68],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.le","opcodes":[253,69],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f32x4.ge","opcodes":[253,70],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.eq","opcodes":[253,71],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.ne","opcodes":[253,72],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.lt","opcodes":[253,73],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.gt","opcodes":[253,74],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.le","opcodes":[253,75],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"f64x2.ge","opcodes":[253,76],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vrelop","execution":"exec-vrelop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"}},{"mnemonic":"v128.not","opcodes":[253,77],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvunop","execution":"exec-vvunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvunop"}},{"mnemonic":"v128.and","opcodes":[253,78],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvbinop","execution":"exec-vvbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvbinop"}},{"mnemonic":"v128.andnot","opcodes":[253,79],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvbinop","execution":"exec-vvbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvbinop"}},{"mnemonic":"v128.or","opcodes":[253,80],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvbinop","execution":"exec-vvbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvbinop"}},{"mnemonic":"v128.xor","opcodes":[253,81],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvbinop","execution":"exec-vvbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvbinop"}},{"mnemonic":"v128.bitselect","opcodes":[253,82],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vvternop","execution":"exec-vvternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvternop"}},{"mnemonic":"v128.any_true","opcodes":[253,83],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vvtestop","execution":"exec-vvtestop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvtestop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvtestop"}},{"mnemonic":"v128.load8_lane","opcodes":[253,84],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload_lane","execution":"exec-vload_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload_lane"}},{"mnemonic":"v128.load16_lane","opcodes":[253,85],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload_lane","execution":"exec-vload_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload_lane"}},{"mnemonic":"v128.load32_lane","opcodes":[253,86],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload_lane","execution":"exec-vload_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload_lane"}},{"mnemonic":"v128.load64_lane","opcodes":[253,87],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload_lane","execution":"exec-vload_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload_lane"}},{"mnemonic":"v128.store8_lane","opcodes":[253,88],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[]"},"anchors":{"validation":"valid-vstore_lane","execution":"exec-vstore_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore_lane"}},{"mnemonic":"v128.store16_lane","opcodes":[253,89],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[]"},"anchors":{"validation":"valid-vstore_lane","execution":"exec-vstore_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore_lane"}},{"mnemonic":"v128.store32_lane","opcodes":[253,90],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[]"},"anchors":{"validation":"valid-vstore_lane","execution":"exec-vstore_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore_lane"}},{"mnemonic":"v128.store64_lane","opcodes":[253,91],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}~\\V128]","results_raw":"[]"},"anchors":{"validation":"valid-vstore_lane","execution":"exec-vstore_lane"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore_lane","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore_lane"}},{"mnemonic":"v128.load32_zero","opcodes":[253,92],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-zero","execution":"exec-vload-zero"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-zero","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-zero"}},{"mnemonic":"v128.load64_zero","opcodes":[253,93],"category":"memory","version":"2.0","signature":{"params_raw":"[\\X{at}]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vload-zero","execution":"exec-vload-zero"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-zero","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-zero"}},{"mnemonic":"f32x4.demote_f64x2_zero","opcodes":[253,94],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f64x2.promote_low_f32x4","opcodes":[253,95],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i8x16.abs","opcodes":[253,96],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.neg","opcodes":[253,97],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.popcnt","opcodes":[253,98],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.all_true","opcodes":[253,99],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vtestop","execution":"exec-vtestop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vtestop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vtestop"}},{"mnemonic":"i8x16.bitmask","opcodes":[253,100],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vbitmask","execution":"exec-vbitmask"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbitmask","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbitmask"}},{"mnemonic":"i8x16.narrow_i16x8_s","opcodes":[253,101],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vnarrow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vnarrow"}},{"mnemonic":"i8x16.narrow_i16x8_u","opcodes":[253,102],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vnarrow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vnarrow"}},{"mnemonic":"f32x4.ceil","opcodes":[253,103],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.floor","opcodes":[253,104],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.trunc","opcodes":[253,105],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.nearest","opcodes":[253,106],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.shl","opcodes":[253,107],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i8x16.shr_s","opcodes":[253,108],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i8x16.shr_u","opcodes":[253,109],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i8x16.add","opcodes":[253,110],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.add_sat_s","opcodes":[253,111],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.add_sat_u","opcodes":[253,112],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.sub","opcodes":[253,113],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.sub_sat_s","opcodes":[253,114],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.sub_sat_u","opcodes":[253,115],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.ceil","opcodes":[253,116],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f64x2.floor","opcodes":[253,117],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.min_s","opcodes":[253,118],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.min_u","opcodes":[253,119],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.max_s","opcodes":[253,120],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i8x16.max_u","opcodes":[253,121],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.trunc","opcodes":[253,122],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i8x16.avgr_u","opcodes":[253,123],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.extadd_pairwise_i8x16_s","opcodes":[253,124],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextunop","execution":"exec-vextunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextunop"}},{"mnemonic":"i16x8.extadd_pairwise_i8x16_u","opcodes":[253,125],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextunop","execution":"exec-vextunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextunop"}},{"mnemonic":"i32x4.extadd_pairwise_i16x8_s","opcodes":[253,126],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextunop","execution":"exec-vextunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextunop"}},{"mnemonic":"i32x4.extadd_pairwise_i16x8_u","opcodes":[253,127],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextunop","execution":"exec-vextunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextunop"}},{"mnemonic":"i16x8.abs","opcodes":[253,128,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i16x8.neg","opcodes":[253,129,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i16x8.q15mulr_sat_s","opcodes":[253,130,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.all_true","opcodes":[253,131,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vtestop","execution":"exec-vtestop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vtestop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vtestop"}},{"mnemonic":"i16x8.bitmask","opcodes":[253,132,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vbitmask","execution":"exec-vbitmask"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbitmask","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbitmask"}},{"mnemonic":"i16x8.narrow_i32x4_s","opcodes":[253,133,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vnarrow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vnarrow"}},{"mnemonic":"i16x8.narrow_i32x4_u","opcodes":[253,134,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vnarrow"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vnarrow"}},{"mnemonic":"i16x8.extend_low_i8x16_s","opcodes":[253,135,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i16x8.extend_high_i8x16_s","opcodes":[253,136,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i16x8.extend_low_i8x16_u","opcodes":[253,137,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i16x8.extend_high_i8x16_u","opcodes":[253,138,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i16x8.shl","opcodes":[253,139,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i16x8.shr_s","opcodes":[253,140,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i16x8.shr_u","opcodes":[253,141,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i16x8.add","opcodes":[253,142,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.add_sat_s","opcodes":[253,143,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.add_sat_u","opcodes":[253,144,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.sub","opcodes":[253,145,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.sub_sat_s","opcodes":[253,146,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.sub_sat_u","opcodes":[253,147,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.nearest","opcodes":[253,148,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i16x8.mul","opcodes":[253,149,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.min_s","opcodes":[253,150,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.min_u","opcodes":[253,151,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.max_s","opcodes":[253,152,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.max_u","opcodes":[253,153,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.avgr_u","opcodes":[253,155,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.extmul_low_i8x16_s","opcodes":[253,156,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i16x8.extmul_high_i8x16_s","opcodes":[253,157,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i16x8.extmul_low_i8x16_u","opcodes":[253,158,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i16x8.extmul_high_i8x16_u","opcodes":[253,159,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.abs","opcodes":[253,160,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i32x4.neg","opcodes":[253,161,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i32x4.all_true","opcodes":[253,163,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vtestop","execution":"exec-vtestop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vtestop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vtestop"}},{"mnemonic":"i32x4.bitmask","opcodes":[253,164,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vbitmask","execution":"exec-vbitmask"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbitmask","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbitmask"}},{"mnemonic":"i32x4.extend_low_i16x8_s","opcodes":[253,167,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.extend_high_i16x8_s","opcodes":[253,168,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.extend_low_i16x8_u","opcodes":[253,169,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.extend_high_i16x8_u","opcodes":[253,170,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.shl","opcodes":[253,171,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i32x4.shr_s","opcodes":[253,172,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i32x4.shr_u","opcodes":[253,173,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i32x4.add","opcodes":[253,174,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.sub","opcodes":[253,177,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.mul","opcodes":[253,181,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.min_s","opcodes":[253,182,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.min_u","opcodes":[253,183,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.max_s","opcodes":[253,184,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.max_u","opcodes":[253,185,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.dot_i16x8_s","opcodes":[253,186,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.extmul_low_i16x8_s","opcodes":[253,188,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.extmul_high_i16x8_s","opcodes":[253,189,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.extmul_low_i16x8_u","opcodes":[253,190,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.extmul_high_i16x8_u","opcodes":[253,191,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i64x2.abs","opcodes":[253,192,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i64x2.neg","opcodes":[253,193,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"i64x2.all_true","opcodes":[253,195,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vtestop","execution":"exec-vtestop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vtestop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vtestop"}},{"mnemonic":"i64x2.bitmask","opcodes":[253,196,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\I32]"},"anchors":{"validation":"valid-vbitmask","execution":"exec-vbitmask"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbitmask","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbitmask"}},{"mnemonic":"i64x2.extend_low_i32x4_s","opcodes":[253,199,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i64x2.extend_high_i32x4_s","opcodes":[253,200,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i64x2.extend_low_i32x4_u","opcodes":[253,201,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i64x2.extend_high_i32x4_u","opcodes":[253,202,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i64x2.shl","opcodes":[253,203,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i64x2.shr_s","opcodes":[253,204,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i64x2.shr_u","opcodes":[253,205,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\I32]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vshiftop","execution":"exec-vshiftop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"}},{"mnemonic":"i64x2.add","opcodes":[253,206,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.sub","opcodes":[253,209,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.mul","opcodes":[253,213,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.eq","opcodes":[253,214,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.ne","opcodes":[253,215,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.lt_s","opcodes":[253,216,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.gt_s","opcodes":[253,217,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.le_s","opcodes":[253,218,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.ge_s","opcodes":[253,219,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i64x2.extmul_low_i32x4_s","opcodes":[253,220,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i64x2.extmul_high_i32x4_s","opcodes":[253,221,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i64x2.extmul_low_i32x4_u","opcodes":[253,222,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i64x2.extmul_high_i32x4_u","opcodes":[253,223,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"f32x4.abs","opcodes":[253,224,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.neg","opcodes":[253,225,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.sqrt","opcodes":[253,227,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f32x4.add","opcodes":[253,228,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.sub","opcodes":[253,229,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.mul","opcodes":[253,230,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.div","opcodes":[253,231,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.min","opcodes":[253,232,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.max","opcodes":[253,233,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.pmin","opcodes":[253,234,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.pmax","opcodes":[253,235,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.abs","opcodes":[253,236,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f64x2.neg","opcodes":[253,237,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f64x2.sqrt","opcodes":[253,239,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vunop","execution":"exec-vunop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"}},{"mnemonic":"f64x2.add","opcodes":[253,240,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.sub","opcodes":[253,241,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.mul","opcodes":[253,242,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.div","opcodes":[253,243,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.min","opcodes":[253,244,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.max","opcodes":[253,245,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.pmin","opcodes":[253,246,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.pmax","opcodes":[253,247,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i32x4.trunc_sat_f32x4_s","opcodes":[253,248,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.trunc_sat_f32x4_u","opcodes":[253,249,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f32x4.convert_i32x4_s","opcodes":[253,250,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f32x4.convert_i32x4_u","opcodes":[253,251,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.trunc_sat_f64x2_s_zero","opcodes":[253,252,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.trunc_sat_f64x2_u_zero","opcodes":[253,253,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f64x2.convert_low_i32x4_s","opcodes":[253,254,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f64x2.convert_low_i32x4_u","opcodes":[253,255,1],"category":"vec","version":"2.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i8x16.relaxed_swizzle","opcodes":[253,128,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vswizzlop","execution":"exec-vswizzlop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vswizzlop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vswizzlop"}},{"mnemonic":"i32x4.relaxed_trunc_f32x4_s","opcodes":[253,129,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.relaxed_trunc_f32x4_u","opcodes":[253,130,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.relaxed_trunc_f64x2_s","opcodes":[253,131,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"i32x4.relaxed_trunc_f64x2_u","opcodes":[253,132,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vcvtop","execution":"exec-vcvtop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"}},{"mnemonic":"f32x4.relaxed_madd","opcodes":[253,133,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"f32x4.relaxed_nmadd","opcodes":[253,134,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"f64x2.relaxed_madd","opcodes":[253,135,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"f64x2.relaxed_nmadd","opcodes":[253,136,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"i8x16.relaxed_laneselect","opcodes":[253,137,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"i16x8.relaxed_laneselect","opcodes":[253,138,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"i32x4.relaxed_laneselect","opcodes":[253,139,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"i64x2.relaxed_laneselect","opcodes":[253,140,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vternop","execution":"exec-vternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"}},{"mnemonic":"f32x4.relaxed_min","opcodes":[253,141,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f32x4.relaxed_max","opcodes":[253,142,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.relaxed_min","opcodes":[253,143,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"f64x2.relaxed_max","opcodes":[253,144,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.relaxed_q15mulr_s","opcodes":[253,145,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vbinop","execution":"exec-vbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"}},{"mnemonic":"i16x8.relaxed_dot_i8x16_i7x16_s","opcodes":[253,146,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextbinop","execution":"exec-vextbinop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"}},{"mnemonic":"i32x4.relaxed_dot_i8x16_i7x16_add_s","opcodes":[253,147,2],"category":"vec","version":"3.0","signature":{"params_raw":"[\\V128~\\V128~\\V128]","results_raw":"[\\V128]"},"anchors":{"validation":"valid-vextternop","execution":"exec-vextternop"},"urls":{"validation":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextternop","execution":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextternop"}}],"sections":[{"id":"algo-valid","anchors":["algo-valid"],"title":"Validation Algorithm","level":1,"path":"appendix/algorithm","prose":"The specification of WebAssembly validation is purely declarative.\nIt describes the constraints that must be met by a module or instruction sequence to be valid.\n\nThis section sketches the skeleton of a sound and complete algorithm for effectively validating code, i.e., sequences of instructions.\n(Other aspects of validation are straightforward to implement.)\n\nIn fact, the algorithm is expressed over the flat sequence of opcodes as occurring in the binary format, and performs only a single pass over it.\nConsequently, it can be integrated directly into a decoder.\n\nThe algorithm is expressed in typed pseudo code whose semantics is intended to be self-explanatory.","crossrefs":["valid","valid-module","valid-instr","syntax-instr","binary"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html#algo-valid"},{"id":"appendix/algorithm-data-structures","anchors":[],"title":"Data Structures","level":2,"path":"appendix/algorithm","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html"},{"id":"appendix/algorithm-types","anchors":[],"title":"Types","level":3,"path":"appendix/algorithm","prose":"Value types are representable as sets of enumerations:\n\n type num_type = I32 | I64 | F32 | F64\n type vec_type = V128\n type heap_type =\n Any | Eq | I31 | Struct | Array | None |\n Func | Nofunc | Exn | Noexn | Extern | Noextern | Bot |\n Def(def : def_type)\n type ref_type = Ref(heap : heap_type, null : bool)\n type val_type = num_type | vec_type | ref_type | Bot\n\n func is_num(t : val_type) : bool =\n return t = I32 || t = I64 || t = F32 || t = F64 || t = Bot\n\n func is_vec(t : val_type) : bool =\n return t = V128 || t = Bot\n\n func is_ref(t : val_type) : bool =\n return not (is_num t || is_vec t) || t = Bot\n\nSimilarly, defined types def_type can be represented:\n\n type pack_type = I8 | I16\n type field_type = Field(val : val_type | pack_type, mut : bool)\n\n type struct_type = Struct(fields : list(field_type))\n type array_type = Array(fields : field_type)\n type func_type = Func(params : list(val_type), results : list(val_type))\n type comp_type = struct_type | array_type | func_type\n\n type sub_type = Sub(super : list(def_type), body : comp_type, final : bool)\n type rec_type = Rec(types : list(sub_type))\n\n type def_type = Def(rec : rec_type, proj : int32)\n\n func unpack_field(t : field_type) : val_type =\n if (it = I8 || t = I16) return I32\n return t\n\n func expand_def(t : def_type) : comp_type =\n return t.rec.types[t.proj].body\n\nThese representations assume that all types have been closed by substituting all type indices (in concrete heap types and in sub types) with their respective defined types.\nThis includes recursive references to enclosing defined types,\nsuch that type representations form graphs and may be cyclic for recursive types.\n\nWe assume that all types have been canonicalized, such that equality on two type representations holds if and only if their closures are syntactically equivalent, making it a constant-time check.\n\n For the purpose of type canonicalization, recursive references from a heap type to an enclosing recursive type (i.e., forward edges in the graph that form a cycle) need to be distinguished from references to previously defined types.\n However, this distinction does not otherwise affect validation, so is ignored here.\n In the graph representation, all recursive types are effectively infinitely unrolled.\n\nWe further assume that validation and subtyping checks are defined on value types, as well as a few auxiliary functions on composite types:\n\n func validate_val_type(t : val_type)\n func validate_ref_type(t : ref_type)\n\n func matches_val(t1 : val_type, t2 : val_type) : bool\n func matches_ref(t1 : val_type, t2 : val_type) : bool\n\n func is_func(t : comp_type) : bool\n func is_struct(t : comp_type) : bool\n func is_array(t : comp_type) : bool\n\nFinally, the following function computes the least precise supertype of a given heap type (its corresponding top type):\n\n func top_heap_type(t : heap_type) : heap_type =\n switch (t)\n case (Any | Eq | I31 | Struct | Array | None)\n return Any\n case (Func | Nofunc)\n return Func\n case (Extern | Noextern)\n return Extern\n case (Def(dt))\n switch (dt.rec.types[dt.proj].body)\n case (Struct(_) | Array(_))\n return Any\n case (Func(_))\n return Func\n case (Bot)\n raise CannotOccurInSource","crossrefs":["syntax-deftype","type-closed","type-subst","syntax-typeidx","syntax-heaptype","syntax-subtype","syntax-rectype","type-closure","syntax-reftype","aux-unroll-rectype","valid-valtype","match-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html"},{"id":"appendix/algorithm-context","anchors":[],"title":"Context","level":3,"path":"appendix/algorithm","prose":"Validation requires a context for checking uses of indices.\nFor the purpose of presenting the algorithm, it is maintained in a set of global variables:\n\n var return_type : list(val_type)\n var types : array(def_type)\n var locals : array(val_type)\n var locals_init : array(bool)\n var globals : array(global_type)\n var funcs : array(func_type)\n var tables : array(table_type)\n var mems : array(mem_type)\n\nThis assumes suitable representations for the various types besides val_type, which are omitted here.\n\nFor locals, there is an additional array recording the initialization status of each local.","crossrefs":["context","syntax-index","syntax-type"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html"},{"id":"appendix/algorithm-stacks","anchors":[],"title":"Stacks","level":3,"path":"appendix/algorithm","prose":"The algorithm uses three separate stacks: the value stack, the control stack, and the initialization stack.\nThe value stack tracks the types of operand values on the stack.\nThe control stack tracks surrounding structured control instructions and their associated blocks.\nThe initialization stack records all locals that have been initialized since the beginning of the function.\n\n type val_stack = stack(val_type)\n type init_stack = stack(u32)\n\n type ctrl_stack = stack(ctrl_frame)\n type ctrl_frame = {\n opcode : opcode\n start_types : list(val_type)\n end_types : list(val_type)\n val_height : nat\n init_height : nat\n unreachable : bool\n }\n\nFor each entered block, the control stack records a control frame with the originating opcode, the types on the top of the operand stack at the start and end of the block (used to check its result as well as branches), the height of the operand stack at the start of the block (used to check that operands do not underflow the current block), the height of the initialization stack at the start of the block (used to reset initialization status at the end of the block), and a flag recording whether the remainder of the block is unreachable (used to handle stack-polymorphic typing after branches).\n\nFor the purpose of presenting the algorithm, these stacks are simply maintained as global variables:\n\n var vals : val_stack\n var inits : init_stack\n var ctrls : ctrl_stack\n\nHowever, these variables are not manipulated directly by the main checking function, but through a set of auxiliary functions:\n\n func push_val(type : val_type) =\n vals.push(type)\n\n func pop_val() : val_type =\n if (vals.size() = ctrls[0].val_height && ctrls[0].unreachable) return Bot\n error_if(vals.size() = ctrls[0].val_height)\n return vals.pop()\n\n func pop_val(expect : val_type) : val_type =\n let actual = pop_val()\n error_if(not matches_val(actual, expect))\n return actual\n\n func pop_num() : num_type | Bot =\n let actual = pop_val()\n error_if(not is_num(actual))\n return actual\n\n func pop_ref() : ref_type =\n let actual = pop_val()\n error_if(not is_ref(actual))\n if (actual = Bot) return Ref(Bot, false)\n return actual\n\n func push_vals(types : list(val_type)) = foreach (t in types) push_val(t)\n func pop_vals(types : list(val_type)) : list(val_type) =\n var popped := []\n foreach (t in reverse(types)) popped.prepend(pop_val(t))\n return popped\n\nPushing an operand value simply pushes the respective type to the value stack.\n\nPopping an operand value checks that the value stack does not underflow the current block and then removes one type.\nBut first, a special case is handled where the block contains no known values, but has been marked as unreachable.\nThat can occur after an unconditional branch, when the stack is typed polymorphically.\nIn that case, the Bot type is returned, because that is a principal choice trivially satisfying all use constraints.\n\nA second function for popping an operand value takes an expected type, which the actual operand type is checked against.\nThe types may differ by subtyping, including the case where the actual type is Bot, and thereby matches unconditionally.\nThe function returns the actual type popped from the stack.\n\nFinally, there are accumulative functions for pushing or popping multiple operand types.\n\n The notation stack[i] is meant to index the stack from the top,\n so that, e.g., ctrls[0] accesses the element pushed last.\n\nThe initialization stack and the initialization status of locals is manipulated through the following functions:\n\n func get_local(idx : u32) =\n error_if(not locals_init[idx])\n\n func set_local(idx : u32) =\n if (not locals_init[idx])\n inits.push(idx)\n locals_init[idx] := true\n\n func reset_locals(height : nat) =\n while (inits.size() > height)\n locals_init[inits.pop()] := false\n\nGetting a local verifies that it is known to be initialized.\nWhen a local is set that was not set already,\nthen its initialization status is updated and the change is recorded in the initialization stack.\nThus, the initialization status of all locals can be reset to a previous state by denoting a specific height in the initialization stack.\n\nThe size of the initialization stack is bounded by the number of (non-defaultable) locals in a function, so can be preallocated by an algorithm.\n\nThe control stack is likewise manipulated through auxiliary functions:\n\n func push_ctrl(opcode : opcode, in : list(val_type), out : list(val_type)) =\n let frame = ctrl_frame(opcode, in, out, vals.size(), inits.size(), false)\n ctrls.push(frame)\n push_vals(in)\n\n func pop_ctrl() : ctrl_frame =\n error_if(ctrls.is_empty())\n let frame = ctrls[0]\n pop_vals(frame.end_types)\n error_if(vals.size() =/= frame.val_height)\n reset_locals(frame.init_height)\n ctrls.pop()\n return frame\n\n func label_types(frame : ctrl_frame) : list(val_types) =\n return (if (frame.opcode = loop) frame.start_types else frame.end_types)\n\n func unreachable() =\n vals.resize(ctrls[0].val_height)\n ctrls[0].unreachable := true\n\nPushing a control frame takes the types of the label and result values.\nIt allocates a new frame record recording them along with the current height of the operand stack and marks the block as reachable.\n\nPopping a frame first checks that the control stack is not empty.\nIt then verifies that the operand stack contains the right types of values expected at the end of the exited block and pops them off the operand stack.\nAfterwards, it checks that the stack has shrunk back to its initial height.\nFinally, it undoes all changes to the initialization status of locals that happened inside the block.\n\nThe type of the label associated with a control frame is either that of the stack at the start or the end of the frame, determined by the opcode that it originates from.\n\nFinally, the current frame can be marked as unreachable.\nIn that case, all existing operand types are purged from the value stack, in order to allow for the stack-polymorphism logic in pop_val to take effect.\nBecause every function has an implicit outermost label that corresponds to an implicit block frame,\nit is an invariant of the validation algorithm that there always is at least one frame on the control stack when validating an instruction, and hence, `ctrls[0]` is always defined.\n\n Even with the unreachable flag set, consecutive operands are still pushed to and popped from the operand stack.\n That is necessary to detect invalid examples like (\\UNREACHABLE~(\\I32.\\CONST)~\\I64.\\ADD).\n However, a polymorphic stack cannot underflow, but instead generates Bot types as needed.","crossrefs":["syntax-valtype","stack","syntax-instr-control","syntax-local","polymorphism","syntax-label"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html"},{"id":"appendix/algorithm-validation-of-opcode-sequences","anchors":[],"title":"Validation of Opcode Sequences","level":2,"path":"appendix/algorithm","prose":"The following function shows the validation of a number of representative instructions that manipulate the stack.\nOther instructions are checked in a similar manner.\n\n func validate(opcode) =\n switch (opcode)\n case (i32.add)\n pop_val(I32)\n pop_val(I32)\n push_val(I32)\n\n case (drop)\n pop_val()\n\n case (select)\n pop_val(I32)\n let t1 = pop_val()\n let t2 = pop_val()\n error_if(not (is_num(t1) && is_num(t2) || is_vec(t1) && is_vec(t2)))\n error_if(t1 =/= t2 && t1 =/= Bot && t2 =/= Bot)\n push_val(if (t1 = Bot) t2 else t1)\n\n case (select t)\n pop_val(I32)\n pop_val(t)\n pop_val(t)\n push_val(t)\n\n case (ref.is_null)\n pop_ref()\n push_val(I32)\n\n case (ref.as_non_null)\n let rt = pop_ref()\n push_val(Ref(rt.heap, false))\n\n case (ref.test rt)\n validate_ref_type(rt)\n pop_val(Ref(top_heap_type(rt), true))\n push_val(I32)\n\n case (local.get x)\n get_local(x)\n push_val(locals[x])\n\n case (local.set x)\n pop_val(locals[x])\n set_local(x)\n\n case (unreachable)\n unreachable()\n\n case (block t1->t2)\n pop_vals([t1])\n push_ctrl(block, [t1], [t2])\n\n case (loop t1->t2)\n pop_vals([t1])\n push_ctrl(loop, [t1], [t2])\n\n case (if t1->t2)\n pop_val(I32)\n pop_vals([t1])\n push_ctrl(if, [t1], [t2])\n\n case (end)\n let frame = pop_ctrl()\n push_vals(frame.end_types)\n\n case (else)\n let frame = pop_ctrl()\n error_if(frame.opcode =/= if)\n push_ctrl(else, frame.start_types, frame.end_types)\n\n case (br n)\n error_if(ctrls.size() < n)\n pop_vals(label_types(ctrls[n]))\n unreachable()\n\n case (br_if n)\n error_if(ctrls.size() < n)\n pop_val(I32)\n pop_vals(label_types(ctrls[n]))\n push_vals(label_types(ctrls[n]))\n\n case (br_table n m)\n pop_val(I32)\n error_if(ctrls.size() < m)\n let arity = label_types(ctrls[m]).size()\n foreach (n in n)\n error_if(ctrls.size() < n)\n error_if(label_types(ctrls[n]).size() =/= arity)\n push_vals(pop_vals(label_types(ctrls[n])))\n pop_vals(label_types(ctrls[m]))\n unreachable()\n\n case (br_on_null n)\n error_if(ctrls.size() < n)\n let rt = pop_ref()\n pop_vals(label_types(ctrls[n]))\n push_vals(label_types(ctrls[n]))\n push_val(Ref(rt.heap, false))\n\n case (br_on_cast n rt1 rt2)\n validate_ref_type(rt1)\n validate_ref_type(rt2)\n pop_val(rt1)\n push_val(rt2)\n pop_vals(label_types(ctrls[n]))\n push_vals(label_types(ctrls[n]))\n pop_val(rt2)\n push_val(diff_ref_type(rt2, rt1))\n\n case (return)\n pop_vals(return_types)\n unreachable()\n\n case (call_ref x)\n let t = expand_def(types[x])\n error_if(not is_func(t))\n pop_vals(t.params)\n pop_val(Ref(Def(types[x])))\n push_vals(t.results)\n\n case (return_call_ref x)\n let t = expand_def(types[x])\n error_if(not is_func(t))\n pop_vals(t.params)\n pop_val(Ref(Def(types[x])))\n error_if(t.results.len() =/= return_types.len())\n push_vals(t.results)\n pop_vals(return_types)\n unreachable()\n\n case (struct.new x)\n let t = expand_def(types[x])\n error_if(not is_struct(t))\n for (ti in reverse(t.fields))\n pop_val(unpack_field(ti))\n push_val(Ref(Def(types[x])))\n\n case (struct.set x n)\n let t = expand_def(types[x])\n error_if(not is_struct(t) || n >= t.fields.len())\n pop_val(Ref(Def(types[x])))\n pop_val(unpack_field(st.fields[n]))\n\n case (throw x)\n pop_vals(tags[x].type.params)\n unreachable()\n\n case (try_table t1->t2 handler)\n pop_vals([t1])\n foreach (handler in handler)\n error_if(ctrls.size() < handler.label)\n push_ctrl(catch, [], label_types(ctrls[handler.label]))\n switch (handler.clause)\n case (catch x)\n push_vals(tags[x].type.params)\n case (catch_ref x)\n push_vals(tags[x].type.params)\n push_val(Exnref)\n case (catch_all)\n skip\n case (catch_all_ref)\n push_val(Exnref)\n pop_ctrl()\n push_ctrl(try_table, [t1], [t2])\n\n It is an invariant under the current WebAssembly instruction set that an operand of Bot type is never duplicated on the stack.\n This would change if the language were extended with stack instructions like dup.\n Under such an extension, the above algorithm would need to be refined by replacing the Bot type with proper type variables to ensure that all uses are consistent.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/algorithm.html"},{"id":"changes","anchors":["changes"],"title":"Change History","level":1,"path":"appendix/changes","prose":"Since the original release 1.0 of the WebAssembly specification, a number of proposals for extensions have been integrated.\nThe following sections provide an overview of what has changed.\n\nAll present and future versions of WebAssembly are intended to be backwards-compatible with all previous versions.\nConcretely:\n\n1. All syntactically well-formed (in binary or text format) and valid modules remain well-formed and valid with an equivalent module type (or a subtype).\n\n .. note::\n This allows previously malformed or invalid modules to become legal,\n e.g., by adding new features or by relaxing typing rules.\n\n It also allows reclassifying previously malformed modules as well-formed but invalid,\n or vice versa.\n\n And it allows refining the typing of imports and exports,\n such that previously unlinkable modules become linkable.\n\n Historically, minor breaking changes to the text format have been allowed\n that turned previously possible valid modules invalid,\n as long as they were unlikely to occur in practice.\n\n2. All non-trapping executions of a valid program retain their behaviour with an equivalent set of possible results (or a non-empty subset).\n\n .. note::\n This allows previously malformed or invalid programs to become executable.\n\n It also allows program executions that previously trapped to execute successfully,\n although the intention is to only exercise this where the possibility of such an extension has been previously noted.\n\n And it allows reducing the set of observable behaviours of a program execution,\n e.g., by reducing non-determinism.\n\n In a program linking prior modules with modules using new features,\n a prior module may encounter new behaviours,\n e.g., new forms of control flow or side effects when calling into a latter module.\n\nIn addition, future versions of WebAssembly will not allocate the opcode \\hex{FF} to represent an instruction or instruction prefix.","crossrefs":["binary","text","valid","syntax-moduletype","syntax-import","syntax-export","trap","exec","syntax-result","binary-instr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html#changes"},{"id":"appendix/changes-release-2-0","anchors":[],"title":"Release 2.0","level":2,"path":"appendix/changes","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-sign-extension-instructions","anchors":[],"title":"Sign Extension Instructions","level":3,"path":"appendix/changes","prose":"Added new numeric instructions for performing sign extension within integer representations. [#proposal-signext]_\n\n* New numeric instructions:\n\n - \\K{i}\\X{nn}\\K{.}\\EXTEND\\X{N}\\K{\\_s}","crossrefs":["syntax-instr-numeric"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-non-trapping-float-to-int-conversions","anchors":[],"title":"Non-trapping Float-to-Int Conversions","level":3,"path":"appendix/changes","prose":"Added new conversion instructions that avoid trapping when converting a floating-point number to an integer. [#proposal-cvtsat]_\n\n* New numeric instructions:\n\n - \\K{i}\\X{nn}\\K{.}\\TRUNC\\K{\\_sat\\_f}\\X{mm}\\K{\\_}\\sx","crossrefs":["syntax-instr-numeric"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-multiple-values","anchors":[],"title":"Multiple Values","level":3,"path":"appendix/changes","prose":"Generalized the result type of blocks and functions to allow for multiple values; in addition, introduced the ability to have block parameters. [#proposal-multivalue]_\n\n Function types allow more than one result\n\n Block types can be arbitrary function types","crossrefs":["syntax-functype","syntax-blocktype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-reference-types","anchors":[],"title":"Reference Types","level":3,"path":"appendix/changes","prose":"Added FUNCREF and EXTERNREF as new value types and respective instructions. [#proposal-reftype]_\n\n New reference value types:\n\n - FUNCREF\n - EXTERNREF\n\n New reference instructions:\n\n - REFNULL\n - REFFUNC\n - REFISNULL\n\n Extended parametric instruction:\n\n - SELECT with optional type immediate\n\n New declarative form of element segment","crossrefs":["syntax-reftype","syntax-valtype","syntax-instr-ref","syntax-instr-parametric","syntax-elemmode","syntax-elem"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-table-instructions","anchors":[],"title":"Table Instructions","level":3,"path":"appendix/changes","prose":"Added instructions to directly access and modify tables. [#proposal-reftype]_\n\n Table types allow any reference type as element type\n\n New table instructions:\n\n - TABLEGET\n - TABLESET\n - TABLESIZE\n - TABLEGROW","crossrefs":["syntax-tabletype","syntax-reftype","syntax-instr-table"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-multiple-tables","anchors":[],"title":"Multiple Tables","level":3,"path":"appendix/changes","prose":"Added the ability to use multiple tables per module. [#proposal-reftype]_\n\n Modules may\n\n - define multiple tables\n - import multiple tables\n - export multiple tables\n\n Table instructions take a table index immediate:\n\n - TABLEGET\n - TABLESET\n - TABLESIZE\n - TABLEGROW\n - CALLINDIRECT\n\n* Element segments take a table index","crossrefs":["syntax-module","syntax-table","syntax-import","syntax-export","syntax-instr-table","syntax-tableidx","syntax-elem"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-bulk-memory-and-table-instructions","anchors":[],"title":"Bulk Memory and Table Instructions","level":3,"path":"appendix/changes","prose":"Added instructions that modify ranges of memory or table entries. [#proposal-reftype]_ [#proposal-bulk]_\n\n New memory instructions:\n\n - MEMORYFILL\n - MEMORYINIT\n - MEMORYCOPY\n - DATADROP\n\n New table instructions:\n\n - TABLEFILL\n - TABLEINIT\n - TABLECOPY\n - ELEMDROP\n\n New passive form of data segment\n\n New passive form of element segment\n\n New data count section in binary format\n\n Active data and element segments boundaries are no longer checked at compile time but may trap instead","crossrefs":["syntax-instr-memory","syntax-instr-table","syntax-datamode","syntax-data","syntax-elemmode","syntax-elem","binary-datacntsec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-vector-instructions","anchors":[],"title":"Vector Instructions","level":3,"path":"appendix/changes","prose":"Added vector type and instructions that manipulate multiple numeric values in parallel\n(also known as SIMD, single instruction multiple data) [#proposal-vectype]_\n\n New value type:\n\n - V128\n\n New memory instructions:\n\n - \\K{v128.}\\LOAD\n - \\K{v128.}\\LOAD{}\\!N\\!\\K{x}\\!M\\!\\K{\\_}\\sx\n - \\K{v128.}\\LOAD{}N\\K{\\_zero}\n - \\K{v128.}\\LOAD{}N\\K{\\_splat}\n - \\K{v128.}\\LOAD{}N\\K{\\_lane}\n - \\K{v128.}\\STORE\n - \\K{v128.}\\STORE{}N\\K{\\_lane}\n\n New constant vector instruction:\n\n - \\K{v128.}\\VCONST\n\n New unary vector instructions:\n\n - \\K{v128.not}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.abs}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.neg}\n - \\K{i8x16.popcnt}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.abs}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.neg}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.sqrt}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.ceil}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.floor}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.trunc}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.nearest}\n\n New binary vector instructions:\n\n - \\K{v128.and}\n - \\K{v128.andnot}\n - \\K{v128.or}\n - \\K{v128.xor}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.add}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.sub}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.mul}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.add\\_sat\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.sub\\_sat\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.min\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.max\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.shl}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.shr\\_}\\sx\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.add}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.sub}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.mul}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.div}\n - \\K{i16x8.extadd\\_pairwise\\_i8x16\\_}\\sx\n - \\K{i32x4.extadd\\_pairwise\\_i16x8\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.extmul\\_}\\half\\K{\\_i}\\!N'\\!\\K{x}\\!M'\\!\\K{\\_}\\sx\n - \\K{i16x8.q15mulr\\_sat\\_s}\n - \\K{i32x4.dot\\_i16x8\\_s}\n - \\K{i8x16.avgr\\_u}\n - \\K{i16x8.avgr\\_u}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.min}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.max}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.pmin}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.pmax}\n\n New ternary vector instruction:\n\n - \\K{v128.bitselect}\n\n New test vector instructions:\n\n - \\K{v128.any\\_true}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.all\\_true}\n\n New relational vector instructions:\n\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.eq}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.ne}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.lt\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.gt\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.le\\_}\\sx\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.ge\\_}\\sx\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.eq}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.ne}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.lt}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.gt}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.le}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.ge}\n\n New conversion vector instructions:\n\n - \\K{i32x4.trunc\\_sat\\_f32x4\\_}\\sx\n - \\K{i32x4.trunc\\_sat\\_f64x2\\_}\\sx\\K{\\_zero}\n - \\K{f32x4.convert\\_i32x4\\_}\\sx\n - \\K{f32x4.demote\\_f64x2\\_zero}\n - \\K{f64x2.convert\\_low\\_i32x4\\_}\\sx\n - \\K{f64x2.promote\\_low\\_f32x4}\n\n New lane access vector instructions:\n\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.extract\\_lane\\_}\\sx^?\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.replace\\_lane}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.extract\\_lane}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.replace\\_lane}\n\n New lane splitting/combining vector instructions:\n\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.extend\\_}\\half\\K{\\_i}\\!N'\\!\\K{x}\\!M'\\!\\K{\\_}\\sx\n - \\K{i8x16.narrow\\_i16x8\\_}\\sx\n - \\K{i16x8.narrow\\_i32x4\\_}\\sx\n\n New byte reordering vector instructions:\n\n - \\K{i8x16.shuffle}\n - \\K{i8x16.swizzle}\n\n* New injection/projection vector instructions:\n\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.splat}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.splat}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.bitmask}\n\n.. [#proposal-signext]\n https://github.com/WebAssembly/spec/tree/main/proposals/sign-extension-ops/\n\n.. [#proposal-cvtsat]\n https://github.com/WebAssembly/spec/tree/main/proposals/nontrapping-float-to-int-conversion/\n\n.. [#proposal-multivalue]\n https://github.com/WebAssembly/spec/tree/main/proposals/multi-value/\n\n.. [#proposal-reftype]\n https://github.com/WebAssembly/spec/tree/main/proposals/reference-types/\n\n.. [#proposal-bulk]\n https://github.com/WebAssembly/spec/tree/main/proposals/bulk-memory-operations/\n\n.. [#proposal-vectype]\n https://github.com/WebAssembly/spec/tree/main/proposals/simd/","crossrefs":["syntax-valtype","syntax-instr-memory","syntax-instr-vec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-release-3-0","anchors":[],"title":"Release 3.0","level":2,"path":"appendix/changes","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-extended-constant-expressions","anchors":[],"title":"Extended Constant Expressions","level":3,"path":"appendix/changes","prose":"Allowed basic numeric computations in constant expressions. [#proposal-extconst]_\n\n* Extended set of constant instructions with:\n\n - \\K{i}\\X{nn}\\K{.add}\n - \\K{i}\\X{nn}\\K{.sub}\n - \\K{i}\\X{nn}\\K{.mul}\n - GLOBALGET for any previously declared immutable global\n\n The garbage collection extension added further constant instructions.","crossrefs":["valid-constant","syntax-global","extension-gc"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-tail-calls","anchors":[],"title":"Tail Calls","level":3,"path":"appendix/changes","prose":"Added instructions to perform tail calls. [#proposal-tailcall]_\n\n* New control instructions:\n\n - RETURNCALL\n - RETURNCALLINDIRECT","crossrefs":["syntax-instr-control"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-exception-handling","anchors":[],"title":"Exception Handling","level":3,"path":"appendix/changes","prose":"Added tag definitions, imports, and exports, and instructions to throw and catch exceptions. [#proposal-exn]_\n\n Modules may\n\n - define tags\n - import tags\n - export tags\n\n New heap types:\n\n - EXN\n - NOEXN\n\n New reference type short-hands:\n\n - EXNREF\n - NULLEXNREF\n\n New control instructions:\n\n - THROW\n - THROWREF\n - TRYTABLE\n\n* New tag section in binary format.","crossrefs":["syntax-module","syntax-tag","syntax-import","syntax-export","syntax-heaptype","syntax-reftype","syntax-instr-control","binary-tagsec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-multiple-memories","anchors":[],"title":"Multiple Memories","level":3,"path":"appendix/changes","prose":"Added the ability to use multiple memories per module. [#proposal-multimem]_\n\n Modules may\n\n - define multiple memories\n - import multiple memories\n - export multiple memories\n\n Memory instructions take a memory index immediate:\n\n - MEMORYSIZE\n - MEMORYGROW\n - MEMORYFILL\n - MEMORYCOPY\n - MEMORYINIT\n - t\\K{.load}\n - t\\K{.store}\n - t\\K{.load}\\!N\\!\\K{\\_}\\sx\n - t\\K{.store}\\!N\n - \\K{v128.load}\\!N\\!\\K{x}\\!M\\!\\K{\\_}\\sx\n - \\K{v128.load}\\!N\\!\\K{\\_zero}\n - \\K{v128.load}\\!N\\!\\K{\\_splat}\n - \\K{v128.load}\\!N\\!\\K{\\_lane}\n - \\K{v128.store}\\!N\\!\\K{\\_lane}\n\n* Data segments take a memory index","crossrefs":["syntax-module","syntax-mem","syntax-import","syntax-export","syntax-instr-memory","syntax-memidx","syntax-elem"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-64-bit-address-space","anchors":[],"title":"64-bit Address Space","level":3,"path":"appendix/changes","prose":"Added the ability to declare an \\I64 address type for tables and memories. [#proposal-addr64]_\n\n Address types denote a subset of the integral number types\n\n Table types include an address type\n\n Memory types include an address type\n\n Operand types of table and memory instructions now depend on the subject's declared address type:\n\n - TABLEGET\n - TABLESET\n - TABLESIZE\n - TABLEGROW\n - TABLEFILL\n - TABLECOPY\n - TABLEINIT\n - MEMORYSIZE\n - MEMORYGROW\n - MEMORYFILL\n - MEMORYCOPY\n - MEMORYINIT\n - t\\K{.load}\n - t\\K{.store}\n - t\\K{.load}\\!N\\!\\K{\\_}\\sx\n - t\\K{.store}\\!N\n - \\K{v128.load}\\!N\\!\\K{x}\\!M\\!\\K{\\_}\\sx\n - \\K{v128.load}\\!N\\!\\K{\\_zero}\n - \\K{v128.load}\\!N\\!\\K{\\_splat}\n - \\K{v128.load}\\!N\\!\\K{\\_lane}\n - \\K{v128.store}\\!N\\!\\K{\\_lane}","crossrefs":["syntax-addrtype","syntax-tabletype","syntax-memtype","syntax-numtype","syntax-instr-table","syntax-instr-memory"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-typeful-references","anchors":[],"title":"Typeful References","level":3,"path":"appendix/changes","prose":"Added more precise types for references. [#proposal-typedref]_\n\n New generalised form of reference types:\n\n - (\\REF~\\NULL^?~\\heaptype)\n\n New class of heap types:\n\n - FUNC\n - EXTERN\n - \\typeidx\n\n Basic subtyping on reference and value types\n\n New reference instructions:\n\n - REFASNONNULL\n - BRONNULL\n - BRONNONNULL\n\n New control instruction:\n\n - CALLREF\n\n Refined typing of reference instruction:\n\n - REFFUNC with more precise result type\n\n Refined typing of local instructions and instruction sequences to track the initialization status of locals with non-defaultable type\n\n Refined decoding of active element segments with implicit element type and plain function indices (opcode 0) to produce non-null reference type\n\n* Extended table definitions with optional initializer expression","crossrefs":["syntax-reftype","syntax-heaptype","match","match-reftype","match-valtype","syntax-instr-ref","syntax-instr-control","valid-instr-variable","valid-instrs","syntax-init","syntax-local","syntax-elemmode","binary-elem","syntax-null","syntax-table"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"extension-gc","anchors":["extension-gc"],"title":"Garbage Collection","level":3,"path":"appendix/changes","prose":"Added managed reference types. [#proposal-gc]_\n\n New forms of heap types:\n\n - ANY\n - EQT\n - I31\n - STRUCT\n - ARRAY\n - NONE\n - NOFUNC\n - NOEXTERN\n\n New reference type short-hands:\n\n - ANYREF\n - EQREF\n - I31REF\n - STRUCTREF\n - ARRAYREF\n - NULLREF\n - NULLFUNCREF\n - NULLEXTERNREF\n\n New forms of type definitions:\n\n - structure\n - array types\n - sub types\n - recursive types\n\n Enriched subtyping based on explicitly declared sub types and the new heap types\n\n New generic reference instructions:\n\n - REFEQ\n - REFTEST\n - REFCAST\n - BRONCAST\n - BRONCASTFAIL\n\n New reference instructions for unboxed scalars:\n\n - REFI31\n - \\I31GET\\K{\\_}\\sx\n\n New reference instructions for structure types:\n\n - STRUCTNEW\n - STRUCTNEWDEFAULT\n - \\STRUCTGET\\K{\\_}\\sx^?\n - STRUCTSET\n\n New reference instructions for array types:\n\n - ARRAYNEW\n - ARRAYNEWDEFAULT\n - ARRAYNEWFIXED\n - ARRAYNEWDATA\n - ARRAYNEWELEM\n - \\ARRAYGET\\K{\\_}\\sx^?\n - ARRAYSET\n - ARRAYLEN\n - ARRAYFILL\n - ARRAYCOPY\n - ARRAYINITDATA\n - ARRAYINITELEM\n\n New reference instructions for converting external types:\n\n - ANYCONVERTEXTERN\n - EXTERNCONVERTANY\n\n Extended set of constant instructions with:\n\n - REFI31\n - STRUCTNEW\n - STRUCTNEWDEFAULT\n - ARRAYNEW\n - ARRAYNEWDEFAULT\n - ARRAYNEWFIXED\n - ANYCONVERTEXTERN\n - EXTERNCONVERTANY","crossrefs":["syntax-heaptype","syntax-reftype","syntax-structtype","syntax-arraytype","syntax-subtype","syntax-rectype","match","syntax-instr-ref","syntax-i31","syntax-externtype","valid-constant"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html#extension-gc"},{"id":"appendix/changes-relaxed-vector-instructions","anchors":[],"title":"Relaxed Vector Instructions","level":3,"path":"appendix/changes","prose":"Added new relaxed vector instructions,\nwhose behaviour is non-deterministic and implementation-dependent. [#proposal-relaxed]_\n\n New binary vector instruction:\n\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.relaxed\\_min}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.relaxed\\_max}\n - \\K{i16x8.relaxed\\_q15mulr\\_s}\n - \\K{i16x8.relaxed\\_dot\\_i8x16\\_i7x16\\_s}\n\n New ternary vector instruction:\n\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.relaxed\\_madd}\n - \\K{f}\\!N\\!\\K{x}\\!M\\!\\K{.relaxed\\_nmadd}\n - \\K{i}\\!N\\!\\K{x}\\!M\\!\\K{.relaxed\\_laneselect}\n - \\K{i32x4.relaxed\\_dot\\_i8x16\\_i7x16\\_add\\_s}\n\n New conversion vector instructions:\n\n - \\K{i32x4.relaxed\\_trunc\\_f32x4\\_}\\sx\n - \\K{i32x4.relaxed\\_trunc\\_f64x2\\_}\\sx\\K{\\_zero}\n\n New byte reordering vector instruction:\n\n - \\K{i8x16.relaxed\\_swizzle}","crossrefs":["syntax-instr-vec-relaxed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-profiles","anchors":[],"title":"Profiles","level":3,"path":"appendix/changes","prose":"Introduced the concept of profile for specifying language subsets.\n\n* A new profile defining a deterministic mode of execution.","crossrefs":["profiles","profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/changes-custom-annotations","anchors":[],"title":"Custom Annotations","level":3,"path":"appendix/changes","prose":"Added generic syntax for custom annotations in the text format,\nmirroring the role of custom sections in the binary format. [#proposal-annot]_\n\n Annotations of the form \\text{(@id~\\dots)} are allowed anywhere in the text format\n\n Identifiers can be escaped as \\text{@\"\\dots\"} with arbitrary names\n\n Defined name annotations \\text{(@name~\"\\dots\")} for:\n\n - module names\n - type names\n - function names\n - local names\n - field names\n\n Defined custom annotation \\text{(@custom~\"\\dots\")} to represent arbitrary custom sections in the text format\n\n.. [#proposal-extconst]\n https://github.com/WebAssembly/spec/tree/main/proposals/extended-const/\n\n.. [#proposal-tailcall]\n https://github.com/WebAssembly/spec/tree/main/proposals/tail-call/\n\n.. [#proposal-exn]\n https://github.com/WebAssembly/spec/tree/main/proposals/exception-handling/\n\n.. [#proposal-multimem]\n https://github.com/WebAssembly/spec/tree/main/proposals/multi-memory/\n\n.. [#proposal-addr64]\n https://github.com/WebAssembly/spec/tree/main/proposals/memory64/\n\n.. [#proposal-typedref]\n https://github.com/WebAssembly/spec/tree/main/proposals/function-references/\n\n.. [#proposal-gc]\n https://github.com/WebAssembly/spec/tree/main/proposals/gc/\n\n.. [#proposal-relaxed]\n https://github.com/WebAssembly/spec/tree/main/proposals/relaxed-simd/\n\n.. [#proposal-annot]\n https://github.com/WebAssembly/spec/tree/main/proposals/annotations/","crossrefs":["text-annot","text","text-id","text-name","text-nameannot","text-modulenameannot","text-typenameannot","text-funcnameannot","text-localnameannot","text-fieldnameannot","text-customannot","binary-customsec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/changes.html"},{"id":"appendix/custom-custom-sections-and-annotations","anchors":[],"title":"Custom Sections and Annotations","level":1,"path":"appendix/custom","prose":"This appendix defines dedicated custom sections for WebAssembly's binary format and annotations for the text format.\nSuch sections or annotations do not contribute to, or otherwise affect, the WebAssembly semantics, and may be ignored by an implementation.\nHowever, they provide useful meta data that implementations can make use of to improve user experience or take compilation hints.","crossrefs":["binary-customsec","binary","text-annot"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html"},{"id":"binary-namesec","anchors":["binary-namesec"],"title":"Name Section","level":2,"path":"appendix/custom","prose":"The name section is a custom section whose name string is itself \\text{name}.\nThe name section should appear only once in a module, and only after the data section.\n\nThe purpose of this section is to attach printable names to definitions in a module, which e.g. can be used by a debugger or when parts of the module are to be rendered in text form.\n\n All names are represented in Unicode encoded in UTF-8.\n Names need not be unique.","crossrefs":["binary-customsec","binary-datasec","text","binary-name"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-namesec"},{"id":"binary-namesubsection","anchors":["binary-namesubsection"],"title":"Subsections","level":3,"path":"appendix/custom","prose":"The data of a name section consists of a sequence of subsections.\nEach subsection consists of a\n\n a one-byte subsection id,\n the U32 size of the contents, in bytes,\n the actual contents*, whose structure is dependent on the subsection id.\n\nThe following subsection ids are used:\n\n== ===========================================\nId Subsection \n== ===========================================\n 0 module name\n 1 function names \n 2 local names\n 4 type names\n10 field names\n11 tag names\n== ===========================================\n\nEach subsection may occur at most once, and in order of increasing id.","crossrefs":["binary-customsec","binary-modulenamesec","binary-funcnamesec","binary-localnamesec","binary-typenamesec","binary-fieldnamesec","binary-tagnamesec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-namesubsection"},{"id":"binary-indirectnamemap","anchors":["binary-indirectnamemap","binary-namemap"],"title":"Name Maps","level":3,"path":"appendix/custom","prose":"A name map assigns names to indices in a given index space.\nIt consists of a list of index/name pairs in order of increasing index value.\nEach index must be unique, but the assigned names need not be.\n\nAn indirect name map assigns names to a two-dimensional index space, where secondary indices are grouped by primary indices.\nIt consists of a list of primary index/name map pairs in order of increasing index value, where each name map in turn maps secondary indices to names.\nEach primary index must be unique, and likewise each secondary index per individual name map.","crossrefs":["syntax-name","syntax-index","binary-list"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-indirectnamemap"},{"id":"binary-modulenamesec","anchors":["binary-modulenamesec"],"title":"Module Names","level":3,"path":"appendix/custom","prose":"The module name subsection has the id 0.\nIt simply consists of a single name that is assigned to the module itself.","crossrefs":["binary-name"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-modulenamesec"},{"id":"binary-funcnamesec","anchors":["binary-funcnamesec"],"title":"Function Names","level":3,"path":"appendix/custom","prose":"The function name subsection has the id 1.\nIt consists of a name map assigning function names to function indices.","crossrefs":["binary-namemap","syntax-funcidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-funcnamesec"},{"id":"binary-localnamesec","anchors":["binary-localnamesec"],"title":"Local Names","level":3,"path":"appendix/custom","prose":"The local name subsection has the id 2.\nIt consists of an indirect name map assigning local names to local indices grouped by function indices.","crossrefs":["binary-indirectnamemap","syntax-localidx","syntax-funcidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-localnamesec"},{"id":"binary-typenamesec","anchors":["binary-typenamesec"],"title":"Type Names","level":3,"path":"appendix/custom","prose":"The type name subsection has the id 4.\nIt consists of a name map assigning type names to type indices.","crossrefs":["binary-namemap","syntax-typeidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-typenamesec"},{"id":"binary-fieldnamesec","anchors":["binary-fieldnamesec"],"title":"Field Names","level":3,"path":"appendix/custom","prose":"The field name subsection has the id 10.\nIt consists of an indirect name map assigning field names to field indices grouped by the type indices of their respective structure types.","crossrefs":["binary-indirectnamemap","syntax-fieldidx","syntax-typeidx","syntax-structtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-fieldnamesec"},{"id":"binary-tagnamesec","anchors":["binary-tagnamesec"],"title":"Tag Names","level":3,"path":"appendix/custom","prose":"The tag name subsection has the id 11.\nIt consists of a name map assigning tag names to tag indices.","crossrefs":["binary-namemap","syntax-tagidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#binary-tagnamesec"},{"id":"text-nameannot","anchors":["text-nameannot"],"title":"Name Annotations","level":2,"path":"appendix/custom","prose":"Name annotations are the textual analogue to the name section and provide a textual representation for it.\nConsequently, their id is \\T{@name}.\n\nAnalogous to the name section, name annotations are allowed on modules, functions, and locals (including parameters).\nThey can be placed where the text format allows binding occurrences of respective identifiers.\nIf both an identifier and a name annotation are given, the annotation is expected after the identifier.\nIn that case, the annotation takes precedence over the identifier as a textual representation of the binding's name.\nAt most one name annotation may be given per binding.\n\nAll name annotations have the following format:\n\n All name annotations can be arbitrary UTF-8 strings.\n Names need not be unique.","crossrefs":["binary-namesec","text-module","text-func","text-local","text-param","text-id","text-string"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-nameannot"},{"id":"text-modulenameannot","anchors":["text-modulenameannot"],"title":"Module Names","level":3,"path":"appendix/custom","prose":"A module name annotation must be placed on a module definition,\ndirectly after the \\text{module} keyword, or if present, after the following module identifier.","crossrefs":["text-module","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-modulenameannot"},{"id":"text-funcnameannot","anchors":["text-funcnameannot"],"title":"Function Names","level":3,"path":"appendix/custom","prose":"A function name annotation must be placed on a function definition or function import,\ndirectly after the \\text{func} keyword, or if present, after the following function identifier or.","crossrefs":["text-func","text-import","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-funcnameannot"},{"id":"text-paramnameannot","anchors":["text-paramnameannot"],"title":"Parameter Names","level":3,"path":"appendix/custom","prose":"A parameter name annotation must be placed on a parameter declaration,\ndirectly after the \\text{param} keyword, or if present, after the following parameter identifier.\nIt may only be placed on a declaration that declares exactly one parameter.","crossrefs":["text-param","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-paramnameannot"},{"id":"text-localnameannot","anchors":["text-localnameannot"],"title":"Local Names","level":3,"path":"appendix/custom","prose":"A local name annotation must be placed on a local declaration,\ndirectly after the \\text{local} keyword, or if present, after the following local identifier.\nIt may only be placed on a declaration that declares exactly one local.","crossrefs":["text-param","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-localnameannot"},{"id":"text-typenameannot","anchors":["text-typenameannot"],"title":"Type Names","level":3,"path":"appendix/custom","prose":"A type name annotation must be placed on a type declaration,\ndirectly after the \\text{type} keyword, or if present, after the following type identifier.","crossrefs":["text-type","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-typenameannot"},{"id":"text-fieldnameannot","anchors":["text-fieldnameannot"],"title":"Field Names","level":3,"path":"appendix/custom","prose":"A field name annotation must be placed on the field of a structure type,\ndirectly after the \\text{field} keyword, or if present, after the following field identifier.\nIt may only be placed on a declaration that declares exactly one field.","crossrefs":["text-structtype","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-fieldnameannot"},{"id":"text-tagnameannot","anchors":["text-tagnameannot"],"title":"Tag Names","level":3,"path":"appendix/custom","prose":"A tag name annotation must be placed on a tag declaration or tag import,\ndirectly after the \\text{tag} keyword, or if present, after the following tag identifier.","crossrefs":["text-tag","text-import","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-tagnameannot"},{"id":"text-customannot","anchors":["text-customannot"],"title":"Custom Annotations","level":2,"path":"appendix/custom","prose":"Custom annotations are a generic textual representation for any custom section.\nTheir id is \\T{@custom}.\nBy generating custom annotations, tools converting between binary format and text format can maintain and round-trip the content of custom sections even when they do not recognize them.\n\nCustom annotations must be placed inside a module definition.\nThey must occur anywhere after the \\text{module} keyword, or if present, after the following module identifier.\nThey must not be nested into other constructs.\n\nThe first string in a custom annotation denotes the name of the custom section it represents.\nThe remaining strings collectively represent the section's payload data, written as a data string, which can be split up into a possibly empty sequence of individual string literals (similar to data segments).\n\nAn arbitrary number of custom annotations (even of the same name) may occur in a module,\neach defining a separate custom section when converting to binary format.\nPlacement of the sections in the binary can be customized via explicit placement directives, that position them either directly before or directly after a known section.\nThat section must exist and be non-empty in the binary encoding of the annotated module.\nThe placements \\T{(before~first)} and \\T{(after~last)} denote virtual sections before the first and after the last known section, respectively.\nWhen the placement directive is omitted, it defaults to \\T{(after~last)}.\n\nIf multiple placement directives appear for the same position, then the sections are all placed there, in order of their appearance in the text.\nFor this purpose, the position \\T{after} a section is considered different from the position \\T{before} the consecutive section, and the former occurs before the latter.\n\n Future versions of WebAssembly may introduce additional sections between others or at the beginning or end of a module.\n Using \\T{first} and \\T{last} guarantees that placement will still go before or after any future section, respectively.\n\nIf a custom section with a specific section id is given as well as annotations representing the same custom section (e.g., \\T{@name} annotations as well as a \\T{@custom} annotation for a \\T{name} section), then two sections are assumed to be created.\nTheir relative placement will depend on the placement directive given for the \\T{@custom} annotation as well as the implicit placement requirements of the custom section, which are applied to the other annotation.\n\n For example, the following module,\n\n .. code-block:: none\n\n (module\n (@custom \"A\" \"aaa\")\n (type $t (func))\n (@custom \"B\" (after func) \"bbb\")\n (@custom \"C\" (before func) \"ccc\")\n (@custom \"D\" (after last) \"ddd\")\n (table 10 funcref)\n (func (type $t))\n (@custom \"E\" (after import) \"eee\")\n (@custom \"F\" (before type) \"fff\")\n (@custom \"G\" (after data) \"ggg\")\n (@custom \"H\" (after code) \"hhh\")\n (@custom \"I\" (after func) \"iii\")\n (@custom \"J\" (before func) \"jjj\")\n (@custom \"K\" (before first) \"kkk\")\n )\n\n will result in the following section ordering:\n\n .. code-block:: none\n\n custom section \"K\"\n custom section \"F\"\n type section\n custom section \"E\"\n custom section \"C\"\n custom section \"J\"\n function section\n custom section \"B\"\n custom section \"I\"\n table section\n code section\n custom section \"H\"\n custom section \"G\"\n custom section \"A\"\n custom section \"D\"","crossrefs":["binary-customsec","binary","text","text-module","text-id","text-string","text-datastring","text-data","text-nameannot","binary-namesec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/custom.html#text-customannot"},{"id":"embed","anchors":["embed"],"title":"Embedding","level":1,"path":"appendix/embedding","prose":"A WebAssembly implementation will typically be embedded into a host environment.\nAn embedder implements the connection between such a host environment and the WebAssembly semantics as defined in the main body of this specification.\nAn embedder is expected to interact with the semantics in well-defined ways.\n\nThis section defines a suitable interface to the WebAssembly semantics in the form of entry points through which an embedder can access it.\nThe interface is intended to be complete, in the sense that an embedder does not need to reference other functional parts of the WebAssembly specification directly.\n\n On the other hand, an embedder does not need to provide the host environment with access to all functionality defined in this interface.\n For example, an implementation may not support parsing of the text format.","crossrefs":["embed-module-parse","text"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed"},{"id":"appendix/embedding-types","anchors":[],"title":"Types","level":2,"path":"appendix/embedding","prose":"In the description of the embedder interface, syntactic classes from the abstract syntax and the runtime's abstract machine are used as names for variables that range over the possible objects from that class.\nHence, these syntactic classes can also be interpreted as types.\n\nFor numeric parameters, notation like i:\\u64 is used to specify a symbolic name in addition to the respective value range.","crossrefs":["syntax","syntax-runtime"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"embed-bool","anchors":["embed-bool"],"title":"Booleans","level":2,"path":"appendix/embedding","prose":"Interface operation that are predicates return Boolean values:","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-bool"},{"id":"embed-error","anchors":["embed-error"],"title":"Exceptions and Errors","level":2,"path":"appendix/embedding","prose":"Invoking an exported function may throw or propagate exceptions, expressed by an auxiliary syntactic class:\n\nThe exception address exnaddr identifies the exception thrown.\n\nFailure of an interface operation is also indicated by an auxiliary syntactic class:\n\nIn addition to the error conditions specified explicitly in this section, such as invalid arguments or exceptions and traps resulting from execution, implementations may also return errors when specific implementation limitations are reached.\n\n Errors are abstract and unspecific with this definition.\n Implementations can refine it to carry suitable classifications and diagnostic messages.","crossrefs":["exception","trap","exec","impl"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-error"},{"id":"appendix/embedding-pre-and-post-conditions","anchors":[],"title":"Pre- and Post-Conditions","level":2,"path":"appendix/embedding","prose":"Some operations state pre-conditions about their arguments or post-conditions about their results.\nIt is the embedder's responsibility to meet the pre-conditions.\nIf it does, the post conditions are guaranteed by the semantics.\n\nIn addition to pre- and post-conditions explicitly stated with each operation, the specification adopts the following conventions for runtime objects (\\store, \\moduleinst, addresses):\n\n Every runtime object passed as a parameter must be valid per an implicit pre-condition.\n\n Every runtime object returned as a result is valid per an implicit post-condition.\n\n As long as an embedder treats runtime objects as abstract and only creates and manipulates them through the interface defined here, all implicit pre-conditions are automatically met.","crossrefs":["syntax-runtime","syntax-addr","valid-store"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"embed-store","anchors":["embed-store"],"title":"Store","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-store"},{"id":"embed-store-init","anchors":["embed-store-init"],"title":":math:`\\F{store\\_init}() : \\store`","level":3,"path":"appendix/embedding","prose":"1. Return the empty store.","crossrefs":["syntax-store"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-store-init"},{"id":"embed-module","anchors":["embed-module"],"title":"Modules","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module"},{"id":"embed-module-decode","anchors":["embed-module-decode"],"title":":math:`\\F{module\\_decode}(\\byte^\\ast) : \\module ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. If there exists a derivation for the byte sequence \\byte^\\ast as a \\Bmodule according to the binary grammar for modules, yielding a module m, then return m.\n\n2. Else, return \\ERROR.","crossrefs":["syntax-byte","binary-module","syntax-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-decode"},{"id":"embed-module-parse","anchors":["embed-module-parse"],"title":":math:`\\F{module\\_parse}(\\char^\\ast) : \\module ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. If there exists a derivation for the source \\char^\\ast as a \\Tmodule according to the text grammar for modules, yielding a module m, then return m.\n\n2. Else, return \\ERROR.","crossrefs":["text-source","text-module","syntax-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-parse"},{"id":"embed-module-validate","anchors":["embed-module-validate"],"title":":math:`\\F{module\\_validate}(\\module) : \\error^?`","level":3,"path":"appendix/embedding","prose":"1. If \\module is valid, then return nothing.\n\n2. Else, return \\ERROR.","crossrefs":["valid-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-validate"},{"id":"embed-module-instantiate","anchors":["embed-module-instantiate"],"title":":math:`\\F{module\\_instantiate}(\\store, \\module, \\externaddr^\\ast) : (\\store, \\moduleinst ~|~ \\exception ~|~ \\error)`","level":3,"path":"appendix/embedding","prose":"1. Try instantiating \\module in \\store with external addresses \\externaddr^\\ast as imports:\n\n a. If it succeeds with a module instance \\moduleinst, then let \\X{result} be \\moduleinst.\n\n b. Else, let \\X{result} be \\ERROR.\n\n2. Return the new store paired with \\X{result}.\n\n The store may be modified even in case of an error.","crossrefs":["exec-instantiation","syntax-externaddr","syntax-moduleinst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-instantiate"},{"id":"embed-module-imports","anchors":["embed-module-imports"],"title":":math:`\\F{module\\_imports}(\\module) : (\\name, \\name, \\externtype)^\\ast`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: \\module is valid with the external import types \\externtype^\\ast and external export types {\\externtype'}^\\ast.\n\n2. Let \\import^\\ast be the imports of \\module.\n\n3. Assert: the length of \\import^\\ast equals the length of \\externtype^\\ast.\n\n4. For each \\import_i in \\import^\\ast and corresponding \\externtype_i in \\externtype^\\ast, do:\n\n a. Let \\IMPORT~\\X{nm}_{i1}~\\X{nm}_{i2}~\\X{xt}_i be the deconstruction of \\import_i.\n\n b. Let \\X{result}_i be the triple (\\X{nm}_{i1}, \\X{nm}_{i2}, \\externtype_i).\n\n5. Return the concatenation of all \\X{result}_i, in index order.\n\n6. Post-condition: each \\externtype_i is valid under the empty context.","crossrefs":["valid-module","syntax-import","valid-externtype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-imports"},{"id":"embed-module-exports","anchors":["embed-module-exports"],"title":":math:`\\F{module\\_exports}(\\module) : (\\name, \\externtype)^\\ast`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: \\module is valid with the external import types \\externtype^\\ast and external export types {\\externtype'}^\\ast.\n\n2. Let \\export^\\ast be the exports of \\module.\n\n3. Assert: the length of \\export^\\ast equals the length of {\\externtype'}^\\ast.\n\n4. For each \\export_i in \\export^\\ast and corresponding \\externtype'_i in {\\externtype'}^\\ast, do:\n\n a. Let \\EXPORT~\\X{nm}_i~\\externidx_i be the deconstruction of \\export_i.\n\n b. Let \\X{result}_i be the pair (\\X{nm}_i, \\externtype'_i).\n\n5. Return the concatenation of all \\X{result}_i, in index order.\n\n6. Post-condition: each \\externtype'_i is valid under the empty context.","crossrefs":["valid-module","syntax-export","valid-externtype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-module-exports"},{"id":"embed-instance","anchors":["embed-instance"],"title":"Module Instances","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-instance"},{"id":"embed-instance-export","anchors":["embed-instance-export"],"title":":math:`\\F{instance\\_export}(\\moduleinst, \\name) : \\externaddr ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Assert: due to validity of the module instance \\moduleinst, all its export names are different.\n\n2. If there exists an \\exportinst_i in \\moduleinst.\\MIEXPORTS such that name \\exportinst_i.\\XINAME equals \\name, then:\n\n a. Return the external address \\exportinst_i.\\XIADDR.\n\n3. Else, return \\ERROR.","crossrefs":["valid-moduleinst","syntax-moduleinst","syntax-exportinst","syntax-name","syntax-externaddr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-instance-export"},{"id":"embed-func","anchors":["embed-func"],"title":"Functions","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-func"},{"id":"embed-func-alloc","anchors":["embed-func-alloc"],"title":":math:`\\F{func\\_alloc}(\\store, \\deftype, \\hostfunc) : (\\store, \\funcaddr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the defined type \\deftype is valid under the empty context and expands to a function type.\n\n2. Let \\funcaddr be the result of allocating a host function in \\store with defined type \\deftype, host function code \\hostfunc and an empty module instance.\n\n3. Return the new store paired with \\funcaddr.\n\n This operation assumes that \\hostfunc satisfies the pre- and post-conditions required for a function instance with type \\deftype.\n\n Regular (non-host) function instances can only be created indirectly through module instantiation.","crossrefs":["syntax-deftype","valid-deftype","context","aux-expand-deftype","syntax-functype","alloc-func","syntax-moduleinst","exec-invoke-host","embed-module-instantiate"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-func-alloc"},{"id":"embed-func-type","anchors":["embed-func-type"],"title":":math:`\\F{func\\_type}(\\store, \\funcaddr) : \\deftype`","level":3,"path":"appendix/embedding","prose":"1. Let \\deftype be the definedn type S.\\SFUNCS[a].\\FITYPE.\n\n2. Return \\deftype.\n\n3. Post-condition: the returned defined type is valid and expands to a function type.","crossrefs":["syntax-deftype","valid-deftype","aux-expand-deftype","syntax-functype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-func-type"},{"id":"embed-func-invoke","anchors":["embed-func-invoke"],"title":":math:`\\F{func\\_invoke}(\\store, \\funcaddr, \\val^\\ast) : (\\store, \\val^\\ast ~|~ \\exception ~|~ \\error)`","level":3,"path":"appendix/embedding","prose":"1. Try invoking the function \\funcaddr in \\store with values \\val^\\ast as arguments:\n\n a. If it succeeds with values {\\val'}^\\ast as results, then let \\X{result} be {\\val'}^\\ast.\n\n b. Else if the outcome is an exception with a thrown exception \\REFEXNADDR~\\exnaddr as the result, then let \\X{result} be \\EXCEPTION~\\exnaddr\n\n c. Else it has trapped, hence let \\X{result} be \\ERROR.\n\n2. Return the new store paired with \\X{result}.\n\n The store may be modified even in case of an error.","crossrefs":["exec-invocation","syntax-val","exec-throw_ref"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-func-invoke"},{"id":"embed-table","anchors":["embed-table"],"title":"Tables","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table"},{"id":"embed-table-alloc","anchors":["embed-table-alloc"],"title":":math:`\\F{table\\_alloc}(\\store, \\tabletype, \\reff) : (\\store, \\tableaddr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the \\tabletype is valid under the empty context.\n\n2. Let \\tableaddr be the result of allocating a table in \\store with table type \\tabletype and initialization value \\reff.\n\n3. Return the new store paired with \\tableaddr.","crossrefs":["valid-tabletype","context","alloc-table","syntax-tabletype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-alloc"},{"id":"embed-table-type","anchors":["embed-table-type"],"title":":math:`\\F{table\\_type}(\\store, \\tableaddr) : \\tabletype`","level":3,"path":"appendix/embedding","prose":"1. Return S.\\STABLES[a].\\TITYPE.\n\n2. Post-condition: the returned table type is valid under the empty context.","crossrefs":["syntax-tabletype","valid-tabletype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-type"},{"id":"embed-table-read","anchors":["embed-table-read"],"title":":math:`\\F{table\\_read}(\\store, \\tableaddr, i:\\u64) : \\reff ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{ti} be the table instance \\store.\\STABLES[\\tableaddr].\n\n2. If i is larger than or equal to the length of \\X{ti}.\\TIREFS, then return \\ERROR.\n\n3. Else, return the reference value \\X{ti}.\\TIREFS[i].","crossrefs":["syntax-tableinst","syntax-ref"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-read"},{"id":"embed-table-write","anchors":["embed-table-write"],"title":":math:`\\F{table\\_write}(\\store, \\tableaddr, i:\\u64, \\reff) : \\store ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{ti} be the table instance \\store.\\STABLES[\\tableaddr].\n\n2. If i is larger than or equal to the length of \\X{ti}.\\TIREFS, then return \\ERROR.\n\n3. Replace \\X{ti}.\\TIREFS[i] with the reference value \\reff.\n\n4. Return the updated store.","crossrefs":["syntax-tableinst","syntax-ref"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-write"},{"id":"embed-table-size","anchors":["embed-table-size"],"title":":math:`\\F{table\\_size}(\\store, \\tableaddr) : \\u64`","level":3,"path":"appendix/embedding","prose":"1. Return the length of \\store.\\STABLES[\\tableaddr].\\TIREFS.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-size"},{"id":"embed-table-grow","anchors":["embed-table-grow"],"title":":math:`\\F{table\\_grow}(\\store, \\tableaddr, n:\\u64, \\reff) : \\store ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Try growing the table instance \\store.\\STABLES[\\tableaddr] by n elements with initialization value \\reff:\n\n a. If it succeeds, return the updated store.\n\n b. Else, return \\ERROR.","crossrefs":["grow-table","syntax-tableinst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-table-grow"},{"id":"embed-mem","anchors":["embed-mem"],"title":"Memories","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem"},{"id":"embed-mem-alloc","anchors":["embed-mem-alloc"],"title":":math:`\\F{mem\\_alloc}(\\store, \\memtype) : (\\store, \\memaddr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the \\memtype is valid under the empty context.\n\n2. Let \\memaddr be the result of allocating a memory in \\store with memory type \\memtype.\n\n3. Return the new store paired with \\memaddr.","crossrefs":["valid-memtype","context","alloc-mem","syntax-memtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-alloc"},{"id":"embed-mem-type","anchors":["embed-mem-type"],"title":":math:`\\F{mem\\_type}(\\store, \\memaddr) : \\memtype`","level":3,"path":"appendix/embedding","prose":"1. Return S.\\SMEMS[a].\\MITYPE.\n\n2. Post-condition: the returned memory type is valid under the empty context.","crossrefs":["syntax-memtype","valid-memtype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-type"},{"id":"embed-mem-read","anchors":["embed-mem-read"],"title":":math:`\\F{mem\\_read}(\\store, \\memaddr, i:\\u64) : \\byte ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{mi} be the memory instance \\store.\\SMEMS[\\memaddr].\n\n2. If i is larger than or equal to the length of \\X{mi}.\\MIBYTES, then return \\ERROR.\n\n3. Else, return the byte \\X{mi}.\\MIBYTES[i].","crossrefs":["syntax-meminst","syntax-byte"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-read"},{"id":"embed-mem-write","anchors":["embed-mem-write"],"title":":math:`\\F{mem\\_write}(\\store, \\memaddr, i:\\u64, \\byte) : \\store ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{mi} be the memory instance \\store.\\SMEMS[\\memaddr].\n\n2. If i is larger than or equal to the length of \\X{mi}.\\MIBYTES, then return \\ERROR.\n\n3. Replace \\X{mi}.\\MIBYTES[i] with \\byte.\n\n4. Return the updated store.","crossrefs":["syntax-meminst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-write"},{"id":"embed-mem-size","anchors":["embed-mem-size"],"title":":math:`\\F{mem\\_size}(\\store, \\memaddr) : \\u64`","level":3,"path":"appendix/embedding","prose":"1. Return the length of \\store.\\SMEMS[\\memaddr].\\MIBYTES divided by the page size.","crossrefs":["page-size"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-size"},{"id":"embed-mem-grow","anchors":["embed-mem-grow"],"title":":math:`\\F{mem\\_grow}(\\store, \\memaddr, n:\\u64) : \\store ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Try growing the memory instance \\store.\\SMEMS[\\memaddr] by n pages:\n\n a. If it succeeds, return the updated store.\n\n b. Else, return \\ERROR.","crossrefs":["grow-mem","syntax-meminst","page-size"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-mem-grow"},{"id":"embed-tag","anchors":["embed-tag"],"title":"Tags","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-tag"},{"id":"embedd-tag-alloc","anchors":["embedd-tag-alloc"],"title":":math:`\\F{tag\\_alloc}(\\store, \\tagtype) : (\\store, \\tagaddr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: tagtype is valid.\n\n2. Let \\tagaddr be the result of allocating a tag in \\store with tag type \\tagtype.\n\n3. Return the new store paired with \\tagaddr.","crossrefs":["valid-tagtype","alloc-tag","syntax-tagtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embedd-tag-alloc"},{"id":"embed-tag-type","anchors":["embed-tag-type"],"title":":math:`\\F{tag\\_type}(\\store, \\tagaddr) : \\tagtype`","level":3,"path":"appendix/embedding","prose":"1. Return S.\\STAGS[a].\\HITYPE.\n\n2. Post-condition: the returned tag type is valid.","crossrefs":["syntax-tagtype","valid-tagtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-tag-type"},{"id":"embed-exception","anchors":["embed-exception"],"title":"Exceptions","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-exception"},{"id":"embed-exn-alloc","anchors":["embed-exn-alloc"],"title":":math:`\\F{exn\\_alloc}(\\store, \\tagaddr, \\val^\\ast) : (\\store, \\exnaddr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: \\tagaddr is an allocated tag address.\n\n2. Let \\exnaddr be the result of allocating an exception instance in \\store with tag address \\tagaddr and initialization values \\val^\\ast.\n\n3. Return the new store paired with \\exnaddr.","crossrefs":["syntax-tagaddr","syntax-exninst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-exn-alloc"},{"id":"embed-exn-tag","anchors":["embed-exn-tag"],"title":":math:`\\F{exn\\_tag}(\\store, \\exnaddr) : \\tagaddr`","level":3,"path":"appendix/embedding","prose":"1. Let \\exninst be the exception instance \\store.\\SEXNS[\\exnaddr].\n\n2. Return the tag address \\exninst.\\EITAG.","crossrefs":["syntax-exninst","syntax-tagaddr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-exn-tag"},{"id":"embed-exn-read","anchors":["embed-exn-read"],"title":":math:`\\F{exn\\_read}(\\store, \\exnaddr) : \\val^\\ast`","level":3,"path":"appendix/embedding","prose":"1. Let \\exninst be the exception instance \\store.\\SEXNS[\\exnaddr].\n\n2. Return the values \\exninst.\\EIFIELDS.","crossrefs":["syntax-exninst","syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-exn-read"},{"id":"embed-global","anchors":["embed-global"],"title":"Globals","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-global"},{"id":"embed-global-alloc","anchors":["embed-global-alloc"],"title":":math:`\\F{global\\_alloc}(\\store, \\globaltype, \\val) : (\\store, \\globaladdr)`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the \\globaltype is valid under the empty context.\n\n2. Let \\globaladdr be the result of allocating a global in \\store with global type \\globaltype and initialization value \\val.\n\n3. Return the new store paired with \\globaladdr.","crossrefs":["valid-globaltype","context","alloc-global","syntax-globaltype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-global-alloc"},{"id":"embed-global-type","anchors":["embed-global-type"],"title":":math:`\\F{global\\_type}(\\store, \\globaladdr) : \\globaltype`","level":3,"path":"appendix/embedding","prose":"1. Return S.\\SGLOBALS[a].\\GITYPE.\n\n2. Post-condition: the returned global type is valid under the empty context.","crossrefs":["syntax-globaltype","valid-globaltype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-global-type"},{"id":"embed-global-read","anchors":["embed-global-read"],"title":":math:`\\F{global\\_read}(\\store, \\globaladdr) : \\val`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{gi} be the global instance \\store.\\SGLOBALS[\\globaladdr].\n\n2. Return the value \\X{gi}.\\GIVALUE.","crossrefs":["syntax-globalinst","syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-global-read"},{"id":"embed-global-write","anchors":["embed-global-write"],"title":":math:`\\F{global\\_write}(\\store, \\globaladdr, \\val) : \\store ~|~ \\error`","level":3,"path":"appendix/embedding","prose":"1. Let \\X{gi} be the global instance \\store.\\SGLOBALS[\\globaladdr].\n\n2. Let \\mut~t be the structure of the global type \\X{gi}.\\GITYPE.\n\n3. If \\mut is empty, then return \\ERROR.\n\n4. Replace \\X{gi}.\\GIVALUE with the value \\val.\n\n5. Return the updated store.","crossrefs":["syntax-globalinst","syntax-globaltype","syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-global-write"},{"id":"embed-ref-type","anchors":["embed-ref-type","embed-val-default"],"title":"Values","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-ref-type"},{"id":"appendix/embedding-math-f-ref-type-store-reff-reftype","anchors":[],"title":":math:`\\F{ref\\_type}(\\store, \\reff) : \\reftype`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the reference \\reff is valid under store S.\n\n2. Return the reference type t with which \\reff is valid.\n\n3. Post-condition: the returned reference type is valid under the empty context.\n\n In future versions of WebAssembly,\n not all references may carry precise type information at run time.\n In such cases, this function may return a less precise supertype.","crossrefs":["syntax-ref","valid-val","syntax-reftype","valid-reftype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"appendix/embedding-math-f-val-default-valtype-val","anchors":[],"title":":math:`\\F{val\\_default}(\\valtype) : \\val`","level":3,"path":"appendix/embedding","prose":"1. If \\default_{valtype} is not defined, then return \\ERROR.\n\n1. Else, return the value \\default_{valtype}.","crossrefs":["syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"embed-match-valtype","anchors":["embed-match-valtype","embed-match-externtype"],"title":"Matching","level":2,"path":"appendix/embedding","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html#embed-match-valtype"},{"id":"appendix/embedding-math-f-match-valtype-valtype-1-valtype-2-bool","anchors":[],"title":":math:`\\F{match\\_valtype}(\\valtype_1, \\valtype_2) : \\bool`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the value types \\valtype_1 and \\valtype_2 are valid under the empty context.\n\n2. If \\valtype_1 matches \\valtype_2, then return \\TRUE.\n\n3. Else, return \\FALSE.","crossrefs":["syntax-valtype","valid-valtype","context","match-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"appendix/embedding-math-f-match-externtype-externtype-1-externtype-2-bool","anchors":[],"title":":math:`\\F{match\\_externtype}(\\externtype_1, \\externtype_2) : \\bool`","level":3,"path":"appendix/embedding","prose":"1. Pre-condition: the extern types \\externtype_1 and \\externtype_2 are valid under the empty context.\n\n2. If \\externtype_1 matches \\externtype_2, then return \\TRUE.\n\n3. Else, return \\FALSE.","crossrefs":["syntax-externtype","valid-externtype","context","match-externtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/embedding.html"},{"id":"impl","anchors":["impl"],"title":"Implementation Limitations","level":1,"path":"appendix/implementation","prose":"Implementations typically impose additional restrictions on a number of aspects of a WebAssembly module or execution.\nThese may stem from:\n\n physical resource limits,\n constraints imposed by the embedder or its environment,\n limitations of selected implementation strategies.\n\nThis section lists allowed limitations.\nWhere restrictions take the form of numeric limits, no minimum requirements are given,\nnor are the limits assumed to be concrete, fixed numbers.\nHowever, it is expected that all implementations have \"reasonably\" large limits to enable common applications.\n\n A conforming implementation is not allowed to leave out individual features*.\n However, designated subsets of WebAssembly may be specified in the future.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl"},{"id":"appendix/implementation-syntactic-limits","anchors":[],"title":"Syntactic Limits","level":2,"path":"appendix/implementation","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html"},{"id":"impl-syntax","anchors":["impl-syntax"],"title":"Structure","level":3,"path":"appendix/implementation","prose":"An implementation may impose restrictions on the following dimensions of a module:\n\n the number of types in a module\n the number of functions in a module, including imports\n the number of tables in a module, including imports\n the number of memories in a module, including imports\n the number of globals in a module, including imports\n the number of tags in a module, including imports\n the number of element segments in a module\n the number of data segments in a module\n the number of imports to a module\n the number of exports from a module\n the number of sub types in a recursive type\n the subtyping depth of a sub type\n the number of fields in a structure type\n the number of parameters in a function type\n the number of results in a function type\n the number of parameters in a block type\n the number of results in a block type\n the number of locals in a function\n the number of instructions in a function body\n the number of instructions in a structured control instruction\n the number of structured control instructions in a function\n the nesting depth of structured control instructions\n the number of label indices in a BRTABLE instruction\n the number of instructions in a constant expression\n the length of the array in a ARRAYNEWFIXED instruction\n the length of an element segment\n the length of a data segment\n the length of a name\n* the range of characters in a name\n\nIf the limits of an implementation are exceeded for a given module,\nthen the implementation may reject the validation, compilation, or instantiation of that module with an embedder-specific error.\n\n The last item allows embedders that operate in limited environments without support for\n Unicode to limit the\n names of imports and exports\n to common subsets like ASCII.","crossrefs":["syntax-type","syntax-module","syntax-func","syntax-table","syntax-mem","syntax-global","syntax-tag","syntax-elem","syntax-data","syntax-import","syntax-export","syntax-subtype","syntax-rectype","syntax-structtype","syntax-functype","syntax-blocktype","syntax-local","syntax-instr","syntax-instr-control","syntax-labelidx","valid-constant","syntax-expr","syntax-name","syntax-char","valid","exec-instantiation","embedder"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl-syntax"},{"id":"impl-binary","anchors":["impl-binary"],"title":"Binary Format","level":3,"path":"appendix/implementation","prose":"For a module given in binary format, additional limitations may be imposed on the following dimensions:\n\n the size of a module\n the size of any section\n the size of an individual function's code\n the size of a structured control instruction\n the size of an individual constant expression's instruction sequence\n the number of sections","crossrefs":["binary","binary-module","binary-section","syntax-func","binary-code","syntax-instr-control","valid-constant","syntax-expr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl-binary"},{"id":"impl-text","anchors":["impl-text"],"title":"Text Format","level":3,"path":"appendix/implementation","prose":"For a module given in text format, additional limitations may be imposed on the following dimensions:\n\n the size of the source text\n the size of any syntactic element\n the size of an individual token\n the nesting depth of folded instructions\n the length of symbolic identifiers\n the range of literal characters allowed in the source text","crossrefs":["text","source","text-token","text-foldedinstr","text-id","text-char"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl-text"},{"id":"impl-valid","anchors":["impl-valid"],"title":"Validation","level":2,"path":"appendix/implementation","prose":"An implementation may defer validation of individual functions until they are first invoked.\n\nIf a function turns out to be invalid, then the invocation, and every consecutive call to the same function, results in a trap.\n\n This is to allow implementations to use interpretation or just-in-time compilation for functions.\n The function must still be fully validated before execution of its body begins.","crossrefs":["valid","syntax-func","exec-invoke","trap"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl-valid"},{"id":"impl-exec","anchors":["impl-exec"],"title":"Execution","level":2,"path":"appendix/implementation","prose":"Restrictions on the following dimensions may be imposed during execution of a WebAssembly program:\n\n the number of allocated module instances\n the number of allocated function instances\n the number of allocated table instances\n the number of allocated memory instances\n the number of allocated global instances\n the number of allocated tag instances\n the number of allocated structure instances\n the number of allocated array instances\n the number of allocated exception instances\n the size of a table instance\n the size of a memory instance\n the size of an array instance\n the number of frames on the stack\n the number of labels on the stack\n* the number of values on the stack\n\nIf the runtime limits of an implementation are exceeded during execution of a computation,\nthen it may terminate that computation and report an embedder-specific error to the invoking code.\n\nSome of the above limits may already be verified during instantiation, in which case an implementation may report exceedance in the same manner as for syntactic limits.\n\n Concrete limits are usually not fixed but may be dependent on specifics, interdependent, vary over time, or depend on other implementation- or embedder-specific situations or events.","crossrefs":["exec","syntax-moduleinst","syntax-funcinst","syntax-tableinst","syntax-meminst","syntax-globalinst","syntax-taginst","syntax-structinst","syntax-arrayinst","syntax-exninst","syntax-frame","stack","syntax-label","syntax-val","impl-syntax"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/implementation.html#impl-exec"},{"id":"index-rules","anchors":["index-rules"],"title":"Index of Semantic Rules","level":1,"path":"appendix/index-rules","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html#index-rules"},{"id":"index-valid","anchors":["index-valid"],"title":"Well-formedness of Types","level":2,"path":"appendix/index-rules","prose":"=============================================== =================================================================================\nConstruct Judgement\n=============================================== =================================================================================\nNumeric type C \\vdashnumtype \\numtype : \\OKnumtype\nVector type C \\vdashvectype \\vectype : \\OKvectype\nHeap type C \\vdashheaptype \\heaptype : \\OKheaptype\nReference type C \\vdashreftype \\reftype : \\OKreftype\nValue type C \\vdashvaltype \\valtype : \\OKvaltype\nPacked type C \\vdashpacktype \\packtype : \\OKpacktype\nStorage type C \\vdashstoragetype \\storagetype : \\OKstoragetype\nField type C \\vdashfieldtype \\fieldtype : \\OKfieldtype\nResult type C \\vdashresulttype \\resulttype : \\OKresulttype\nInstruction type C \\vdashinstrtype \\instrtype : \\OKinstrtype\nComposite type C \\vdashcomptype \\comptype : \\OKcomptype\nSub type C \\vdashsubtype \\subtype : \\OKsubtype\nRecursive type C \\vdashrectype \\rectype : \\OKrectype\nDefined type C \\vdashdeftype \\deftype : \\OKdeftype\nBlock type C \\vdashblocktype \\blocktype : \\instrtype\nTag type C \\vdashtagtype \\tagtype : \\OKtagtype\nGlobal type C \\vdashglobaltype \\globaltype : \\OKglobaltype\nMemory type C \\vdashmemtype \\memtype : \\OKmemtype\nTable type C \\vdashtabletype \\tabletype : \\OKtabletype\nExternal type C \\vdashexterntype \\externtype : \\OKexterntype\nType definitions C \\vdashtypes \\type^\\ast : \\OKtypes\n=============================================== =================================================================================","crossrefs":["valid-numtype","valid-vectype","valid-heaptype","valid-reftype","valid-valtype","valid-packtype","valid-storagetype","valid-fieldtype","valid-resulttype","valid-instrtype","valid-comptype","valid-subtype","valid-rectype","valid-deftype","valid-blocktype","valid-tagtype","valid-globaltype","valid-memtype","valid-tabletype","valid-externtype","valid-type"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html#index-valid"},{"id":"appendix/index-rules-typing-of-static-constructs","anchors":[],"title":"Typing of Static Constructs","level":2,"path":"appendix/index-rules","prose":"=============================================== =================================================================================\nConstruct Judgement\n=============================================== =================================================================================\nInstruction S;C \\vdashinstr \\instr : \\instrtype\nInstruction sequence S;C \\vdashinstrs \\instr^\\ast : \\instrtype\nCatch clause C \\vdashcatch \\catch : \\OKcatch\nExpression C \\vdashexpr \\expr : \\resulttype\nLimits C \\vdashlimits \\limits : k\nTag C \\vdashtag \\tag : \\tagtype\nGlobal C \\vdashglobal \\global : \\globaltype\nMemory C \\vdashmem \\mem : \\memtype\nTable C \\vdashtable \\table : \\tabletype\nFunction C \\vdashfunc \\func : \\deftype\nLocal C \\vdashlocal \\local : \\localtype\nElement segment C \\vdashelem \\elem : \\reftype\nElement mode C \\vdashelemmode \\elemmode : \\reftype\nData segment C \\vdashdata \\data : \\OKdata\nData mode C \\vdashdatamode \\datamode : \\OKdatamode\nStart function C \\vdashstart \\start : \\OKstart\nImport C \\vdashimport \\import : \\externtype\nExport C \\vdashexport \\export : \\externtype\nModule \\vdashmodule \\module : \\externtype^\\ast \\rightarrow \\externtype^\\ast\n=============================================== =================================================================================","crossrefs":["valid-instr","valid-instrs","valid-catch","valid-expr","valid-limits","valid-tag","valid-global","valid-mem","valid-table","valid-func","valid-local","valid-elem","valid-elemmode","valid-data","valid-datamode","valid-start","valid-import","valid-export","valid-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"appendix/index-rules-typing-of-runtime-constructs","anchors":[],"title":"Typing of Runtime Constructs","level":2,"path":"appendix/index-rules","prose":"=============================================== ===============================================================================\nConstruct Judgement\n=============================================== ===============================================================================\nValue S \\vdashval \\val : \\valtype\nResult S \\vdashresult \\result : \\resulttype\nPacked value S \\vdashpackval \\packval : \\packtype\nField value S \\vdashfieldval \\fieldval : \\storagetype\nExternal address S \\vdashexternaddr \\externaddr : \\externtype\nTag instance S \\vdashtaginst \\taginst : \\tagtype\nGlobal instance S \\vdashglobalinst \\globalinst : \\globaltype\nMemory instance S \\vdashmeminst \\meminst : \\memtype\nTable instance S \\vdashtableinst \\tableinst : \\tabletype\nFunction instance S \\vdashfuncinst \\funcinst : \\deftype\nData instance S \\vdashdatainst \\datainst : \\OKdatainst\nElement instance S \\vdasheleminst \\eleminst : t\nStructure instance S \\vdashstructinst \\structinst : \\OKstructinst\nArray instance S \\vdasharrayinst \\arrayinst : \\OKarrayinst\nExport instance S \\vdashexportinst \\exportinst : \\OKexportinst\nModule instance S \\vdashmoduleinst \\moduleinst : C\nStore \\vdashstore \\store : \\OKstore\nConfiguration \\vdashconfig \\config : [t^\\ast]\nThread S;\\resulttype^? \\vdashthread \\thread : \\resulttype\nFrame S \\vdashframe \\frame : C\n=============================================== ===============================================================================","crossrefs":["valid-val","valid-result","valid-packval","valid-fieldval","valid-externaddr","valid-taginst","valid-globalinst","valid-meminst","valid-tableinst","valid-funcinst","valid-datainst","valid-eleminst","valid-structinst","valid-arrayinst","valid-exportinst","valid-moduleinst","valid-store","valid-config","valid-thread","valid-frame"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"appendix/index-rules-constantness","anchors":[],"title":"Constantness","level":2,"path":"appendix/index-rules","prose":"=============================================== ===============================================================================\nConstruct Judgement\n=============================================== ===============================================================================\nConstant expression C \\vdashexprconst \\expr \\CONSTexprconst\nConstant instruction C \\vdashinstrconst \\instr \\CONSTinstrconst\n=============================================== ===============================================================================","crossrefs":["valid-constant"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"appendix/index-rules-matching","anchors":[],"title":"Matching","level":2,"path":"appendix/index-rules","prose":"=============================================== ===================================================================================\nConstruct Judgement\n=============================================== ===================================================================================\nNumber type C \\vdashnumtypematch \\numtype_1 \\subnumtypematch \\numtype_2\nVector type C \\vdashvectypematch \\vectype_1 \\subvectypematch \\vectype_2\nHeap type C \\vdashheaptypematch \\heaptype_1 \\subheaptypematch \\heaptype_2\nReference type C \\vdashreftypematch \\reftype_1 \\subreftypematch \\reftype_2\nValue type C \\vdashvaltypematch \\valtype_1 \\subvaltypematch \\valtype_2\nPacked type C \\vdashpacktypematch \\packtype_1 \\subpacktypematch \\packtype_2\nStorage type C \\vdashstoragetypematch \\storagetype_1 \\substoragetypematch \\storagetype_2\nField type C \\vdashfieldtypematch \\fieldtype_1 \\subfieldtypematch \\fieldtype_2\nResult type C \\vdashresulttypematch \\resulttype_1 \\subresulttypematch \\resulttype_2\nInstruction type C \\vdashinstrtypematch \\instrtype_1 \\subinstrtypematch \\instrtype_2\nComposite type C \\vdashcomptypematch \\comptype_1 \\subcomptypematch \\comptype_2\nDefined type C \\vdashdeftypematch \\deftype_1 \\subdeftypematch \\deftype_2\nLimits C \\vdashlimitsmatch \\limits_1 \\sublimitsmatch \\limits_2\nTag type C \\vdashtagtypematch \\tagtype_1 \\subtagtypematch \\tagtype_2\nGlobal type C \\vdashglobaltypematch \\globaltype_1 \\subglobaltypematch \\globaltype_2\nMemory type C \\vdashmemtypematch \\memtype_1 \\submemtypematch \\memtype_2\nTable type C \\vdashtabletypematch \\tabletype_1 \\subtabletypematch \\tabletype_2\nExternal type C \\vdashexterntypematch \\externtype_1 \\subexterntypematch \\externtype_2\n=============================================== ===================================================================================","crossrefs":["match-numtype","match-vectype","match-heaptype","match-reftype","match-valtype","match-packtype","match-storagetype","match-fieldtype","match-resulttype","match-instrtype","match-comptype","match-deftype","match-limits","match-tagtype","match-globaltype","match-memtype","match-tabletype","match-externtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"appendix/index-rules-store-extension","anchors":[],"title":"Store Extension","level":2,"path":"appendix/index-rules","prose":"=============================================== ===============================================================================\nConstruct Judgement\n=============================================== ===============================================================================\nTag instance \\vdashtaginstextends \\taginst_1 \\extendsto \\taginst_2\nGlobal instance \\vdashglobalinstextends \\globalinst_1 \\extendsto \\globalinst_2\nMemory instance \\vdashmeminstextends \\meminst_1 \\extendsto \\meminst_2\nTable instance \\vdashtableinstextends \\tableinst_1 \\extendsto \\tableinst_2\nFunction instance \\vdashfuncinstextends \\funcinst_1 \\extendsto \\funcinst_2\nData instance \\vdashdatainstextends \\datainst_1 \\extendsto \\datainst_2\nElement instance \\vdasheleminstextends \\eleminst_1 \\extendsto \\eleminst_2\nStructure instance \\vdashstructinstextends \\structinst_1 \\extendsto \\structinst_2\nArray instance \\vdasharrayinstextends \\arrayinst_1 \\extendsto \\arrayinst_2\nStore \\vdashstoreextends \\store_1 \\extendsto \\store_2\n=============================================== ===============================================================================","crossrefs":["extend-taginst","extend-globalinst","extend-meminst","extend-tableinst","extend-funcinst","extend-datainst","extend-eleminst","extend-structinst","extend-arrayinst","extend-store"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"appendix/index-rules-execution","anchors":[],"title":"Execution","level":2,"path":"appendix/index-rules","prose":"=============================================== ===============================================================================\nConstruct Judgement\n=============================================== ===============================================================================\nInstruction S;F;\\instr^\\ast \\stepto S';F';{\\instr'}^\\ast\nExpression S;F;\\expr \\stepto S';F';\\expr'\n=============================================== ===============================================================================","crossrefs":["exec-instr","exec-expr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-rules.html"},{"id":"index-type","anchors":["index-type"],"title":"Index of Types","level":1,"path":"appendix/index-types","prose":"======================================== ===================================================== ===============================================================\nCategory Constructor Binary Opcode\n======================================== ===================================================== ===============================================================\nType index x (positive number as Bs32 or Bu32)\nNumber type I32 \\hex{7F} (-1 as Bs7)\nNumber type I64 \\hex{7E} (-2 as Bs7)\nNumber type F32 \\hex{7D} (-3 as Bs7)\nNumber type F64 \\hex{7C} (-4 as Bs7)\nVector type V128 \\hex{7B} (-5 as Bs7)\n(reserved) \\hex{7A} .. \\hex{79}\nPacked type I8 \\hex{78} (-8 as Bs7)\nPacked type I16 \\hex{77} (-9 as Bs7)\n(reserved) \\hex{78} .. \\hex{75}\nHeap type NOEXN \\hex{74} (-12 as Bs7)\nHeap type NOFUNC \\hex{73} (-13 as Bs7)\nHeap type NOEXTERN \\hex{72} (-14 as Bs7)\nHeap type NONE \\hex{71} (-15 as Bs7)\nHeap type FUNC \\hex{70} (-16 as Bs7)\nHeap type EXTERN \\hex{6F} (-17 as Bs7)\nHeap type ANY \\hex{6E} (-18 as Bs7)\nHeap type EQT \\hex{6D} (-19 as Bs7)\nHeap type I31 \\hex{6C} (-20 as Bs7)\nHeap type STRUCT \\hex{6B} (-21 as Bs7)\nHeap type ARRAY \\hex{6A} (-22 as Bs7)\nHeap type EXN \\hex{69} (-23 as Bs7)\n(reserved) \\hex{68} .. \\hex{65}\nReference type REF \\hex{64} (-28 as Bs7)\nReference type REF NULL \\hex{63} (-29 as Bs7)\n(reserved) \\hex{62} .. \\hex{61}\nComposite type \\TFUNC~[\\valtype^\\ast] \\Tarrow[\\valtype^\\ast] \\hex{60} (-32 as Bs7)\nComposite type \\TSTRUCT~\\fieldtype^\\ast \\hex{5F} (-33 as Bs7)\nComposite type \\TARRAY~\\fieldtype \\hex{5E} (-34 as Bs7)\n(reserved) \\hex{5D} .. \\hex{51}\nSub type \\TSUB~\\typeidx^\\ast~\\comptype \\hex{50} (-48 as Bs7)\nSub type \\TSUB~\\TFINAL~\\typeidx^\\ast~\\comptype \\hex{4F} (-49 as Bs7)\nRecursive type \\TREC~\\subtype^\\ast \\hex{4E} (-50 as Bs7)\n(reserved) \\hex{4D} .. \\hex{41}\nResult type [\\epsilon] \\hex{40} (-64 as Bs7)\nTag type \\typeuse (none)\nGlobal type \\mut~\\valtype (none)\nMemory type \\addrtype~\\limits (none)\nTable type \\addrtype~\\limits~\\reftype (none)\n======================================== ===================================================== ===============================================================","crossrefs":["syntax-typeidx","syntax-numtype","syntax-vectype","syntax-packtype","syntax-heaptype","syntax-reftype","syntax-comptype","syntax-subtype","syntax-rectype","syntax-resulttype","syntax-tagtype","syntax-globaltype","syntax-memtype","syntax-tabletype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index-types.html#index-type"},{"id":"appendix","anchors":["appendix"],"title":"Appendix","level":1,"path":"appendix/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/index.html#appendix"},{"id":"profiles","anchors":["profiles"],"title":"Profiles","level":1,"path":"appendix/profiles","prose":"To enable the use of WebAssembly in as many environments as possible, profiles specify coherent language subsets that fit constraints imposed by common classes of host environments.\nA host platform can thereby decide to support the language only under a restricted profile, or even the intersection of multiple profiles.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html#profiles"},{"id":"appendix/profiles-conventions","anchors":[],"title":"Conventions","level":2,"path":"appendix/profiles","prose":"A profile modification is specified by decorating selected rules in the main body of this specification with a profile annotation that defines them as conditional on the choice of profile.\n\nFor that purpose, every profile defines a profile marker, an alphanumeric short-hand like \\profilename{ABC}.\nA profile annotation of the form \\exprofiles{\\profile{ABC}~\\profile{XYZ}} on a rule indicates that this rule is excluded for either of the profiles whose marker is \\profilename{ABC} or \\profilename{XYZ}.\n\nThere are two ways of subsetting the language in a profile:\n\n Syntactic, by omitting a feature, in which case certain constructs are removed from the syntax altogether.\n\n Semantic, by restricting a feature, in which case certain constructs are still present but some behaviours are ruled out.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html"},{"id":"appendix/profiles-syntax-annotations","anchors":[],"title":"Syntax Annotations","level":3,"path":"appendix/profiles","prose":"To omit a construct from a profile syntactically, respective productions in the grammar of the abstract syntax are annotated with an associated profile marker.\nThis is defined to have the following implications:\n\n1. Any production in the binary or textual syntax that produces abstract syntax with a marked construct is omitted by extension.\n\n2. Any validation or execution rule that handles a marked construct is omitted by extension.\n\nThe overall effect is that the respective construct is no longer part of the language under a respective profile.\n\n For example, a \"busy\" profile marked \\profilename{BUSY} could rule out the NOP instruction by marking the production for it in the abstract syntax as follows:\n\n .. math::\n \\begin{array}{llcl}\n \\production{instruction} & \\instr &::=&\n \\dots \\\\\n & \\exprofiles{\\profile{BUSY}} &|& \\NOP \\\\\n & &|& \\UNREACHABLE \\\\\n \\end{array}\n\n A rule may be annotated by multiple markers, which could be the case if a construct is in the intersection of multiple features.","crossrefs":["syntax","binary","text","valid","exec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html"},{"id":"appendix/profiles-semantics-annotations","anchors":[],"title":"Semantics Annotations","level":3,"path":"appendix/profiles","prose":"To restrict certain behaviours in a profile, individual validation or reduction rules or auxiliary definitions are annotated with an associated marker.\n\nThis has the consequence that the respective rule is no longer applicable under the given profile.\n\n For example, an \"infinite\" profile marked \\profilename{INF} could define that growing memory never fails:\n\n .. math::\n \\begin{array}{llcl@{\\qquad}l}\n & S; F; (\\I32.\\CONST~n)~\\MEMORYGROW~x &\\stepto& S'; F; (\\I32.\\CONST~\\X{sz})\n \\\\&&&\n \\begin{array}[t]{@{}r@{~}l@{}}\n (\\iff & F.\\AMODULE.\\MIMEMS[x] = a \\\\\n \\wedge & \\X{sz} = |S.\\SMEMS[a].\\MIDATAS|/64\\,\\F{Ki} \\\\\n \\wedge & S' = S \\with \\SMEMS[a] = \\growmem(S.\\SMEMS[a], n)) \\\\[1ex]\n \\end{array}\n \\\\[1ex]\n \\exprofiles{\\profile{INF}} & S; F; (\\I32.\\CONST~n)~\\MEMORYGROW~x &\\stepto& S; F; (\\I32.\\CONST~\\signed_{32}^{-1}(-1))\n \\end{array}","crossrefs":["valid","exec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html"},{"id":"appendix/profiles-properties","anchors":[],"title":"Properties","level":3,"path":"appendix/profiles","prose":"All profiles are defined such that the following properties are preserved:\n\n All profiles represent syntactic and semantic subsets of the full profile, i.e., they do not add syntax or alter behaviour.\n\n All profiles are mutually compatible, i.e., no two profiles subset semantic behaviour in inconsistent or ambiguous ways, and any intersection of profiles preserves the properties described here.\n\n Profiles do not violate soundness, i.e., all configurations valid under that profile still have well-defined execution behaviour.\n\n Tools are generally expected to handle and produce code for the full profile by default.\n In particular, producers should not generate code that depends* on specific profiles. Instead, all code should preserve correctness when executed under the full profile.\n\n Moreover, profiles should be considered static and fixed for a given platform or ecosystem. Runtime conditioning on the \"current\" profile is not intended and should be avoided.","crossrefs":["profile-full","soundness","syntax-config"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html"},{"id":"appendix/profiles-defined-profiles","anchors":[],"title":"Defined Profiles","level":2,"path":"appendix/profiles","prose":"The number of defined profiles is expected to remain small in the future. Profiles are intended for broad and permanent use cases only. In particular, profiles are not intended for language versioning.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html"},{"id":"profile-full","anchors":["profile-full"],"title":"Full Profile (:math:`{\\small{\\mathrm{FUL}}}`)","level":3,"path":"appendix/profiles","prose":"The full profile contains the complete language and all possible behaviours.\nIt imposes no restrictions, i.e., all rules and definitions are active.\nAll other profiles define sub-languages of this profile.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html#profile-full"},{"id":"profile-deterministic","anchors":["profile-deterministic"],"title":"Deterministic Profile (:math:`{\\small{\\mathrm{DET}}}`)","level":3,"path":"appendix/profiles","prose":"The deterministic profile excludes all rules marked \\exprofiles{\\PROFDET}.\nIt defines a sub-language that does not exhibit any incidental non-deterministic behaviour:\n\n All NaN values generated by floating-point instructions are canonical and positive.\n\n All relaxed vector instructions have a fixed behaviour that does not depend on the implementation.\n\nEven under this profile, the MEMORYGROW and TABLEGROW instructions technically remain non-deterministic, in order to be able to indicate resource exhaustion.\n\n In future versions of WebAssembly, new non-deterministic behaviour may be added to the language, such that the deterministic profile will induce additional restrictions.","crossrefs":["syntax-nan","aux-nans","syntax-instr-numeric","syntax-instr-vec-relaxed","exec-memory.grow"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/profiles.html#profile-deterministic"},{"id":"soundness","anchors":["soundness"],"title":"Type Soundness","level":1,"path":"appendix/properties","prose":"The type system of WebAssembly is sound, implying both type safety and memory safety with respect to the WebAssembly semantics. For example:\n\n All types declared and derived during validation are respected at run time;\n e.g., every local or global variable will only contain type-correct values, every instruction will only be applied to operands of the expected type, and every function invocation always evaluates to a result of the right type (if it does not diverge, throw an exception, or trap).\n\n No memory location will be read or written except those explicitly defined by the program, i.e., as a local, a global, an element in a table, or a location within a linear memory.\n\n There is no undefined behavior,\n i.e., the execution rules cover all possible cases that can occur in a valid program, and the rules are mutually consistent.\n\nSoundness also is instrumental in ensuring additional properties, most notably, encapsulation of function and module scopes: no locals can be accessed outside their own function and no module components can be accessed outside their own module unless they are explicitly exported or imported.\n\nThe typing rules defining WebAssembly validation only cover the static components of a WebAssembly program.\nIn order to state and prove soundness precisely, the typing rules must be extended to the dynamic* components of the abstract runtime, that is, the store, configurations, and administrative instructions. [#cite-pldi2017]_","crossrefs":["type-system","syntax-local","syntax-global","syntax-instr","syntax-func","exec-invocation","trap","syntax-table","syntax-mem","exec","valid","syntax-module","syntax-export","syntax-import","syntax-runtime","syntax-store","syntax-config","syntax-instr-admin"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#soundness"},{"id":"context-ext","anchors":["context-ext"],"title":"Contexts","level":2,"path":"appendix/properties","prose":"In order to check rolled up recursive types,\nthe context is locally extended with an additional component that records the sub type corresponding to each recursive type index within the current group of recursive types:","crossrefs":["aux-roll-rectype","context","syntax-subtype","syntax-rectypeidx","syntax-rectype"],"formal_refs":["context/sem"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#context-ext"},{"id":"valid-types-ext","anchors":["valid-types-ext"],"title":"Types","level":2,"path":"appendix/properties","prose":"Well-formedness for extended type forms is defined as follows.","crossrefs":["type-ext"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-types-ext"},{"id":"valid-typeuse-ext","anchors":["valid-typeuse-ext"],"title":null,"level":0,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":["Typeuse_ok/rec"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-typeuse-ext"},{"id":"valid-heaptype-ext","anchors":["valid-heaptype-ext"],"title":null,"level":0,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":["Heaptype_ok/bot"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-heaptype-ext"},{"id":"valid-valtype-ext","anchors":["valid-valtype-ext"],"title":null,"level":0,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":["Valtype_ok/bot"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-valtype-ext"},{"id":"valid-rectype-ext","anchors":["valid-rectype-ext"],"title":null,"level":0,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":["Rectype_ok2","Rectype_ok2/empty","Rectype_ok2/cons"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-rectype-ext"},{"id":"valid-subtype-ext","anchors":["valid-subtype-ext"],"title":null,"level":0,"path":"appendix/properties","prose":"where:","crossrefs":[],"formal_refs":["Subtype_ok2"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-subtype-ext"},{"id":"aux-unroll-heaptype","anchors":["aux-unroll-heaptype"],"title":null,"level":0,"path":"appendix/properties","prose":"The new rules for recursive types and sub types complement the ones previously given,\n which only allowed regular type indices as supertypes.\n They define validity of rolled-up recursive types,\n like they occur in defined types,\n in turn needed to define validity of contexts.\n None of these rules are needed in the implementation of a validator.","crossrefs":["syntax-rectype","syntax-subtype","valid-subtype","syntax-typeidx","aux-roll-rectype","syntax-deftype","valid-context","context"],"formal_refs":["unrollht_","before"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#aux-unroll-heaptype"},{"id":"valid-deftype","anchors":["valid-deftype"],"title":null,"level":0,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":["Deftype_ok"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-deftype"},{"id":"match-heaptype-ext","anchors":["match-heaptype-ext"],"title":"Subtyping","level":2,"path":"appendix/properties","prose":"Inside a rolled-up recursive type, a recursive type index can match another heap type.\n\n These rules complement the previously given rules for matching heap types.\n They are only invoked when checking validity of rolled-up recursive types.","crossrefs":["aux-roll-rectype","syntax-rectype","syntax-rectypeidx","match-heaptype","syntax-heaptype","valid-rectype-ext"],"formal_refs":["Heaptype_sub/rec-*"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#match-heaptype-ext"},{"id":"valid-result","anchors":["valid-result"],"title":"Results","level":2,"path":"appendix/properties","prose":"Results can be classified by result types as follows.","crossrefs":["syntax-result","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-result"},{"id":"appendix/properties-ref-results-syntax-result-math-val-ast","anchors":[],"title":":ref:`Results <syntax-result>` :math:`\\val^\\ast`","level":3,"path":"appendix/properties","prose":"For each value \\val_i in \\val^\\ast:\n\n The value \\val_i is valid with some value type t_i.\n\n Let t^\\ast be the concatenation of all t_i.\n\n Then the result is valid with result type [t^\\ast].","crossrefs":["syntax-val","valid-val","syntax-valtype","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-ref-results-syntax-result-math-refexnaddr-a-throwref","anchors":[],"title":":ref:`Results <syntax-result>` :math:`(\\REFEXNADDR~a)~\\THROWREF`","level":3,"path":"appendix/properties","prose":"The value \\REFEXNADDR~a must be valid.\n\n Then the result is valid with result type [t^\\ast], for any valid closed result types.","crossrefs":["valid-val","syntax-resulttype","valid-resulttype","type-closed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-ref-results-syntax-result-math-trap","anchors":[],"title":":ref:`Results <syntax-result>` :math:`\\TRAP`","level":3,"path":"appendix/properties","prose":"* The result is valid with result type [t^\\ast], for any valid closed result types.","crossrefs":["syntax-resulttype","valid-resulttype","type-closed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"valid-localtype","anchors":["valid-localtype","valid-context"],"title":null,"level":0,"path":"appendix/properties","prose":".. todo","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-localtype"},{"id":"appendix/properties-context-validity","anchors":[],"title":"Context Validity","level":2,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"module-context","anchors":["module-context","valid-store"],"title":"Store Validity","level":2,"path":"appendix/properties","prose":"The following typing rules specify when a runtime store S is valid.\nA valid store must consist of\ntag,\nglobal,\nmemory,\ntable,\nfunction,\ndata,\nelement,\nstructure,\narray,\nexception,\nand\nmodule\ninstances that are themselves valid, relative to S.\n\nTo that end, each kind of instance is classified by a respective\ntag,\nglobal,\nmemory,\ntable,\nfunction, or\nelement,\ntype, or just OK in the case of\ndata\nstructures,\narrays, or\nexceptions.\nModule instances are classified by module contexts, which are regular contexts repurposed as module types describing the index spaces defined by a module.","crossrefs":["syntax-store","syntax-taginst","syntax-globalinst","syntax-meminst","syntax-tableinst","syntax-funcinst","syntax-datainst","syntax-eleminst","syntax-structinst","syntax-arrayinst","syntax-exninst","syntax-moduleinst","syntax-tagtype","syntax-globaltype","syntax-memtype","syntax-tabletype","syntax-functype","context","syntax-index"],"formal_refs":["OK"],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#module-context"},{"id":"appendix/properties-ref-store-syntax-store-math-s","anchors":[],"title":":ref:`Store <syntax-store>` :math:`S`","level":3,"path":"appendix/properties","prose":"Each tag instance \\taginst_i in S.\\STAGS must be valid with some tag type \\tagtype_i.\n\n Each global instance \\globalinst_i in S.\\SGLOBALS must be valid with some global type \\globaltype_i.\n\n Each memory instance \\meminst_i in S.\\SMEMS must be valid with some memory type \\memtype_i.\n\n Each table instance \\tableinst_i in S.\\STABLES must be valid with some table type \\tabletype_i.\n\n Each function instance \\funcinst_i in S.\\SFUNCS must be valid with some defined type \\deftype_i.\n\n Each data instance \\datainst_i in S.\\SDATAS must be valid.\n\n Each element instance \\eleminst_i in S.\\SELEMS must be valid with some reference type \\reftype_i.\n\n Each structure instance \\structinst_i in S.\\SSTRUCTS must be valid.\n\n Each array instance \\arrayinst_i in S.\\SARRAYS must be valid.\n\n Each exception instance \\exninst_i in S.\\SEXNS must be valid.\n\n No reference to a bound structure address must be reachable from itself through a path consisting only of indirections through immutable structure, or array fields or fields of exception instances.\n\n No reference to a bound array address must be reachable from itself through a path consisting only of indirections through immutable structure or array fields or fields of exception instances.\n\n No reference to a bound exception address must be reachable from itself through a path consisting only of indirections through immutable structure or array fields or fields of exception instances.\n\n Then the store is valid.\n\nwhere \\val_1 \\gg^+_S \\val_2 denotes the transitive closure of the following immutable reachability relation on values:\n\n The constraint on reachability through immutable fields prevents the presence of cyclic data structures that can not be constructed in the language.\n Cycles can only be formed using mutation.","crossrefs":["syntax-taginst","valid-taginst","syntax-tagtype","syntax-globalinst","valid-globalinst","syntax-globaltype","syntax-meminst","valid-meminst","syntax-memtype","syntax-tableinst","valid-tableinst","syntax-tabletype","syntax-funcinst","valid-funcinst","syntax-deftype","syntax-datainst","valid-datainst","syntax-eleminst","valid-eleminst","syntax-reftype","syntax-structinst","valid-structinst","syntax-arrayinst","valid-arrayinst","syntax-exninst","valid-exninst","syntax-ref","syntax-structaddr","syntax-fieldtype","syntax-arrayaddr","syntax-exnaddr","syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"valid-taginst","anchors":["valid-taginst"],"title":":ref:`Tag Instances <syntax-taginst>` :math:`\\{ \\HITYPE~\\tagtype \\}`","level":3,"path":"appendix/properties","prose":"The tag type \\tagtype must be valid under the empty context.\n\n Then the tag instance is valid with tag type \\tagtype.","crossrefs":["syntax-tagtype","valid-tagtype","context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-taginst"},{"id":"valid-globalinst","anchors":["valid-globalinst"],"title":":ref:`Global Instances <syntax-globalinst>` :math:`\\{ \\GITYPE~\\mut~t, \\GIVALUE~\\val \\}`","level":3,"path":"appendix/properties","prose":"The global type \\mut~t must be valid under the empty context.\n\n The value \\val must be valid with some value type t'.\n\n The value type t' must match the value type t.\n\n Then the global instance is valid with global type \\mut~t.","crossrefs":["syntax-globaltype","valid-globaltype","context","syntax-val","valid-val","syntax-valtype","match-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-globalinst"},{"id":"valid-meminst","anchors":["valid-meminst"],"title":":ref:`Memory Instances <syntax-meminst>` :math:`\\{ \\MITYPE~(\\addrtype~\\limits), \\MIBYTES~b^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The memory type \\addrtype~\\limits must be valid under the empty context.\n\n Let \\limits be [n\\,{..}\\,m].\n\n The length of b^\\ast must equal m multiplied by the page size 64\\,\\F{Ki}.\n\n Then the memory instance is valid with memory type \\addrtype~\\limits.","crossrefs":["syntax-memtype","valid-memtype","context","page-size"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-meminst"},{"id":"valid-tableinst","anchors":["valid-tableinst"],"title":":ref:`Table Instances <syntax-tableinst>` :math:`\\{ \\TITYPE~(\\addrtype~\\limits~t), \\TIREFS~\\reff^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The table type \\addrtype~\\limits~t must be valid under the empty context.\n\n Let \\limits be [n\\,{..}\\,m].\n\n The length of \\reff^\\ast must equal n.\n\n For each reference \\reff_i in the table's elements \\reff^n:\n\n The reference \\reff_i must be valid with some reference type t'_i.\n\n The reference type t'_i must match the reference type t.\n\n* Then the table instance is valid with table type \\addrtype~\\limits~t.","crossrefs":["syntax-tabletype","valid-tabletype","context","syntax-ref","valid-ref","syntax-reftype","match-reftype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-tableinst"},{"id":"valid-funcinst","anchors":["valid-funcinst"],"title":":ref:`Function Instances <syntax-funcinst>` :math:`\\{\\FITYPE~\\deftype, \\FIMODULE~\\moduleinst, \\FICODE~\\func\\}`","level":3,"path":"appendix/properties","prose":"The defined type \\deftype must be valid under an empty context.\n\n The module instance \\moduleinst must be valid with some context C.\n\n Under context C:\n\n The function \\func must be valid with some defined type \\deftype'.\n\n The defined type \\deftype' must match \\deftype.\n\n Then the function instance is valid with defined type \\deftype.","crossrefs":["syntax-deftype","valid-deftype","context","syntax-moduleinst","valid-moduleinst","syntax-func","valid-func","match-deftype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-funcinst"},{"id":"valid-hostfuncinst","anchors":["valid-hostfuncinst"],"title":":ref:`Host Function Instances <syntax-funcinst>` :math:`\\{\\FITYPE~\\deftype, \\FIHOSTFUNC~\\X{hf}\\}`","level":3,"path":"appendix/properties","prose":"The defined type \\deftype must be valid under an empty context.\n\n The expansion of defined type \\deftype must be some function type \\TFUNC~[t_1^\\ast] \\Tarrow [t_2^\\ast].\n\n For every valid store S_1 extending S and every sequence \\val^\\ast of values whose types coincide with t_1^\\ast:\n\n Executing \\X{hf} in store S_1 with arguments \\val^\\ast has a non-empty set of possible outcomes.\n\n For every element R of this set:\n\n Either R must be \\bot (i.e., divergence).\n\n Or R consists of a valid store S_2 extending S_1 and a result \\result whose type coincides with [t_2^\\ast].\n\n Then the function instance is valid with defined type \\deftype.\n\n This rule states that, if appropriate pre-conditions about store and arguments are satisfied, then executing the host function must satisfy appropriate post-conditions about store and results.\n The post-conditions match the ones in the execution rule for invoking host functions.\n\n Any store under which the function is invoked is assumed to be an extension of the current store.\n That way, the function itself is able to make sufficient assumptions about future stores.","crossrefs":["syntax-deftype","valid-deftype","context","aux-expand-deftype","syntax-functype","valid-store","syntax-store","extend-store","syntax-val","valid-val","exec-invoke-host","syntax-result","valid-result"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-hostfuncinst"},{"id":"valid-datainst","anchors":["valid-datainst"],"title":":ref:`Data Instances <syntax-eleminst>` :math:`\\{ \\DIBYTES~b^\\ast \\}`","level":3,"path":"appendix/properties","prose":"* The data instance is valid.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-datainst"},{"id":"valid-eleminst","anchors":["valid-eleminst"],"title":":ref:`Element Instances <syntax-eleminst>` :math:`\\{ \\EITYPE~t, \\EIREFS~\\reff^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The reference type t must be valid under the empty context.\n\n For each reference \\reff_i in the elements \\reff^n:\n\n The reference \\reff_i must be valid with some reference type t'_i.\n\n The reference type t'_i must match the reference type t.\n\n* Then the element instance is valid with reference type t.","crossrefs":["syntax-reftype","valid-reftype","context","syntax-ref","valid-ref","match-reftype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-eleminst"},{"id":"valid-structinst","anchors":["valid-structinst"],"title":":ref:`Structure Instances <syntax-structinst>` :math:`\\{ \\SITYPE~\\deftype, \\SIFIELDS~\\fieldval^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The defined type \\deftype must be valid under the empty context.\n\n The expansion of \\deftype must be a structure type \\TSTRUCT~\\fieldtype^\\ast.\n\n The length of the sequence of field values \\fieldval^\\ast must be the same as the length of the sequence of field types \\fieldtype^\\ast.\n\n For each field value \\fieldval_i in \\fieldval^\\ast and corresponding field type \\fieldtype_i in \\fieldtype^\\ast:\n\n - Let \\fieldtype_i be \\mut~\\storagetype_i.\n\n - The field value \\fieldval_i must be valid with storage type \\storagetype_i.\n\n* Then the structure instance is valid.","crossrefs":["syntax-deftype","valid-deftype","context","aux-expand-deftype","syntax-structtype","syntax-fieldval","syntax-fieldtype","valid-fieldval","syntax-storagetype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-structinst"},{"id":"valid-arrayinst","anchors":["valid-arrayinst"],"title":":ref:`Array Instances <syntax-arrayinst>` :math:`\\{ \\AITYPE~\\deftype, \\AIFIELDS~\\fieldval^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The defined type \\deftype must be valid under the empty context.\n\n The expansion of \\deftype must be an array type \\TARRAY~\\fieldtype.\n\n Let \\fieldtype be \\mut~\\storagetype.\n\n For each field value \\fieldval_i in \\fieldval^\\ast:\n\n - The field value \\fieldval_i must be valid with storage type \\storagetype.\n\n* Then the array instance is valid.","crossrefs":["syntax-deftype","valid-deftype","context","aux-expand-deftype","syntax-arraytype","syntax-fieldval","valid-fieldval","syntax-storagetype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-arrayinst"},{"id":"valid-fieldval","anchors":["valid-fieldval","valid-packval"],"title":":ref:`Field Values <syntax-fieldval>` :math:`\\fieldval`","level":3,"path":"appendix/properties","prose":"If \\fieldval is a value \\val, then:\n\n - The value \\val must be valid with value type t.\n\n - Then the field value is valid with value type t.\n\n Else, \\fieldval is a packed value \\packval:\n\n - Let \\packtype.\\PACK~i be the field value \\fieldval.\n\n - Then the field value is valid with packed type \\packtype.","crossrefs":["syntax-val","valid-val","syntax-valtype","syntax-packval","syntax-packtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-fieldval"},{"id":"valid-exninst","anchors":["valid-exninst"],"title":":ref:`Exception Instances <syntax-exninst>` :math:`\\{ \\EITAG~a, \\EIFIELDS~\\val^\\ast \\}`","level":3,"path":"appendix/properties","prose":"The store entry S.\\STAGS[a] must exist.\n\n The expansion of the tag type S.\\STAGS[a].\\HITYPE must be some function type \\TFUNC~[t^\\ast] \\Tarrow [{t'}^\\ast].\n\n The result type [{t'}^\\ast] must be empty.\n\n The sequence \\val^ast of values must have the same length as the sequence t^\\ast of value types.\n\n For each value \\val_i in \\val^ast and corresponding value type t_i in t^\\ast, the value \\val_i must be valid with type t_i.\n\n Then the exception instance is valid.","crossrefs":["aux-expand-deftype","syntax-tagtype","syntax-functype","syntax-resulttype","syntax-val","syntax-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-exninst"},{"id":"valid-exportinst","anchors":["valid-exportinst"],"title":":ref:`Export Instances <syntax-exportinst>` :math:`\\{ \\XINAME~\\name, \\XIADDR~\\externaddr \\}`","level":3,"path":"appendix/properties","prose":"The external address \\externaddr must be valid with some external type \\externtype.\n\n Then the export instance is valid.","crossrefs":["syntax-externaddr","valid-externaddr","syntax-externtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-exportinst"},{"id":"valid-moduleinst","anchors":["valid-moduleinst"],"title":":ref:`Module Instances <syntax-moduleinst>` :math:`\\moduleinst`","level":3,"path":"appendix/properties","prose":"Each defined type \\deftype_i in \\moduleinst.\\MITYPES must be valid under the empty context.\n\n For each tag address \\tagaddr_i in \\moduleinst.\\MITAGS, the external address \\XATAG~\\tagaddr_i must be valid with some external type \\XTTAG~\\tagtype_i.\n\n For each global address \\globaladdr_i in \\moduleinst.\\MIGLOBALS, the external address \\XAGLOBAL~\\globaladdr_i must be valid with some external type \\XTGLOBAL~\\globaltype_i.\n\n For each memory address \\memaddr_i in \\moduleinst.\\MIMEMS, the external address \\XAMEM~\\memaddr_i must be valid with some external type \\XTMEM~\\memtype_i.\n\n For each table address \\tableaddr_i in \\moduleinst.\\MITABLES, the external address \\XATABLE~\\tableaddr_i must be valid with some external type \\XTTABLE~\\tabletype_i.\n\n For each function address \\funcaddr_i in \\moduleinst.\\MIFUNCS, the external address \\XAFUNC~\\funcaddr_i must be valid with some external type \\XTFUNC~\\deftype_{\\K{F}i}.\n\n For each data address \\dataaddr_i in \\moduleinst.\\MIDATAS, the data instance S.\\SDATAS[\\dataaddr_i] must be valid with \\X{ok}_i.\n\n For each element address \\elemaddr_i in \\moduleinst.\\MIELEMS, the element instance S.\\SELEMS[\\elemaddr_i] must be valid with some reference type \\reftype_i.\n\n Each export instance \\exportinst_i in \\moduleinst.\\MIEXPORTS must be valid.\n\n For each export instance \\exportinst_i in \\moduleinst.\\MIEXPORTS, the name \\exportinst_i.\\XINAME must be different from any other name occurring in \\moduleinst.\\MIEXPORTS.\n\n Let \\deftype^\\ast be the concatenation of all \\deftype_i in order.\n\n Let \\tagtype^\\ast be the concatenation of all \\tagtype_i in order.\n\n Let \\globaltype^\\ast be the concatenation of all \\globaltype_i in order.\n\n Let \\memtype^\\ast be the concatenation of all \\memtype_i in order.\n\n Let \\tabletype^\\ast be the concatenation of all \\tabletype_i in order.\n\n Let \\deftype_{\\K{F}}^\\ast be the concatenation of all \\deftype_{\\K{F}i} in order.\n\n Let \\reftype^\\ast be the concatenation of all \\reftype_i in order.\n\n Let \\X{ok}^\\ast be the concatenation of all \\X{ok}_i in order.\n\n Let m be the length of \\moduleinst.\\MIFUNCS.\n\n Let x^\\ast be the sequence of function indices from 0 to m-1.\n\n* Then the module instance is valid with context\n \\{\\CTYPES~\\deftype^\\ast, \\CTAGS~\\tagtype^\\ast, \\CGLOBALS~\\globaltype^\\ast, \\CMEMS~\\memtype^\\ast, \\CTABLES~\\tabletype^\\ast, \\CFUNCS~\\deftype_{\\K{F}}^\\ast, \\CDATAS~\\X{ok}^\\ast, \\CELEMS~\\reftype^\\ast, \\CREFS~x^\\ast\\}.\n\n.. scratch\n .. index:: context, store, frame","crossrefs":["syntax-deftype","valid-deftype","context","syntax-tagaddr","syntax-externaddr","valid-externaddr-tag","syntax-externtype","syntax-globaladdr","valid-externaddr-global","syntax-memaddr","valid-externaddr-mem","syntax-tableaddr","valid-externaddr-table","syntax-funcaddr","valid-externaddr-func","syntax-dataaddr","syntax-datainst","valid-datainst","syntax-elemaddr","syntax-eleminst","valid-eleminst","syntax-reftype","syntax-exportinst","valid-exportinst","syntax-name","syntax-funcidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-moduleinst"},{"id":"valid-context","anchors":["valid-context"],"title":"Context Validity","level":2,"path":"appendix/properties","prose":"A context C is valid when every type occurring in it is valid.\n\n .. math::\n \\frac{\n \\begin{array}{@{}c@{}}\n x^n = 0 \\dots (n-1)\n \\qquad\n (S; \\{CTYPES~\\deftype^n[0 \\slice x]\\} \\vdashdeftype \\deftype \\OKdeftype)^n\n \\\\\n (S; C \\vdashdeftype \\deftype \\OKdeftype)^\\ast\n \\qquad\n (S; C \\vdashtagtype \\tagtype \\OKtagtype)^\\ast\n \\\\\\\n (S; C \\vdashglobaltype \\globaltype \\OKglobaltype)^\\ast\n \\qquad\n (S; C \\vdashdeftype \\deftype' \\OKdeftype)^\\ast\n \\\\\n (S; C \\vdashmemtype \\memtype \\OKmemtype)^\\ast\n \\qquad\n (S; C \\vdashtabletype \\tabletype \\OKtabletype)^\\ast\n \\qquad\n (S; C \\vdashreftype \\reftype \\OKreftype)^\\ast\n \\\\\n C = \\{\n \\begin{array}[t]{@{}l@{~}l@{}}\n \\CTYPES & \\deftype^n, \\\\\n \\CTAGS & \\tagtype^\\ast, \\\\\n \\CGLOBALS & \\globaltype^\\ast, \\\\\n \\CMEMS & \\memtype^\\ast, \\\\\n \\CTABLES & \\tabletype^\\ast, \\\\\n \\CFUNCS & {\\deftype'}^\\ast, \\\\\n \\CELEMS & \\reftype^\\ast, \\\\\n \\CDATAS & {\\X{ok}}^\\ast ~\\}\n \\end{array}\n \\end{array}\n }{\n S \\vdashcontext C \\OKcontext\n }\n\n .. note::\n It is an invariant of the semantics that every context either consists of only static types or only dynamic types.","crossrefs":["context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-context"},{"id":"frame-context","anchors":["frame-context","valid-config"],"title":"Configuration Validity","level":2,"path":"appendix/properties","prose":"To relate the WebAssembly type system to its execution semantics, the typing rules for instructions must be extended to configurations S;T,\nwhich relates the store to execution threads.\n\nConfigurations and threads are classified by their result type.\nIn addition to the store S, threads are typed under a return type \\resulttype^?, which controls whether and with which type a return instruction is allowed.\nThis type is absent (\\epsilon) except for instruction sequences inside an administrative FRAME instruction.\n\nFinally, frames are classified with frame contexts, which extend the module contexts of a frame's associated module instance with the locals that the frame contains.","crossrefs":["valid","exec","valid-instr","syntax-config","syntax-store","syntax-thread","syntax-resulttype","syntax-frame","module-context","syntax-moduleinst","syntax-local"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#frame-context"},{"id":"appendix/properties-ref-configurations-syntax-config-math-s-t","anchors":[],"title":":ref:`Configurations <syntax-config>` :math:`S;T`","level":3,"path":"appendix/properties","prose":"The store S must be valid.\n\n Under no allowed return type,\n the thread T must be valid with some result type [t^\\ast].\n\n* Then the configuration is valid with the result type [t^\\ast].","crossrefs":["syntax-store","valid-store","syntax-thread","valid-thread","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"valid-thread","anchors":["valid-thread"],"title":":ref:`Threads <syntax-thread>` :math:`F;\\instr^\\ast`","level":3,"path":"appendix/properties","prose":"Let \\resulttype^? be the current allowed return type.\n\n The frame F must be valid with a context C.\n\n Let C' be the same context as C, but with CRETURN set to \\resulttype^?.\n\n Under context C',\n the instruction sequence \\instr^\\ast must be valid with some type [] \\to [t^\\ast].\n\n* Then the thread is valid with the result type [t^\\ast].","crossrefs":["syntax-frame","valid-frame","context","valid-instrs","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-thread"},{"id":"valid-frame","anchors":["valid-frame"],"title":":ref:`Frames <syntax-frame>` :math:`\\{\\ALOCALS~\\val^\\ast, \\AMODULE~\\moduleinst\\}`","level":3,"path":"appendix/properties","prose":"The module instance \\moduleinst must be valid with some module context C.\n\n Each value \\val_i in \\val^\\ast must be valid with some value type t_i.\n\n Let t^\\ast be the concatenation of all t_i in order.\n\n Let C' be the same context as C, but with the value types t^\\ast prepended to the CLOCALS list.\n\n* Then the frame is valid with frame context C'.","crossrefs":["syntax-moduleinst","valid-moduleinst","module-context","syntax-val","valid-val","syntax-valtype","context","frame-context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-frame"},{"id":"valid-instr-admin","anchors":["valid-instr-admin"],"title":"Administrative Instructions","level":2,"path":"appendix/properties","prose":"Typing rules for administrative instructions are specified as follows.\nIn addition to the context C, typing of these instructions is defined under a given store S.\n\nTo that end, all previous typing judgements C \\vdash \\X{prop} are generalized to include the store, as in S; C \\vdash \\X{prop}, by implicitly adding S to all rules -- S is never modified by the pre-existing rules, but it is accessed in the extra rules for administrative instructions given below.","crossrefs":["syntax-instr-admin","context","syntax-store","valid-instr-admin"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#valid-instr-admin"},{"id":"appendix/properties-math-trap","anchors":[],"title":":math:`\\TRAP`","level":3,"path":"appendix/properties","prose":"* The instruction is valid with any valid instruction type of the form [t_1^\\ast] \\to [t_2^\\ast].","crossrefs":["valid-instrtype","syntax-instrtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-math-val","anchors":[],"title":":math:`\\val`","level":3,"path":"appendix/properties","prose":"The value \\val must be valid with value type t.\n\n Then it is valid as an instruction with type [] \\to [t].","crossrefs":["syntax-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-math-label-n-instr-0-ast-instr-ast","anchors":[],"title":":math:`\\LABEL_n\\{\\instr_0^\\ast\\}~\\instr^\\ast`","level":3,"path":"appendix/properties","prose":"The instruction sequence \\instr_0^\\ast must be valid with some type [t_1^n] \\to_{x^\\ast} [t_2^].\n\n Let C' be the same context as C, but with the result type [t_1^n] prepended to the CLABELS list.\n\n Under context C',\n the instruction sequence \\instr^\\ast must be valid with type [] \\to_{{x'}^\\ast} [t_2^].\n\n Then the compound instruction is valid with type [] \\to [t_2^*].","crossrefs":["valid-instrs","context","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-math-frame-n-f-instr-ast","anchors":[],"title":":math:`\\FRAME_n\\{F\\}~\\instr^\\ast`","level":3,"path":"appendix/properties","prose":"Under the valid return type [t^n],\n the thread F; \\instr^\\ast must be valid with result type [t^n].\n\n Then the compound instruction is valid with type [] \\to [t^n].","crossrefs":["valid-resulttype","syntax-frame","valid-frame","syntax-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-math-handler-n-catch-ast-instr-ast","anchors":[],"title":":math:`\\HANDLER_n\\{\\catch^\\ast\\}~\\instr^\\ast`","level":3,"path":"appendix/properties","prose":"For every catch clause \\catch_i in \\catch^\\ast, \\catch_i must be valid.\n\n The instruction sequence \\instr^\\ast must be valid with some type [t_1^\\ast] \\to [t_2^\\ast].\n\n* Then the compound instruction is valid with type [t_1^\\ast] \\to [t_2^\\ast].","crossrefs":["syntax-catch","valid-catch","valid-instrs"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"extend","anchors":["extend"],"title":"Store Extension","level":2,"path":"appendix/properties","prose":"Programs can mutate the store and its contained instances.\nAny such modification must respect certain invariants, such as not removing allocated instances or changing immutable definitions.\nWhile these invariants are inherent to the execution semantics of WebAssembly instructions and modules,\nhost functions do not automatically adhere to them. Consequently, the required invariants must be stated as explicit constraints on the invocation of host functions.\nSoundness only holds when the embedder ensures these constraints.\n\nThe necessary constraints are codified by the notion of store extension:\na store state S' extends state S, written S \\extendsto S', when the following rules hold.\n\n Extension does not imply that the new store is valid, which is defined separately above.","crossrefs":["syntax-store","exec-instr","exec-instantiation","syntax-hostfunc","exec-invoke-host","embedder","valid-store"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend"},{"id":"extend-store","anchors":["extend-store"],"title":":ref:`Store <syntax-store>` :math:`S`","level":3,"path":"appendix/properties","prose":"The length of S.\\STAGS must not shrink.\n\n The length of S.\\SGLOBALS must not shrink.\n\n The length of S.\\SMEMS must not shrink.\n\n The length of S.\\STABLES must not shrink.\n\n The length of S.\\SFUNCS must not shrink.\n\n The length of S.\\SDATAS must not shrink.\n\n The length of S.\\SELEMS must not shrink.\n\n The length of S.\\SSTRUCTS must not shrink.\n\n The length of S.\\SARRAYS must not shrink.\n\n The length of S.\\SEXNS must not shrink.\n\n For each tag instance \\taginst_i in the original S.\\STAGS, the new tag instance must be an extension of the old.\n\n For each global instance \\globalinst_i in the original S.\\SGLOBALS, the new global instance must be an extension of the old.\n\n For each memory instance \\meminst_i in the original S.\\SMEMS, the new memory instance must be an extension of the old.\n\n For each table instance \\tableinst_i in the original S.\\STABLES, the new table instance must be an extension of the old.\n\n For each function instance \\funcinst_i in the original S.\\SFUNCS, the new function instance must be an extension of the old.\n\n For each data instance \\datainst_i in the original S.\\SDATAS, the new data instance must be an extension of the old.\n\n For each element instance \\eleminst_i in the original S.\\SELEMS, the new element instance must be an extension of the old.\n\n For each structure instance \\structinst_i in the original S.\\SSTRUCTS, the new structure instance must be an extension of the old.\n\n For each array instance \\arrayinst_i in the original S.\\SARRAYS, the new array instance must be an extension of the old.\n\n For each exception instance \\exninst_i in the original S.\\SEXNS, the new exception instance must be an extension of the old.","crossrefs":["syntax-taginst","extend-taginst","syntax-globalinst","extend-globalinst","syntax-meminst","extend-meminst","syntax-tableinst","extend-tableinst","syntax-funcinst","extend-funcinst","syntax-datainst","extend-datainst","syntax-eleminst","extend-eleminst","syntax-structinst","extend-structinst","syntax-arrayinst","extend-arrayinst","syntax-exninst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-store"},{"id":"extend-taginst","anchors":["extend-taginst"],"title":":ref:`Tag Instance <syntax-taginst>` :math:`\\taginst`","level":3,"path":"appendix/properties","prose":"* A tag instance must remain unchanged.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-taginst"},{"id":"extend-globalinst","anchors":["extend-globalinst"],"title":":ref:`Global Instance <syntax-globalinst>` :math:`\\globalinst`","level":3,"path":"appendix/properties","prose":"The global type \\globalinst.\\GITYPE must remain unchanged.\n\n Let \\mut~t be the structure of \\globalinst.\\GITYPE.\n\n* If \\mut is empty, then the value \\globalinst.\\GIVALUE must remain unchanged.","crossrefs":["syntax-globaltype","syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-globalinst"},{"id":"extend-meminst","anchors":["extend-meminst"],"title":":ref:`Memory Instance <syntax-meminst>` :math:`\\meminst`","level":3,"path":"appendix/properties","prose":"The memory type \\meminst.\\MITYPE must remain unchanged.\n\n The length of \\meminst.\\MIBYTES must not shrink.","crossrefs":["syntax-memtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-meminst"},{"id":"extend-tableinst","anchors":["extend-tableinst"],"title":":ref:`Table Instance <syntax-tableinst>` :math:`\\tableinst`","level":3,"path":"appendix/properties","prose":"The table type \\tableinst.\\TITYPE must remain unchanged.\n\n The length of \\tableinst.\\TIREFS must not shrink.","crossrefs":["syntax-tabletype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-tableinst"},{"id":"extend-funcinst","anchors":["extend-funcinst"],"title":":ref:`Function Instance <syntax-funcinst>` :math:`\\funcinst`","level":3,"path":"appendix/properties","prose":"* A function instance must remain unchanged.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-funcinst"},{"id":"extend-datainst","anchors":["extend-datainst"],"title":":ref:`Data Instance <syntax-datainst>` :math:`\\datainst`","level":3,"path":"appendix/properties","prose":"The list \\datainst.\\DIBYTES must:\n\n either remain unchanged,\n\n * or shrink to length 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-datainst"},{"id":"extend-eleminst","anchors":["extend-eleminst"],"title":":ref:`Element Instance <syntax-eleminst>` :math:`\\eleminst`","level":3,"path":"appendix/properties","prose":"The reference type \\eleminst.\\EITYPE must remain unchanged.\n\n The list \\eleminst.\\EIREFS must:\n\n either remain unchanged,\n\n or shrink to length 0.","crossrefs":["syntax-reftype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-eleminst"},{"id":"extend-structinst","anchors":["extend-structinst"],"title":":ref:`Structure Instance <syntax-structinst>` :math:`\\structinst`","level":3,"path":"appendix/properties","prose":"The defined type \\structinst.\\SITYPE must remain unchanged.\n\n Assert: due to store well-formedness, the expansion of \\structinst.\\SITYPE is a structure type.\n\n Let \\TSTRUCT~\\fieldtype^\\ast be the expansion of \\structinst.\\SITYPE.\n\n The length of the list \\structinst.\\SIFIELDS must remain unchanged.\n\n Assert: due to store well-formedness, the length of \\structinst.\\SIFIELDS is the same as the length of \\fieldtype^\\ast.\n\n For each field value \\fieldval_i in \\structinst.\\SIFIELDS and corresponding field type \\fieldtype_i in \\fieldtype^\\ast:\n\n Let \\mut_i~\\X{st}_i be the structure of \\fieldtype_i.\n\n If \\mut_i is empty, then the field value \\fieldval_i must remain unchanged.","crossrefs":["syntax-deftype","valid-structinst","aux-expand-deftype","syntax-structtype","syntax-fieldval","syntax-fieldtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-structinst"},{"id":"extend-arrayinst","anchors":["extend-arrayinst"],"title":":ref:`Array Instance <syntax-arrayinst>` :math:`\\arrayinst`","level":3,"path":"appendix/properties","prose":"The defined type \\arrayinst.\\AITYPE must remain unchanged.\n\n Assert: due to store well-formedness, the expansion of \\arrayinst.\\AITYPE is an array type.\n\n Let \\TARRAY~\\fieldtype be the expansion of \\arrayinst.\\AITYPE.\n\n The length of the list \\arrayinst.\\AIFIELDS must remain unchanged.\n\n Let \\mut~\\X{st} be the structure of \\fieldtype.\n\n If \\mut is empty, then the sequence of field values \\arrayinst.\\AIFIELDS must remain unchanged.","crossrefs":["syntax-deftype","valid-arrayinst","aux-expand-deftype","syntax-arraytype","syntax-fieldval"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-arrayinst"},{"id":"extend-exninst","anchors":["extend-exninst"],"title":":ref:`Exception Instance <syntax-exninst>` :math:`\\exninst`","level":3,"path":"appendix/properties","prose":"* An exception instance must remain unchanged.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#extend-exninst"},{"id":"soundness-statement","anchors":["soundness-statement"],"title":"Theorems","level":2,"path":"appendix/properties","prose":"Given the definition of valid configurations,\nthe standard soundness theorems hold. [#cite-cpp2018]_ [#cite-fm2021]_\n\nTheorem (Preservation).\nIf a configuration S;T is valid with result type [t^\\ast] (i.e., \\vdashconfig S;T : [t^\\ast]),\nand steps to S';T' (i.e., S;T \\stepto S';T'),\nthen S';T' is a valid configuration with the same result type (i.e., \\vdashconfig S';T' : [t^\\ast]).\nFurthermore, S' is an extension of S (i.e., \\vdashstoreextends S \\extendsto S').\n\nA terminal thread is one whose sequence of instructions is a result.\nA terminal configuration is a configuration whose thread is terminal.\n\nTheorem (Progress).\nIf a configuration S;T is valid (i.e., \\vdashconfig S;T : [t^\\ast] for some result type [t^\\ast]),\nthen either it is terminal,\nor it can step to some configuration S';T' (i.e., S;T \\stepto S';T').\n\nFrom Preservation and Progress the soundness of the WebAssembly type system follows directly.\n\nCorollary (Soundness).\nIf a configuration S;T is valid (i.e., \\vdashconfig S;T : [t^\\ast] for some result type [t^\\ast]),\nthen it either diverges or takes a finite number of steps to reach a terminal configuration S';T' (i.e., S;T \\stepto^\\ast S';T') that is valid with the same result type (i.e., \\vdashconfig S';T' : [t^\\ast])\nand where S' is an extension of S (i.e., \\vdashstoreextends S \\extendsto S').\n\nIn other words, every thread in a valid configuration either runs forever, traps, throws an exception, or terminates with a result that has the expected type.\nConsequently, given a valid store, no computation defined by instantiation or invocation of a valid module can \"crash\" or otherwise (mis)behave in ways not covered by the execution semantics given in this specification.\n\n.. [#cite-pldi2017]\n The formalization and theorems are derived from the following article:\n Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. PLDI2017. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-cpp2018]\n A machine-verified version of the formalization and soundness proof of the PLDI 2017 paper is described in the following article:\n Conrad Watt. CPP2018. Proceedings of the 7th ACM SIGPLAN Conference on Certified Programs and Proofs (CPP 2018). ACM 2018.\n\n.. [#cite-fm2021]\n Machine-verified formalizations and soundness proofs of the semantics from the official specification are described in the following article:\n Conrad Watt, Xiaojia Rao, Jean Pichon-Pharabod, Martin Bodin, Philippa Gardner. FM2021. Proceedings of the 24th International Symposium on Formal Methods (FM 2021). Springer 2021.","crossrefs":["valid-config","syntax-config","syntax-resulttype","extend-store","syntax-thread","syntax-instr","syntax-result","valid-store","exec-instantiation","exec-invocation","exec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#soundness-statement"},{"id":"appendix/properties-type-system-properties","anchors":[],"title":"Type System Properties","level":1,"path":"appendix/properties","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"principality","anchors":["principality"],"title":"Principal Types","level":2,"path":"appendix/properties","prose":"The type system of WebAssembly features both subtyping and simple forms of polymorphism for instruction types.\nThat has the effect that every instruction or instruction sequence can be classified with multiple different instruction types.\n\nHowever, the typing rules still allow deriving principal types for instruction sequences.\nThat is, every valid instruction sequence has one particular type scheme, possibly containing some unconstrained place holder type variables, that is a subtype of all its valid instruction types, after substituting its type variables with suitable specific types.\n\nMoreover, when deriving an instruction type in a \"forward\" manner, i.e., the input of the instruction sequence is already fixed to specific types,\nthen it has a principal output type expressible without type variables, up to a possibly polymorphic stack bottom representable with one single variable.\nIn other words, \"forward\" principal types are effectively closed.\n\n For example, in isolation, the instruction \\REFASNONNULL has the type [(\\REF~\\NULL~\\X{ht})] \\to [(\\REF~\\X{ht})] for any choice of valid heap type \\X{ht}.\n Moreover, if the input type [(\\REF~\\NULL~\\X{ht})] is already determined, i.e., a specific \\X{ht} is given, then the output type [(\\REF~\\X{ht})] is fully determined as well.\n\n The implication of the latter property is that a validator for complete instruction sequences (as they occur in valid modules) can be implemented with a simple left-to-right algorithm that does not require the introduction of type variables.\n\n A typing algorithm capable of handling partial instruction sequences (as might be considered for program analysis or program manipulation)\n needs to introduce type variables and perform substitutions,\n but it does not need to perform backtracking or record any non-syntactic constraints on these type variables.\n\nTechnically, the syntax of heap, value, and result types can be enriched with type variables as follows:\n\nwhere each \\alpha_{\\X{xyz}} ranges over a set of type variables for syntactic class \\X{xyz}, respectively.\nThe special class \\X{numvectype} is defined as \\numtype ~|~ \\vectype ~|~ \\BOT,\nand is only needed to handle unannotated SELECT instructions.\n\nA type is closed when it does not contain any type variables, and open otherwise.\nA type substitution \\sigma is a finite mapping from type variables to closed types of the respective syntactic class.\nWhen applied to an open type, it replaces the type variables \\alpha from its domain with the respective \\sigma(\\alpha).\n\nTheorem (Principal Types).\nIf an instruction sequence \\instr^\\ast is valid with some closed instruction type \\instrtype (i.e., C \\vdashinstrs \\instr^\\ast : \\instrtype),\nthen it is also valid with a possibly open instruction type \\instrtype_{\\min} (i.e., C \\vdashinstrs \\instr^\\ast : \\instrtype_{\\min}),\nsuch that for every closed type \\instrtype' with which \\instr^\\ast is valid (i.e., for all C \\vdashinstrs \\instr^\\ast : \\instrtype'),\nthere exists a substitution \\sigma,\nsuch that \\sigma(\\instrtype_{\\min}) is a subtype of \\instrtype' (i.e., C \\vdashinstrtypematch \\sigma(\\instrtype_{\\min}) \\subinstrtypematch \\instrtype').\nFurthermore, \\instrtype_{\\min} is unique up to the choice of type variables.\n\nTheorem (Closed Principal Forward Types).\nIf closed input type [t_1^\\ast] is given and the instruction sequence \\instr^\\ast is valid with instruction type [t_1^\\ast] \\to_{x^\\ast} [t_2^\\ast] (i.e., C \\vdashinstrs \\instr^\\ast : [t_1^\\ast] \\to_{x^\\ast} [t_2^\\ast]),\nthen it is also valid with instruction type [t_1^\\ast] \\to_{x^\\ast} [\\alpha_{\\valtype^\\ast}~t^\\ast] (i.e., C \\vdashinstrs \\instr^\\ast : [t_1^\\ast] \\to_{x^\\ast} [\\alpha_{\\valtype^\\ast}~t^\\ast]),\nwhere all t^\\ast are closed,\nsuch that for every closed result type [{t'_2}^\\ast] with which \\instr^\\ast is valid (i.e., for all C \\vdashinstrs \\instr^\\ast : [t_1^\\ast] \\to_{x^\\ast} [{t'_2}^\\ast]),\nthere exists a substitution \\sigma,\nsuch that [{t'_2}^\\ast] = [\\sigma(\\alpha_{\\valtype^\\ast})~t^\\ast].","crossrefs":["type-system","match","polymorphism","syntax-instrtype","syntax-type","algo-valid","syntax-heaptype","syntax-valtype","syntax-resulttype","valid-config"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html#principality"},{"id":"appendix/properties-type-lattice","anchors":[],"title":"Type Lattice","level":2,"path":"appendix/properties","prose":"The Principal Types property depends on the existence of a greatest lower bound for any pair of types.\n\nTheorem (Greatest Lower Bounds for Value Types).\nFor any two value types t_1 and t_2 that are valid\n(i.e., C \\vdashvaltype t_1 : \\OKvaltype and C \\vdashvaltype t_2 : \\OKvaltype),\nthere exists a valid value type t that is a subtype of both t_1 and t_2\n(i.e., C \\vdashvaltype t : \\OKvaltype and C \\vdashvaltypematch t \\subvaltypematch t_1 and C \\vdashvaltypematch t \\subvaltypematch t_2),\nsuch that every valid value type t' that also is a subtype of both t_1 and t_2\n(i.e., for all C \\vdashvaltype t' : \\OKvaltype and C \\vdashvaltypematch t' \\subvaltypematch t_1 and C \\vdashvaltypematch t' \\subvaltypematch t_2),\nis a subtype of t\n(i.e., C \\vdashvaltypematch t' \\subvaltypematch t).\n\n The greatest lower bound of two types may be BOT.\n\nTheorem (Conditional Least Upper Bounds for Value Types).\nAny two value types t_1 and t_2 that are valid\n(i.e., C \\vdashvaltype t_1 : \\OKvaltype and C \\vdashvaltype t_2 : \\OKvaltype)\neither have no common supertype,\nor there exists a valid value type t that is a supertype of both t_1 and t_2\n(i.e., C \\vdashvaltype t : \\OKvaltype and C \\vdashvaltypematch t_1 \\subvaltypematch t and C \\vdashvaltypematch t_2 \\subvaltypematch t),\nsuch that every valid value type t' that also is a supertype of both t_1 and t_2\n(i.e., for all C \\vdashvaltype t' : \\OKvaltype and C \\vdashvaltypematch t_1 \\subvaltypematch t' and C \\vdashvaltypematch t_2 \\subvaltypematch t'),\nis a supertype of t\n(i.e., C \\vdashvaltypematch t \\subvaltypematch t').\n\n If a top type was added to the type system,\n a least upper bound would exist for any two types.\n\nCorollary (Type Lattice).\nAssuming the addition of a provisional top type,\nvalue types form a lattice with respect to their subtype relation.\n\nFinally, value types can be partitioned into multiple disjoint hierarchies that are not related by subtyping, except through BOT.\n\nTheorem (Disjoint Subtype Hierarchies).\nThe greatest lower bound of two value types is \\BOT or \\REF~\\BOT\nif and only if they do not have a least upper bound.\n\nIn other words, types that do not have common supertypes,\ndo not have common subtypes either (other than \\BOT or \\REF~\\BOT), and vice versa.\n\n Types from disjoint hierarchies can safely be represented in mutually incompatible ways in an implementation,\n because their values can never flow to the same place.","crossrefs":["principality","valid-valtype","syntax-valtype","match-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"appendix/properties-compositionality","anchors":[],"title":"Compositionality","level":2,"path":"appendix/properties","prose":"Valid instruction sequences can be freely composed, as long as their types match up.\n\nTheorem (Composition).\nIf two instruction sequences \\instr_1^\\ast and \\instr_2^\\ast are valid with types [t_1^\\ast] \\to_{x_1^\\ast} [t^\\ast] and [t^\\ast] \\to_{x_2^\\ast} [t_2^\\ast], respectively (i.e., C \\vdashinstrs \\instr_1^\\ast : [t_1^\\ast] \\to_{x_1^\\ast} [t^\\ast] and C \\vdashinstrs \\instr_1^\\ast : [t^\\ast] \\to_{x_2^\\ast} [t_2^\\ast]),\nthen the concatenated instruction sequence (\\instr_1^\\ast\\;\\instr_2^\\ast) is valid with type [t_1^\\ast] \\to_{x_1^\\ast\\,x_2^\\ast} [t_2^\\ast] (i.e., C \\vdashinstrs \\instr_1^\\ast\\;\\instr_2^\\ast : [t_1^\\ast] \\to_{x_1^\\ast\\,x_2^\\ast} [t_2^\\ast]).\n\n More generally, instead of a shared type [t^\\ast], it suffices if the output type of \\instr_1^\\ast is a subtype of the input type of \\instr_1^\\ast,\n since the subtype can always be weakened to its supertype by subsumption.\n\nInversely, valid instruction sequences can also freely be decomposed, that is, splitting them anywhere produces two instruction sequences that are both valid.\n\nTheorem (Decomposition).\nIf an instruction sequence \\instr^\\ast that is valid with type [t_1^\\ast] \\to_{x^\\ast} [t_2^\\ast] (i.e., C \\vdashinstrs \\instr^\\ast : [t_1^\\ast] \\to_{x^\\ast} [t_2^\\ast])\nis split into two instruction sequences \\instr_1^\\ast and \\instr_2^\\ast at any point (i.e., \\instr^\\ast = \\instr_1^\\ast\\;\\instr_2^\\ast),\nthen these are separately valid with some types [t_1^\\ast] \\to_{x_1^\\ast} [t^\\ast] and [t^\\ast] \\to_{x_2^\\ast} [t_2^\\ast], respectively (i.e., C \\vdashinstrs \\instr_1^\\ast : [t_1^\\ast] \\to_{x_1^\\ast} [t^\\ast] and C \\vdashinstrs \\instr_1^\\ast : [t^\\ast] \\to_{x_2^\\ast} [t_2^\\ast]),\nwhere x^\\ast = x_1^\\ast\\;x_2^\\ast.\n\n This property holds because validation is required even for unreachable code.\n Without that, \\instr_2^\\ast might not be valid in isolation.","crossrefs":["valid-instrs","syntax-instr","match-resulttype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/appendix/properties.html"},{"id":"binary/conventions-conventions","anchors":[],"title":"Conventions","level":1,"path":"binary/conventions","prose":"The binary format for WebAssembly modules is a dense linear encoding of their abstract syntax.\n[#compression]_\n\nThe format is defined by an attribute grammar whose only terminal symbols are bytes.\nA byte sequence is a well-formed encoding of a module if and only if it is generated by the grammar.\n\nEach production of this grammar has exactly one synthesized attribute: the abstract syntax that the respective byte sequence encodes.\nThus, the attribute grammar implicitly defines a decoding function\n(i.e., a parsing function for the binary format).\n\nExcept for a few exceptions, the binary grammar closely mirrors the grammar of the abstract syntax.\n\n Some phrases of abstract syntax have multiple possible encodings in the binary format.\n For example, numbers may be encoded as if they had optional leading zeros.\n Implementations of decoders must support all possible alternatives;\n implementations of encoders can pick any allowed encoding.\n\nThe recommended extension for files containing WebAssembly modules in binary format is \"\\T{.wasm}\"\nand the recommended MediaType is \"\\T{application/wasm}\".\n\n.. [#compression]\n Additional encoding layers -- for example, introducing compression -- may be defined on top of the basic representation defined here.\n However, such layers are outside the scope of the current specification.","crossrefs":["module","syntax-module","syntax-byte"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/conventions.html"},{"id":"binary-grammar","anchors":["binary-grammar"],"title":"Grammar","level":2,"path":"binary/conventions","prose":"The following conventions are adopted in defining grammar rules for the binary format.\nThey mirror the conventions used for abstract syntax.\nIn order to distinguish symbols of the binary syntax from symbols of the abstract syntax, Btypewriter font is adopted for the former.\n\n Terminal symbols are bytes expressed in hexadecimal notation: 0x0F.\n\n Nonterminal symbols are written in typewriter font: Bvaltype, Binstr.\n\n $(B)^n is a sequence of n>=0 iterations of B.\n\n $(B) is a possibly empty sequence of iterations of B.\n (This is a shorthand for $(B)^n used where n is not relevant.)\n\n $(B)? is an optional occurrence of B.\n (This is a shorthand for $(B)^n where n<=1.)\n\n x:$(B) denotes the same language as the nonterminal B, but also binds the variable x to the attribute synthesized for B.\n A pattern may also be used instead of a variable, e.g., 7:$(B).\n\n Productions are written Bsym, where each A_i is the attribute that is synthesized for Bsym in the given case, usually from attribute variables bound in B_i.\n\n Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, Bsymsplit/1, and starting continuations with ellipses, Bsymsplit/2.\n\n Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n* If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation.\n (This is a shorthand for a side condition requiring multiple different variables to be equal.)\n\n For example, the binary grammar for number types is given as follows:\n\n \n\n Consequently, the byte 0x7F encodes the type I32,\n 0x7E encodes the type I64, and so forth.\n No other byte value is allowed as the encoding of a number type.\n\n The binary grammar for limits is defined as follows: \n\n \n\n That is, a limits pair is encoded as either the byte 0x00 followed by the encoding of a u64 value,\n or the byte 0x01 followed by two such encodings. \n The variables n and m name the attributes of the respective Bu64 nonterminals, which in this case are the actual unsigned integers those decode into.\n The attribute of the complete production then is the abstract syntax for the limit, expressed in terms of the former values.","crossrefs":["grammar","syntax-byte","binary-numtype","syntax-numtype","binary-limits","syntax-limits","syntax-uint"],"formal_refs":["Bnumtype","Blimits","Btypewriter","0x0F","Bvaltype","Binstr","$(B)^n","n>=0","B","$(B)*","n","$(B)?","n<=1","x:$(B)","x","7:$(B)","Bsym","A_i","B_i","Bsymsplit/1","Bsymsplit/2","0x7F","I32","0x7E","I64","0x00","u64","0x01","m","Bu64"],"url":"https://webassembly.github.io/spec/core/binary/conventions.html#binary-grammar"},{"id":"binary-notation","anchors":["binary-notation"],"title":"Auxiliary Notation","level":2,"path":"binary/conventions","prose":"When dealing with binary encodings the following notation is also used:\n\n eps denotes the empty byte sequence.\n\n |B| is the length of the byte sequence generated from the production B in a derivation.","crossrefs":[],"formal_refs":["eps","||B||","B"],"url":"https://webassembly.github.io/spec/core/binary/conventions.html#binary-notation"},{"id":"binary-list","anchors":["binary-list"],"title":"Lists","level":2,"path":"binary/conventions","prose":"Lists are encoded with their Bu32 length followed by the encoding of their element sequence.","crossrefs":["syntax-list"],"formal_refs":["Blist","Bu32"],"url":"https://webassembly.github.io/spec/core/binary/conventions.html#binary-list"},{"id":"binary","anchors":["binary"],"title":"Binary Format","level":1,"path":"binary/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/index.html#binary"},{"id":"binary-instr","anchors":["binary-instr"],"title":"Instructions","level":1,"path":"binary/instructions","prose":"Instructions are encoded by opcodes.\nEach opcode is represented by a single byte,\nand is followed by the instruction's immediate arguments, where present.\nThe only exception are structured control instructions, which consist of several opcodes bracketing their nested instruction sequences.\n\n The byte codes chosen to encode instructions are historical and do not follow a consistent pattern.\n In this section, instructions are hence not presented in opcode order,\n but instead grouped consistently with other sections in this document.\n An instruction index ordered by opcode can be found in the Appendix.\n\n Gaps in the byte code ranges are reserved for future extensions.","crossrefs":["syntax-instr","binary-instr-control","index-instr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr"},{"id":"binary-instr-parametric","anchors":["binary-instr-parametric"],"title":"Parametric Instructions","level":2,"path":"binary/instructions","prose":"Parametric instructions are represented by single byte codes, possibly followed by a type annotation.","crossrefs":["syntax-instr-parametric"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-parametric"},{"id":"binary-nop","anchors":["binary-nop","binary-unreachable","binary-drop","binary-select"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/parametric"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-nop"},{"id":"binary-instr-control","anchors":["binary-instr-control"],"title":"Control Instructions","level":2,"path":"binary/instructions","prose":"Control instructions have varying encodings. For structured instructions, the instruction sequences forming nested blocks are delimited with explicit opcodes for END and ELSE.\n\nBlock types are encoded in special compressed form, by either the byte 0x40 indicating the empty type, as a single value type, or as a type index encoded as a positive signed integer.","crossrefs":["syntax-instr-control","syntax-blocktype","binary-valtype","binary-typeidx","binary-sint"],"formal_refs":["END","ELSE","0x40"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-control"},{"id":"binary-blocktype","anchors":["binary-blocktype","binary-block","binary-loop","binary-if","binary-br","binary-br_if","binary-br_table","binary-br_on_null","binary-br_on_non_null","binary-br_on_cast","binary-br_on_cast_fail","binary-return","binary-call","binary-call_ref","binary-call_indirect","binary-return_call","binary-return_call_ref","binary-return_call_indirect","binary-throw","binary-throw_ref","binary-try_table","binary-catch","binary-castop"],"title":null,"level":0,"path":"binary/instructions","prose":"The ELSE opcode 0x05 in the encoding of an IF instruction can be omitted if the following instruction sequence is empty.\n\n Unlike any other occurrence, the type index in a block type is encoded as a positive signed integer, so that its SignedLEB128 bit pattern cannot collide with the encoding of value types or the special code 0x40, which correspond to the LEB128 encoding of negative integers.\n To avoid any loss in the range of allowed indices, it is treated as a 33 bit signed integer.","crossrefs":["binary-typeidx","syntax-typeidx","syntax-blocktype","syntax-sint","binary-valtype"],"formal_refs":["Bblocktype","Binstr/block","Binstr/control","Bcatch","Bcastop","castop","ELSE","0x05","IF","0x40"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-blocktype"},{"id":"binary-instr-variable","anchors":["binary-instr-variable"],"title":"Variable Instructions","level":2,"path":"binary/instructions","prose":"Variable instructions are represented by byte codes followed by the encoding of the respective index.","crossrefs":["syntax-instr-variable","syntax-index"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-variable"},{"id":"binary-local.get","anchors":["binary-local.get","binary-local.set","binary-local.tee","binary-global.get","binary-global.set"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/local","Binstr/global"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-local.get"},{"id":"binary-instr-table","anchors":["binary-instr-table","binary-table.get","binary-table.set","binary-table.size","binary-table.grow","binary-table.fill","binary-table.copy","binary-table.init","binary-elem.drop"],"title":"Table Instructions","level":2,"path":"binary/instructions","prose":"Table instructions are represented either by a single byte or a one byte prefix followed by a variable-length unsigned integer.","crossrefs":["syntax-instr-table","binary-uint"],"formal_refs":["Binstr/table"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-table"},{"id":"binary-instr-memory","anchors":["binary-instr-memory"],"title":"Memory Instructions","level":2,"path":"binary/instructions","prose":"Each variant of memory instruction is encoded with a different byte code. Loads and stores are followed by the encoding of their memarg immediate, which includes the memory index if bit 6 of the flags field containing alignment is set; the memory index defaults to 0 otherwise.","crossrefs":["syntax-instr-memory","binary-memidx"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-memory"},{"id":"binary-memarg","anchors":["binary-memarg","binary-load","binary-loadn","binary-store","binary-storen","binary-memory.size","binary-memory.grow","binary-memory.fill","binary-memory.copy","binary-memory.init","binary-data.drop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Bmemarg","Binstr/memory"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-memarg"},{"id":"binary-instr-ref","anchors":["binary-instr-ref"],"title":"Reference Instructions","level":2,"path":"binary/instructions","prose":"Generic reference instructions are represented by single byte codes, others use prefixes and type operands.","crossrefs":["syntax-instr-ref"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-ref"},{"id":"binary-ref.null","anchors":["binary-ref.null","binary-ref.func","binary-ref.is_null","binary-ref.as_non_null","binary-ref.test","binary-ref.cast"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/ref"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-ref.null"},{"id":"binary-instr-aggr","anchors":["binary-instr-aggr"],"title":"Aggregate Instructions","level":2,"path":"binary/instructions","prose":"Aggregate instructions all use a prefix.","crossrefs":["syntax-instr-aggr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-aggr"},{"id":"binary-ref.i31","anchors":["binary-ref.i31","binary-i31.get_s","binary-i31.get_u","binary-struct.new","binary-struct.new_default","binary-struct.get","binary-struct.get_s","binary-struct.get_u","binary-struct.set","binary-array.new","binary-array.new_default","binary-array.new_fixed","binary-array.new_elem","binary-array.new_data","binary-array.get","binary-array.get_s","binary-array.get_u","binary-array.set","binary-array.len","binary-array.fill","binary-array.copy","binary-array.init_data","binary-array.init_elem","binary-any.convert_extern","binary-extern.convert_any"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/struct","Binstr/array","Binstr/extern","Binstr/i31"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-ref.i31"},{"id":"binary-instr-numeric","anchors":["binary-instr-numeric"],"title":"Numeric Instructions","level":2,"path":"binary/instructions","prose":"All variants of numeric instructions are represented by separate byte codes.\n\nThe CONST instructions are followed by the respective literal.","crossrefs":["syntax-instr-numeric"],"formal_refs":["CONST"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-numeric"},{"id":"binary-const","anchors":["binary-const"],"title":null,"level":0,"path":"binary/instructions","prose":"All other numeric instructions are plain opcodes without any immediates.","crossrefs":[],"formal_refs":["Binstr/num-const"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-const"},{"id":"binary-testop","anchors":["binary-testop","binary-relop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/num-test-i32","Binstr/num-rel-i32","Binstr/num-test-i64","Binstr/num-rel-i64","Binstr/num-rel-f32","Binstr/num-rel-f64"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-testop"},{"id":"binary-unop","anchors":["binary-unop","binary-binop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/num-un-i32","Binstr/num-bin-i32","Binstr/num-un-i64","Binstr/num-bin-i64","Binstr/num-un-f32","Binstr/num-bin-f32","Binstr/num-un-f64","Binstr/num-bin-f64"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-unop"},{"id":"binary-cvtop","anchors":["binary-cvtop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/num-cvt","Binstr/num-un-ext-i32","Binstr/num-un-ext-i64"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-cvtop"},{"id":"binary-cvtop-trunc-sat","anchors":["binary-cvtop-trunc-sat"],"title":null,"level":0,"path":"binary/instructions","prose":"The saturating truncation instructions all have a one byte prefix,\nwhereas the actual opcode is encoded by a variable-length unsigned integer.","crossrefs":["binary-uint"],"formal_refs":["Binstr/num-cvt-sat"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-cvtop-trunc-sat"},{"id":"binary-instr-vec","anchors":["binary-instr-vec"],"title":"Vector Instructions","level":2,"path":"binary/instructions","prose":"All variants of vector instructions are represented by separate byte codes.\nThey all have a one byte prefix, whereas the actual opcode is encoded by a variable-length unsigned integer.\n\nVector loads and stores are followed by the encoding of their memarg immediate.","crossrefs":["syntax-instr-vec","binary-uint"],"formal_refs":["memarg"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-instr-vec"},{"id":"binary-laneidx","anchors":["binary-laneidx"],"title":null,"level":0,"path":"binary/instructions","prose":"The CONST instruction for vectors is followed by 16 immediate bytes, which are converted into an u128 in littleendian byte order:","crossrefs":[],"formal_refs":["Blaneidx","Binstr/vec-memory","Binstr/vec-const","CONST","u128"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-laneidx"},{"id":"binary-vswizzlop","anchors":["binary-vswizzlop","binary-vshuffle"],"title":null,"level":0,"path":"binary/instructions","prose":"The SHUFFLE instruction is also followed by the encoding of 16 laneidx immediates.\n\nLane instructions are followed by the encoding of a laneidx immediate.","crossrefs":[],"formal_refs":["Binstr/vec-shuffle","SHUFFLE","laneidx"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vswizzlop"},{"id":"binary-vextract_lane","anchors":["binary-vextract_lane","binary-vreplace_lane"],"title":null,"level":0,"path":"binary/instructions","prose":"All other vector instructions are plain opcodes without any immediates.","crossrefs":[],"formal_refs":["Binstr/vec-lane"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vextract_lane"},{"id":"binary-vsplat","anchors":["binary-vsplat"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-splat"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vsplat"},{"id":"binary-virelop","anchors":["binary-virelop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-rel-i8x16","Binstr/vec-rel-i16x8","Binstr/vec-rel-i32x4","Binstr/vec-rel-i64x2"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-virelop"},{"id":"binary-vfrelop","anchors":["binary-vfrelop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-rel-f32x4","Binstr/vec-rel-f64x2"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vfrelop"},{"id":"binary-vvunop","anchors":["binary-vvunop","binary-vvbinop","binary-vvternop","binary-vvtestop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-un-v128","Binstr/vec-bin-v128","Binstr/vec-tern-v128","Binstr/vec-test-v128"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vvunop"},{"id":"binary-vitestop","anchors":["binary-vitestop","binary-vshiftop","binary-viunop","binary-vibinop","binary-viternop","binary-viextunop","binary-viextbinop","binary-viextternop","binary-viminmaxop","binary-vsatbinop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-un-i8x16","Binstr/vec-test-i8x16","Binstr/vec-bitmask-i8x16","Binstr/vec-narrow-i8x16","Binstr/vec-shift-i8x16","Binstr/vec-bin-i8x16","Binstr/vec-extun-i16x8","Binstr/vec-un-i16x8","Binstr/vec-test-i16x8","Binstr/vec-bitmask-i16x8","Binstr/vec-narrow-i16x8","Binstr/vec-ext-i16x8","Binstr/vec-shift-i16x8","Binstr/vec-bin-i16x8","Binstr/vec-extbin-i16x8","Binstr/vec-extun-i32x4","Binstr/vec-un-i32x4","Binstr/vec-test-i32x4","Binstr/vec-bitmask-i32x4","Binstr/vec-ext-i32x4","Binstr/vec-shift-i32x4","Binstr/vec-bin-i32x4","Binstr/vec-extbin-i32x4","Binstr/vec-exttern-i32x4","Binstr/vec-un-i64x2","Binstr/vec-test-i64x2","Binstr/vec-bitmask-i64x2","Binstr/vec-ext-i64x2","Binstr/vec-shift-i64x2","Binstr/vec-bin-i64x2","Binstr/vec-extbin-i64x2"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vitestop"},{"id":"binary-vfunop","anchors":["binary-vfunop","binary-vfbinop","binary-vfternop"],"title":null,"level":0,"path":"binary/instructions","prose":"","crossrefs":[],"formal_refs":["Binstr/vec-un-f32x4","Binstr/vec-bin-f32x4","Binstr/vec-tern-f32x4","Binstr/vec-un-f64x2","Binstr/vec-bin-f64x2","Binstr/vec-tern-f64x2","Binstr/vec-cvt"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-vfunop"},{"id":"binary-expr","anchors":["binary-expr"],"title":"Expressions","level":2,"path":"binary/instructions","prose":"Expressions are encoded by their instruction sequence terminated with an explicit 0x0B opcode for END.","crossrefs":["syntax-expr"],"formal_refs":["Bexpr","0x0B","END"],"url":"https://webassembly.github.io/spec/core/binary/instructions.html#binary-expr"},{"id":"binary/modules-modules","anchors":[],"title":"Modules","level":1,"path":"binary/modules","prose":"The binary encoding of modules is organized into sections.\nMost sections correspond to one component of a module record,\nexcept that function definitions are split into two sections, separating their type declarations in the function section from their bodies in the code section.\n\n This separation enables parallel and streaming compilation of the functions in a module.","crossrefs":["syntax-module","syntax-func","binary-funcsec","binary-codesec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/modules.html"},{"id":"binary-typeidx","anchors":["binary-typeidx","binary-tagidx","binary-globalidx","binary-memidx","binary-tableidx","binary-funcidx","binary-dataidx","binary-elemidx","binary-localidx","binary-labelidx","binary-fieldidx","binary-externidx","binary-index"],"title":"Indices","level":2,"path":"binary/modules","prose":"All basic indices are encoded with their respective value.\n\nExternal indices are encoded by a distiguishing byte followed by an encoding of their respective value.","crossrefs":["syntax-index","syntax-externidx"],"formal_refs":["Btypeidx","Bfuncidx","Btableidx","Bmemidx","Bglobalidx","Btagidx","Belemidx","Bdataidx","Blocalidx","Bfieldidx","Blabelidx","Bexternidx"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-typeidx"},{"id":"binary-section","anchors":["binary-section"],"title":"Sections","level":2,"path":"binary/modules","prose":"Each section consists of\n\n a one-byte section id,\n the u32 length of the contents, in bytes,\n the actual contents*, whose structure is dependent on the section id.\n\nEvery section is optional; an omitted section is equivalent to the section being present with empty contents.\n\nThe following parameterized grammar rule defines the generic structure of a section with id N and contents described by the grammar X.\n\nFor most sections, the contents X encodes a list.\nIn these cases, the empty result eps is interpreted as the empty list.\n\n Other than for unknown custom sections,\n the size is not required for decoding, but can be used to skip sections when navigating through a binary.\n The module is malformed if the size does not match the length of the binary contents X.\n\nThe following section ids are used:\n\n== ===============================================\nId Section \n== ===============================================\n 0 custom section \n 1 type section \n 2 import section \n 3 function section \n 4 table section \n 5 memory section \n 6 global section \n 7 export section \n 8 start section \n 9 element section \n10 code section \n11 data section \n12 data count section\n13 tag section\n== ===============================================\n\n Section ids do not always correspond to the order of sections in the encoding of a module.","crossrefs":["binary-list","binary-customsec","binary-typesec","binary-importsec","binary-funcsec","binary-tablesec","binary-memsec","binary-globalsec","binary-exportsec","binary-startsec","binary-elemsec","binary-codesec","binary-datasec","binary-datacntsec","binary-tagsec","binary-module"],"formal_refs":["Bsection_","u32","N","X","eps","size"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-section"},{"id":"binary-customsec","anchors":["binary-customsec"],"title":"Custom Section","level":2,"path":"binary/modules","prose":"Custom sections have the id 0.\nThey are intended to be used for debugging information or third-party extensions, and are ignored by the WebAssembly semantics.\nTheir contents consist of a name further identifying the custom section, followed by an uninterpreted sequence of bytes for custom use.\n\n If an implementation interprets the data of a custom section, then errors in that data, or the placement of the section, must not invalidate the module.","crossrefs":["syntax-name"],"formal_refs":["Bcustomsec","Bcustom"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-customsec"},{"id":"binary-type","anchors":["binary-type","binary-typesec"],"title":"Type Section","level":2,"path":"binary/modules","prose":"The type section has the id 1.\nIt decodes into the list of recursive types of a module.","crossrefs":["syntax-rectype","syntax-module"],"formal_refs":["Btypesec","Btype"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-type"},{"id":"binary-import","anchors":["binary-import","binary-importdesc","binary-importsec"],"title":"Import Section","level":2,"path":"binary/modules","prose":"The import section has the id 2.\nIt decodes into the list of imports of a module.","crossrefs":["syntax-import","syntax-module"],"formal_refs":["Bimportsec","Bimport"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-import"},{"id":"binary-funcsec","anchors":["binary-funcsec"],"title":"Function Section","level":2,"path":"binary/modules","prose":"The function section has the id 3.\nIt decodes into a list of type indices that classify the functions defined by a module.\nThe bodies of the respective functions are encoded separately in the code section.","crossrefs":["syntax-typeidx","syntax-func","syntax-module","binary-codesec"],"formal_refs":["Bfuncsec"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-funcsec"},{"id":"binary-table","anchors":["binary-table","binary-tablesec"],"title":"Table Section","level":2,"path":"binary/modules","prose":"The table section has the id 4.\nIt decodes into the list of tables defined by a module.\n\n The encoding of a table type cannot start with byte 0x40`,\n hence decoding is unambiguous.\n The zero byte following it is reserved for future extensions.","crossrefs":["syntax-table","syntax-module"],"formal_refs":["Btablesec","Btable","0x40"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-table"},{"id":"binary-mem","anchors":["binary-mem","binary-memsec"],"title":"Memory Section","level":2,"path":"binary/modules","prose":"The memory section has the id 5.\nIt decodes into the list of memories defined by a module.","crossrefs":["syntax-mem","syntax-module"],"formal_refs":["Bmemsec","Bmem"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-mem"},{"id":"binary-global","anchors":["binary-global","binary-globalsec"],"title":"Global Section","level":2,"path":"binary/modules","prose":"The global section has the id 6.\nIt decodes into the list of globals defined by a module.","crossrefs":["syntax-global","syntax-module"],"formal_refs":["Bglobalsec","Bglobal"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-global"},{"id":"binary-export","anchors":["binary-export","binary-exportdesc","binary-exportsec"],"title":"Export Section","level":2,"path":"binary/modules","prose":"The export section has the id 7.\nIt decodes into the list of exports of a module.","crossrefs":["syntax-export","syntax-module"],"formal_refs":["Bexportsec","Bexport"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-export"},{"id":"binary-start","anchors":["binary-start","binary-startsec"],"title":"Start Section","level":2,"path":"binary/modules","prose":"The start section has the id 8.\nIt decodes into the optional start function of a module.","crossrefs":["syntax-start","syntax-module"],"formal_refs":["Bstartsec","Bstart"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-start"},{"id":"binary-elem","anchors":["binary-elem","binary-elemsec","binary-elemkind"],"title":"Element Section","level":2,"path":"binary/modules","prose":"The element section has the id 9.\nIt decodes into the list of element segments defined by a module.\n\n The initial integer can be interpreted as a bitfield.\n Bit 0 distinguishes a passive or declarative segment from an active segment,\n bit 1 indicates the presence of an explicit table index for an active segment and otherwise distinguishes passive from declarative segments,\n bit 2 indicates the use of element type and element expressions instead of element kind and element indices.\n\n Additional element kinds may be added in future versions of WebAssembly.","crossrefs":["syntax-elem","syntax-module","binary-expr"],"formal_refs":["Belemsec","Belemkind","Belem"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-elem"},{"id":"binary-code","anchors":["binary-code","binary-func","binary-local","binary-codesec"],"title":"Code Section","level":2,"path":"binary/modules","prose":"The code section has the id 10.\nIt decodes into the list of code entries that are pairs of lists of locals and expressions.\nThey represent the body of the functions defined by a module.\nThe types of the respective functions are encoded separately in the function section.\n\nThe encoding of each code entry consists of\n\n the u32 length of the function code in bytes,\n the actual function code, which in turn consists of\n\n the declaration of locals,\n the function body as an expression.\n\nLocal declarations are compressed into a list whose entries consist of\n\n a u32 count,\n a value type,\n\ndenoting count locals of the same value type.\n\nHere, code ranges over pairs (local* expr).\nAny code for which the length of the resulting sequence is out of bounds of the maximum size of a list is malformed.\n\n Like with sections, the code size is not needed for decoding, but can be used to skip functions when navigating through a binary.\n The module is malformed if a size does not match the length of the respective function code.","crossrefs":["syntax-list","syntax-expr","syntax-func","syntax-module","binary-funcsec","binary-expr","binary-valtype","binary-section"],"formal_refs":["Bcodesec","Bcode","Bfunc","Blocals","u32","code","(local*","expr)","size"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-code"},{"id":"binary-data","anchors":["binary-data","binary-datasec"],"title":"Data Section","level":2,"path":"binary/modules","prose":"The data section has the id 11.\nIt decodes into the list of data segments defined by a module.\n\n The initial integer can be interpreted as a bitfield.\n Bit 0 indicates a passive segment,\n bit 1 indicates the presence of an explicit memory index for an active segment.","crossrefs":["syntax-data","syntax-module"],"formal_refs":["Bdatasec","Bdata"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-data"},{"id":"binary-datacntsec","anchors":["binary-datacntsec","binary-datacnt"],"title":"Data Count Section","level":2,"path":"binary/modules","prose":"The data count section has the id 12.\nIt decodes into an optional u32 count that represents the number of data segments in the data section.\nIf this count does not match the length of the data segment list, the module is malformed.\n\n The data count section is used to simplify single-pass validation. Since the\n data section occurs after the code section, the MEMORY.INIT and\n DATA.DROP instructions would not be able to check whether the data\n segment index is valid until the data section is read. The data count section\n occurs before the code section, so a single-pass validator can use this count\n instead of deferring validation.","crossrefs":["syntax-data","binary-datasec"],"formal_refs":["Bdatacntsec","Bdatacnt","u32","MEMORY.INIT","DATA.DROP"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-datacntsec"},{"id":"binary-tag","anchors":["binary-tag","binary-tagsec"],"title":"Tag Section","level":2,"path":"binary/modules","prose":"The tag section has the id 13.\nIt decodes into the list of tags defined by a module.","crossrefs":["syntax-tag","syntax-module"],"formal_refs":["Btagsec","Btag"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-tag"},{"id":"binary-magic","anchors":["binary-magic","binary-version","binary-module"],"title":"Modules","level":2,"path":"binary/modules","prose":"The encoding of a module starts with a preamble containing a 4-byte magic number (the string \\text{\\backslash0asm}) and a version field.\nThe current version of the WebAssembly binary format is 1.\n\nThe preamble is followed by a sequence of sections.\nCustom sections may be inserted at any place in this sequence,\nwhile other sections must occur at most once and in the prescribed order.\nAll sections can be empty.\n\nThe lengths of lists produced by the (possibly empty) function and code section must match up.\n\nSimilarly, the optional data count must match the length of the data segment list.\nFurthermore, it must be present if any data index occurs in the code section.\n\n The version of the WebAssembly binary format may increase in the future\n if backward-incompatible changes have to be made to the format.\n However, such changes are expected to occur very infrequently, if ever.\n The binary format is intended to be extensible,\n such that future features can be added without incrementing its version.","crossrefs":["syntax-module","binary-section","binary-customsec","binary-funcsec","binary-codesec","binary-datasec","syntax-dataidx"],"formal_refs":["Bmagic","Bversion","Bmodule"],"url":"https://webassembly.github.io/spec/core/binary/modules.html#binary-magic"},{"id":"binary/types-types","anchors":[],"title":"Types","level":1,"path":"binary/types","prose":"In some places, possible types include both type constructors or types denoted by type indices.\n Thus, the binary format for type constructors corresponds to the encodings of small negative sN(N) values, such that they can unambiguously occur in the same place as (positive) type indices.","crossrefs":["syntax-typeidx"],"formal_refs":["sN(N)"],"url":"https://webassembly.github.io/spec/core/binary/types.html"},{"id":"binary-numtype","anchors":["binary-numtype"],"title":"Number Types","level":2,"path":"binary/types","prose":"Number types are encoded by a single byte.","crossrefs":["syntax-numtype"],"formal_refs":["Bnumtype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-numtype"},{"id":"binary-vectype","anchors":["binary-vectype"],"title":"Vector Types","level":2,"path":"binary/types","prose":"Vector types are also encoded by a single byte.","crossrefs":["syntax-vectype"],"formal_refs":["Bvectype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-vectype"},{"id":"binary-heaptype","anchors":["binary-heaptype","binary-absheaptype"],"title":"Heap Types","level":2,"path":"binary/types","prose":"Heap types are encoded as either a single byte, or as a type index encoded as a positive signed integer.\n\n The heap type BOT cannot occur in a module.","crossrefs":["syntax-reftype","binary-typeidx","binary-sint"],"formal_refs":["Babsheaptype","Bheaptype","BOT"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-heaptype"},{"id":"binary-reftype","anchors":["binary-reftype"],"title":"Reference Types","level":2,"path":"binary/types","prose":"Reference types are either encoded by a single byte followed by a heap type, or, as a short form, directly as an abstract heap type.","crossrefs":["syntax-reftype","binary-heaptype","binary-absheaptype"],"formal_refs":["Breftype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-reftype"},{"id":"binary-valtype","anchors":["binary-valtype"],"title":"Value Types","level":2,"path":"binary/types","prose":"Value types are encoded with their respective encoding as a number type, vector type, or reference type.\n\n The value type BOT cannot occur in a module.\n\n Value types can occur in contexts where type indices are also allowed, such as in the case of block types.\n Thus, the binary format for types corresponds to the SignedLEB128 encoding of small negative sN(N) values, so that they can coexist with (positive) type indices in the future.","crossrefs":["syntax-valtype","binary-numtype","binary-vectype","binary-reftype","syntax-typeidx","binary-blocktype","binary-sint"],"formal_refs":["Bvaltype","BOT","sN(N)"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-valtype"},{"id":"binary-resulttype","anchors":["binary-resulttype"],"title":"Result Types","level":2,"path":"binary/types","prose":"Result types are encoded by the respective lists of value types.","crossrefs":["syntax-resulttype","binary-list","binary-valtype"],"formal_refs":["Bresulttype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-resulttype"},{"id":"binary-mut","anchors":["binary-mut","binary-comptype","binary-aggrtype","binary-functype","binary-structtype","binary-arraytype","binary-fieldtype","binary-storagetype","binary-packtype"],"title":"Composite Types","level":2,"path":"binary/types","prose":"Composite types are encoded by a distinct byte followed by a type encoding of the respective form.","crossrefs":["syntax-comptype"],"formal_refs":["Bmut","Bcomptype","Bfieldtype","Bstoragetype","Bpacktype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-mut"},{"id":"binary-rectype","anchors":["binary-rectype","binary-subtype"],"title":"Recursive Types","level":2,"path":"binary/types","prose":"Recursive types are encoded by the byte 0x4E followed by a list of sub types.\nAdditional shorthands are recognized for unary recursions and sub types without super types.","crossrefs":["syntax-rectype","binary-list","syntax-subtype"],"formal_refs":["Brectype","Bsubtype","0x4E"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-rectype"},{"id":"binary-limits","anchors":["binary-limits"],"title":"Limits","level":2,"path":"binary/types","prose":"Limits are encoded with a preceding flag indicating whether a maximum is present, and a flag for the address type.","crossrefs":["syntax-limits","syntax-addrtype"],"formal_refs":["Blimits"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-limits"},{"id":"binary-tagtype","anchors":["binary-tagtype"],"title":"Tag Types","level":2,"path":"binary/types","prose":"Tag types are encoded by a type index denoting a function type.\n\n In future versions of WebAssembly,\n the preceding zero byte may encode additional attributes.","crossrefs":["syntax-tagtype","syntax-typeidx","syntax-functype"],"formal_refs":["Btagtype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-tagtype"},{"id":"binary-globaltype","anchors":["binary-globaltype"],"title":"Global Types","level":2,"path":"binary/types","prose":"Global types are encoded by their value type and a flag for their mutability.","crossrefs":["syntax-globaltype","binary-valtype","syntax-mut"],"formal_refs":["Bglobaltype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-globaltype"},{"id":"binary-memtype","anchors":["binary-memtype"],"title":"Memory Types","level":2,"path":"binary/types","prose":"Memory types are encoded with their limits.","crossrefs":["syntax-memtype","binary-limits"],"formal_refs":["Bmemtype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-memtype"},{"id":"binary-tabletype","anchors":["binary-tabletype"],"title":"Table Types","level":2,"path":"binary/types","prose":"Table types are encoded with their limits and the encoding of their element reference type.","crossrefs":["syntax-tabletype","binary-limits","syntax-reftype"],"formal_refs":["Btabletype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-tabletype"},{"id":"binary-externtype","anchors":["binary-externtype"],"title":"External Types","level":2,"path":"binary/types","prose":"External types are encoded by a distiguishing byte followed by an encoding of the respective form of type.","crossrefs":["syntax-externtype"],"formal_refs":["Bexterntype"],"url":"https://webassembly.github.io/spec/core/binary/types.html#binary-externtype"},{"id":"binary-value","anchors":["binary-value"],"title":"Values","level":1,"path":"binary/values","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/binary/values.html#binary-value"},{"id":"binary-byte","anchors":["binary-byte"],"title":"Bytes","level":2,"path":"binary/values","prose":"Bytes encode themselves.","crossrefs":["syntax-byte"],"formal_refs":["Bbyte"],"url":"https://webassembly.github.io/spec/core/binary/values.html#binary-byte"},{"id":"binary-sint","anchors":["binary-sint","binary-uint","binary-int"],"title":"Integers","level":2,"path":"binary/values","prose":"All integers are encoded using the LEB128 variable-length integer encoding, in either unsigned or signed variant.\n\nUnsigned integers are encoded in UnsignedLEB128 format.\nAs an additional constraint, the total number of bytes encoding a uN(N) value must not exceed $ceil($(N/7)) bytes.\n\nSigned integers are encoded in SignedLEB128 format, which uses a two's complement representation.\nAs an additional constraint, the total number of bytes encoding an sN(N) value must not exceed $ceil($(N/7)) bytes.\n\nUninterpreted integers are encoded as signed integers.\n\n The side conditions $(N>7) in the productions for non-terminal bytes of the uN(N) and sN(N) encodings restrict the encoding's length.\n However, \"trailing zeros\" are still allowed within these bounds.\n For example, 0x03 and 0x83 0x00 are both well-formed encodings for the value as a u8.\n Similarly, either of 0x7E and 0xFE 0x7F and 0xFE 0xFF 0x7F are well-formed encodings of the value as an s16.\n\n The side conditions on the value n of terminal bytes further enforce that\n any unused bits in these bytes must be for positive values and for negative ones.\n For example, 0x83 0x10 is malformed as a u8 encoding.\n Similarly, both 0x83 0x3E and 0xFF 0x7B are malformed as s8 encodings.","crossrefs":["syntax-int","syntax-uint","syntax-sint"],"formal_refs":["BuN","BsN","BiN","uN(N)","$ceil($(N/7))","sN(N)","$(N>7)","0x03","0x83","0x00","u8","0x7E","0xFE","0x7F","0xFF","s16","n","0x10","0x3E","0x7B","s8"],"url":"https://webassembly.github.io/spec/core/binary/values.html#binary-sint"},{"id":"binary-float","anchors":["binary-float"],"title":"Floating-Point","level":2,"path":"binary/values","prose":"Floating-point values are encoded directly by their IEEE754 (Section 3.4) bit pattern in LittleEndian byte order:","crossrefs":["syntax-float"],"formal_refs":["BfN"],"url":"https://webassembly.github.io/spec/core/binary/values.html#binary-float"},{"id":"binary-utf8","anchors":["binary-utf8","binary-name"],"title":"Names","level":2,"path":"binary/values","prose":"Names are encoded as a list of bytes containing the Unicode (Section 3.9) UTF-8 encoding of the name's character sequence.\n\nThe auxiliary $utf8 function expressing this encoding is defined as follows:\n\nwhere cont\n\n Unlike in some other formats, name strings are not 0-terminated.","crossrefs":["syntax-name","binary-list"],"formal_refs":["Bname","utf8","$utf8","cont"],"url":"https://webassembly.github.io/spec/core/binary/values.html#binary-utf8"},{"id":"exec/conventions-conventions","anchors":[],"title":"Conventions","level":1,"path":"exec/conventions","prose":"WebAssembly code is executed when instantiating a module or invoking an exported function on the resulting module instance.\n\nExecution behavior is defined in terms of an abstract machine that models the program state.\nIt includes a stack, which records operand values and control constructs, and an abstract store containing global state.\n\nFor each instruction, there is a rule that specifies the effect of its execution on the program state.\nFurthermore, there are rules describing the instantiation of a module.\nAs with validation, all rules are given in two equivalent forms:\n\n1. In prose, describing the execution in intuitive form.\n2. In formal notation, describing the rule in mathematical form. [#cite-pldi2017]_\n\n As with validation, the prose and formal rules are equivalent,\n so that understanding of the formal notation is not required to read this specification.\n The formalism offers a more concise description in notation that is used widely in programming languages semantics and is readily amenable to mathematical proof.","crossrefs":["exec-instantiation","exec-invocation","syntax-export","syntax-moduleinst","validation"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/conventions.html"},{"id":"exec-notation-textual","anchors":["exec-notation-textual"],"title":"Prose Notation","level":2,"path":"exec/conventions","prose":"Execution is specified by stylised, step-wise rules for each instruction of the abstract syntax.\nThe following conventions are adopted in stating these rules.\n\n The execution rules implicitly assume a given store s`.\n\n The execution rules also assume the presence of an implicit stack\n that is modified by pushing or popping\n values, labels, and frames.\n\n Certain rules require the stack to contain at least one frame.\n The most recent frame is referred to as the current frame.\n\n Both the store and the current frame are mutated by replacing some of their components.\n Such replacement is assumed to apply globally.\n\n The execution of an instruction may trap,\n in which case the entire computation is aborted and no further modifications to the store are performed by it. (Other computations can still be initiated afterwards.)\n\n The execution of an instruction may also end in a jump to a designated target,\n which defines the next instruction to execute.\n\n Execution can enter and exit instruction sequences that form blocks.\n\n Instruction sequences are implicitly executed in order, unless a trap, jump, or exception occurs.\n\n In various places the rules contain assertions* expressing crucial invariants about the program state.","crossrefs":["syntax-instr","syntax","store","stack","syntax-value","syntax-label","syntax-frame","syntax-instrs","syntax-instr-control"],"formal_refs":["s"],"url":"https://webassembly.github.io/spec/core/exec/conventions.html#exec-notation-textual"},{"id":"exec-notation","anchors":["exec-notation"],"title":"Formal Notation","level":2,"path":"exec/conventions","prose":"This section gives a brief explanation of the notation for specifying execution formally.\n For the interested reader, a more thorough introduction can be found in respective text books. [#cite-tapl]_\n\nThe formal execution rules use a standard approach for specifying operational semantics, rendering them into reduction rules.\nEvery rule has the following general form:\n\nA configuration is a syntactic description of a program state.\nEach rule specifies one step of execution.\nAs long as there is at most one reduction rule applicable to a given configuration, reduction -- and thereby execution -- is deterministic.\nWebAssembly has only very few exceptions to this, which are noted explicitly in this specification.\n\nFor WebAssembly, a configuration typically is a tuple (s; f; instr) consisting of the current store s, the call frame f of the current function, and the sequence of instructions that is to be executed.\n(A more precise definition is given later.)\n\nTo avoid unnecessary clutter, the store s and the frame f are often combined into a state z, which is a pair (s; f).\nMoreover, z is omitted from reduction rules that do not touch them.\n\nThere is no separate representation of the stack.\nInstead, it is conveniently represented as part of the configuration's instruction sequence.\nIn particular, values are defined to coincide with CONST and REF instructions,\nand a sequence of such instructions can be interpreted as an operand \"stack\" that grows to the right.\n\n For example, the reduction rule for the BINOP I32 ADD instruction can be given as follows:\n\n \n\n Per this rule, two CONST instructions and the ADD instruction itself are removed from the instruction stream and replaced with one new CONST instruction.\n This can be interpreted as popping two values off the stack and pushing the result.\n\n When no result is produced, an instruction reduces to the empty sequence:\n\n \n\nLabels and frames are similarly defined to be part of an instruction sequence.\n\nThe order of reduction is determined by the details of the reduction rules.\nUsually, the left-most instruction that is not a constant will be the subject of the next reduction step.\n\nReduction terminates* when no more reduction rules are applicable.\nSoundness of the WebAssembly type system guarantees that this is only the case when the original instruction sequence has either been reduced to a sequence of value instructions, which can be interpreted as the values of the resulting operand stack,\nor if an exception or trap occurred.\n\n For example, the following instruction sequence,\n\n \n\n terminates after three steps:\n\n \n \n\n where q_4 $(-q_2) and q_5 $(-q_2 q_3) and q_6 $(q_1 (-q_2 q_3)).\n\n.. [#cite-pldi2017]\n The semantics is derived from the following article:\n Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. PLDI2017. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-tapl]\n For example: Benjamin Pierce. TAPL. The MIT Press 2002","crossrefs":["store","frame","syntax-instr","syntax-config","stack","syntax-val","exec-binop","label","syntax-instr-admin","soundness","type-system","exception","trap"],"formal_refs":["configuration","(CONST","I32","n_1)","n_2)","(BINOP","ADD)","$((n_1","NOP","eps","F64","q_1)","q_2)","(UNOP","NEG)","q_3)","MUL)","NotationReduct/*","NotationReduct","(s;","f;","instr*)","s","f","z","f)","CONST","REF","BINOP","ADD","q_4","$(-q_2)","q_5","$(-q_2","q_6","$(q_1","(-q_2","q_3))"],"url":"https://webassembly.github.io/spec/core/exec/conventions.html#exec-notation"},{"id":"exec","anchors":["exec"],"title":"Execution","level":1,"path":"exec/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/index.html#exec"},{"id":"exec-instr","anchors":["exec-instr"],"title":"Instructions","level":1,"path":"exec/instructions","prose":"WebAssembly computation is performed by executing individual instructions.","crossrefs":["syntax-instr"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr"},{"id":"exec-instr-parametric","anchors":["exec-instr-parametric"],"title":"Parametric Instructions","level":2,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-parametric"},{"id":"exec-nop","anchors":["exec-nop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/nop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-nop"},{"id":"exec-unreachable","anchors":["exec-unreachable"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/unreachable"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unreachable"},{"id":"exec-drop","anchors":["exec-drop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/drop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-drop"},{"id":"exec-select","anchors":["exec-select"],"title":null,"level":0,"path":"exec/instructions","prose":"In future versions of WebAssembly, SELECT may allow more than one value per choice.","crossrefs":[],"formal_refs":["Step_pure/select","Step_pure/select-*","SELECT"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-select"},{"id":"exec-label","anchors":["exec-label","exec-instr-control"],"title":"Control Instructions","level":2,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-label"},{"id":"exec-block","anchors":["exec-block"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/block"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-block"},{"id":"exec-loop","anchors":["exec-loop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/loop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-loop"},{"id":"exec-if","anchors":["exec-if"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/if","Step_pure/if-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-if"},{"id":"exec-br","anchors":["exec-br"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/br","Step_pure/br-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br"},{"id":"exec-br_if","anchors":["exec-br_if"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/br_if","Step_pure/br_if-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_if"},{"id":"exec-br_table","anchors":["exec-br_table"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/br_table","Step_pure/br_table-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_table"},{"id":"exec-br_on_null","anchors":["exec-br_on_null"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/br_on_null","Step_pure/br_on_null-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_null"},{"id":"exec-br_on_non_null","anchors":["exec-br_on_non_null"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/br_on_non_null","Step_pure/br_on_non_null-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_non_null"},{"id":"exec-br_on_cast","anchors":["exec-br_on_cast"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/br_on_cast","Step_read/br_on_cast-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_cast"},{"id":"exec-br_on_cast_fail","anchors":["exec-br_on_cast_fail"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/br_on_cast_fail","Step_read/br_on_cast_fail-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-br_on_cast_fail"},{"id":"exec-return","anchors":["exec-return"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/return","Step_pure/return-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return"},{"id":"exec-call","anchors":["exec-call"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/call"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call"},{"id":"exec-call_ref","anchors":["exec-call_ref"],"title":":math:`\\CALLREF~x`","level":3,"path":"exec/instructions","prose":"1. Assert: due to validation, a null or function reference is on the top of the stack.\n\n2. Pop the reference value r from the stack.\n\n3. If r is \\REFNULL~\\X{ht}, then:\n\n a. Trap.\n\n4. Assert: due to validation, r is a function reference.\n\n5. Let \\REFFUNCADDR~a be the reference r.\n\n6. Invoke the function instance at address a.\n\n The formal rule for calling a non-null function reference is described below.","crossrefs":["valid-call_ref","syntax-ref","exec-invoke"],"formal_refs":["Step_read/call_ref-null"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call_ref"},{"id":"exec-call_indirect","anchors":["exec-call_indirect"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/call_indirect"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-call_indirect"},{"id":"exec-return_call","anchors":["exec-return_call"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/return_call"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call"},{"id":"exec-return_call_ref","anchors":["exec-return_call_ref"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/return_call_ref","Step_read/return_call_ref-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call_ref"},{"id":"exec-return_call_indirect","anchors":["exec-return_call_indirect"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/return_call_indirect"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-return_call_indirect"},{"id":"exec-throw","anchors":["exec-throw"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/throw"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-throw"},{"id":"exec-throw_ref","anchors":["exec-throw_ref"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/throw_ref","Step_read/throw_ref-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-throw_ref"},{"id":"exec-try_table","anchors":["exec-try_table"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/try_table"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-try_table"},{"id":"exec-instrs","anchors":["exec-instrs"],"title":"Blocks","level":2,"path":"exec/instructions","prose":"The following auxiliary rules define the semantics of executing an instruction sequence\nthat forms a block.","crossrefs":["syntax-instrs","exec-instr-control"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instrs"},{"id":"exec-instrs-enter","anchors":["exec-instrs-enter"],"title":"Entering :math:`\\instr^\\ast` with label :math:`L` and values :math:`\\val^\\ast`","level":3,"path":"exec/instructions","prose":"1. Push L to the stack.\n\n2. Push the values \\val^\\ast to the stack.\n\n3. Jump to the start of the instruction sequence \\instr^\\ast.\n\n No formal reduction rule is needed for entering an instruction sequence,\n because the label L is embedded in the administrative instruction that structured control instructions reduce to directly.","crossrefs":["syntax-instr-admin"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instrs-enter"},{"id":"exec-instrs-exit","anchors":["exec-instrs-exit"],"title":"Exiting :math:`\\instr^\\ast` with label :math:`L`","level":3,"path":"exec/instructions","prose":"When the end of a block is reached without a jump, exception, or trap aborting it, then the following steps are performed.\n\n1. Pop all values \\val^\\ast from the top of the stack.\n\n2. Assert: due to validation, the label L is now on the top of the stack.\n\n3. Pop the label from the stack.\n\n4. Push \\val^\\ast back to the stack.\n\n5. Jump to the position after the end of the structured control instruction associated with the label L.\n\n This semantics also applies to the instruction sequence contained in a LOOP instruction.\n Therefore, execution of a loop falls off the end, unless a backwards branch is performed explicitly.","crossrefs":["exception","trap","valid-instrs","syntax-instr-control"],"formal_refs":["Step_pure/label-vals","LOOP"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instrs-exit"},{"id":"exec-handler","anchors":["exec-handler"],"title":"Exception Handling","level":2,"path":"exec/instructions","prose":"The following auxiliary rules define the semantics of entering and exiting TRY_TABLE blocks.","crossrefs":[],"formal_refs":["TRY_TABLE"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-handler"},{"id":"exec-handler-enter","anchors":["exec-handler-enter"],"title":"Entering :math:`\\instr^\\ast` with label :math:`L` and exception handler :math:`H`","level":3,"path":"exec/instructions","prose":"1. Push H to the stack.\n\n2. Push L onto the stack.\n\n3. Jump to the start of the instruction sequence \\instr^\\ast.\n\n No formal reduction rule is needed for entering an exception handler\n because it is an administrative instruction\n that the TRY_TABLE instruction reduces to directly.","crossrefs":["syntax-handler","syntax-instr-admin"],"formal_refs":["TRY_TABLE"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-handler-enter"},{"id":"exec-handler-exit","anchors":["exec-handler-exit"],"title":"Exiting an exception handler","level":3,"path":"exec/instructions","prose":"When the end of a TRY_TABLE block is reached without a jump, exception, or trap, then the following steps are performed.\n\n1. Let m be the number of values on the top of the stack.\n\n2. Pop the values \\val^m from the stack.\n\n3. Assert: due to validation, a handler and a label are now on the top of the stack.\n\n4. Pop the label from the stack.\n\n5. Pop the handler H from the stack.\n\n6. Push \\val^m back to the stack.\n\n7. Jump to the position after the end of the administrative instruction associated with the handler H.","crossrefs":["exception","trap","valid-instrs"],"formal_refs":["Step_pure/handler-vals","TRY_TABLE"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-handler-exit"},{"id":"exec/instructions-function-calls","anchors":[],"title":"Function Calls","level":2,"path":"exec/instructions","prose":"The following auxiliary rules define the semantics of invoking a function instance\nthrough one of the call instructions\nand returning from it.","crossrefs":["syntax-funcinst","exec-instr-control"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html"},{"id":"exec-invoke","anchors":["exec-invoke"],"title":"Invocation of :ref:`function reference <syntax-ref.func>` :math:`(\\REFFUNCADDR~a)`","level":3,"path":"exec/instructions","prose":"1. Assert: due to validation, S.\\SFUNCS[a] exists.\n\n2. Let f be the function instance, S.\\SFUNCS[a].\n\n3. Let \\TFUNC~[t_1^n] \\Tarrow [t_2^m] be the composite type \\expanddt(\\X{f}.\\FITYPE).\n\n4. Let \\FUNC~x~\\local^\\ast~\\instr^\\ast be the function f.\\FICODE.\n\n5. Assert: due to validation, n values are on the top of the stack.\n\n6. Pop the values \\val^n from the stack.\n\n7. Let F be the frame \\{ \\AMODULE~F.\\FIMODULE, \\ALOCALS~\\val^n~(\\default_t)^\\ast \\}.\n\n8. Push the activation of f with arity m to the stack.\n\n9. Let L be the label whose arity is m and whose continuation is the end of the function.\n\n10. Enter the instruction sequence \\instr^\\ast with label L and no values.\n\n For non-defaultable types, the respective local is left uninitialized by these rules.","crossrefs":["valid-call","syntax-funcinst","syntax-comptype","syntax-func","syntax-frame","syntax-label","exec-instrs-enter"],"formal_refs":["Step_read/call_ref-func"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-invoke"},{"id":"exec-invoke-exit","anchors":["exec-invoke-exit"],"title":"Returning from a function","level":3,"path":"exec/instructions","prose":"When the end of a function is reached without a jump (including through RETURN), or an exception or trap aborting it, then the following steps are performed.\n\n1. Let F be the current frame.\n\n2. Let n be the arity of the activation of F.\n\n3. Assert: due to validation, there are n values on the top of the stack.\n\n4. Pop the results \\val^n from the stack.\n\n5. Assert: due to validation, the frame F is now on the top of the stack.\n\n6. Pop the frame from the stack.\n\n7. Push \\val^n back to the stack.\n\n8. Jump to the instruction after the original call.","crossrefs":["exception","trap","exec-notation-textual","syntax-frame","valid-instrs","valid-func"],"formal_refs":["Step_pure/frame-vals"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-invoke-exit"},{"id":"exec-invoke-host","anchors":["exec-invoke-host"],"title":"Host Functions","level":3,"path":"exec/instructions","prose":"Invoking a host function has non-deterministic behavior.\nIt may either terminate with a trap, an exception, or return regularly.\nHowever, in the latter case, it must consume and produce the right number and types of WebAssembly values on the stack,\naccording to its function type.\n\nA host function may also modify the store.\nHowever, all store modifications must result in an extension of the original store, i.e., they must only modify mutable contents and must not have instances removed.\nFurthermore, the resulting store must be valid, i.e., all data and code in it is well-typed.\n\nHere, \\X{hf}(S; \\val^n) denotes the implementation-defined execution of host function \\X{hf} in current store S with arguments \\val^n.\nIt yields a set of possible outcomes, where each element is either a pair of a modified store S' and a result\nor the special value \\bot indicating divergence.\nA host function is non-deterministic if there is at least one argument for which the set of outcomes is not singular.\n\nFor a WebAssembly implementation to be sound in the presence of host functions,\nevery host function instance must be valid,\nwhich means that it adheres to suitable pre- and post-conditions:\nunder a valid store S, and given arguments \\val^n matching the ascribed parameter types t_1^n,\nexecuting the host function must yield a non-empty set of possible outcomes each of which is either divergence or consists of a valid store S' that is an extension of S and a result matching the ascribed return types t_2^m.\nAll these notions are made precise in the Appendix.\n\n A host function can call back into WebAssembly by invoking a function exported from a module.\n However, the effects of any such call are subsumed by the non-deterministic behavior allowed for the host function.","crossrefs":["syntax-hostfunc","trap","exception","syntax-val","syntax-functype","syntax-store","extend-store","valid-store","syntax-result","soundness","syntax-funcinst","valid-hostfuncinst","exec-invocation","syntax-export","syntax-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-invoke-host"},{"id":"exec-instr-variable","anchors":["exec-instr-variable"],"title":"Variable Instructions","level":2,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-variable"},{"id":"exec-local.get","anchors":["exec-local.get"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/local.get"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.get"},{"id":"exec-local.set","anchors":["exec-local.set"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/local.set"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.set"},{"id":"exec-local.tee","anchors":["exec-local.tee"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/local.tee"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-local.tee"},{"id":"exec-global.get","anchors":["exec-global.get"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/global.get"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-global.get"},{"id":"exec-global.set","anchors":["exec-global.set"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/global.set"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-global.set"},{"id":"exec-instr-table","anchors":["exec-instr-table"],"title":"Table Instructions","level":2,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-table"},{"id":"exec-table.get","anchors":["exec-table.get"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/table.get","Step_read/table.get-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.get"},{"id":"exec-table.set","anchors":["exec-table.set"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/table.set","Step/table.set-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.set"},{"id":"exec-table.size","anchors":["exec-table.size"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/table.size"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.size"},{"id":"exec-table.grow","anchors":["exec-table.grow"],"title":null,"level":0,"path":"exec/instructions","prose":"The TABLEGROW instruction is non-deterministic.\n It may either succeed, returning the old table size \\X{sz},\n or fail, returning {-1}.\n Failure must occur if the referenced table instance has a maximum size defined that would be exceeded.\n However, failure can occur in other cases as well.\n In practice, the choice depends on the resources available to the embedder.","crossrefs":["impl-exec","embedder"],"formal_refs":["Step/table.grow","Step/table.grow-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.grow"},{"id":"exec-table.fill","anchors":["exec-table.fill"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/table.fill","Step_read/table.fill-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.fill"},{"id":"exec-table.copy","anchors":["exec-table.copy"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/table.copy","Step_read/table.copy-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.copy"},{"id":"exec-table.init","anchors":["exec-table.init"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/table.init","Step_read/table.init-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-table.init"},{"id":"exec-elem.drop","anchors":["exec-elem.drop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/elem.drop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-elem.drop"},{"id":"exec-memarg","anchors":["exec-memarg","exec-instr-memory"],"title":"Memory Instructions","level":2,"path":"exec/instructions","prose":"The alignment \\memarg.\\ALIGN in load and store instructions does not affect the semantics.\n It is a hint that the offset \\X{ea} at which the memory is accessed is intended to satisfy the property \\X{ea} \\mod 2^{\\memarg.\\ALIGN} = 0.\n A WebAssembly implementation can use this hint to optimize for the intended use.\n Unaligned access violating that property is still allowed and must succeed regardless of the annotation.\n However, it may be substantially slower on some hardware.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memarg"},{"id":"exec-load-val","anchors":["exec-load-val","exec-load-pack","exec-vload-val"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/load","Step_read/load-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-load-val"},{"id":"exec-vload-pack","anchors":["exec-vload-pack"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/vload-pack-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-pack"},{"id":"exec-vload-splat","anchors":["exec-vload-splat"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/vload-splat-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-splat"},{"id":"exec-vload-zero","anchors":["exec-vload-zero"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/vload-zero-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload-zero"},{"id":"exec-vload_lane","anchors":["exec-vload_lane"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/vload_lane","Step_read/vload_lane-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vload_lane"},{"id":"exec-store-val","anchors":["exec-store-val","exec-store-pack","exec-vstore"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/store","Step/store-*","Step/vstore-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-store-val"},{"id":"exec-vstore_lane","anchors":["exec-vstore_lane"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/vstore_lane","Step/vstore_lane-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vstore_lane"},{"id":"exec-memory.size","anchors":["exec-memory.size"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/memory.size"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.size"},{"id":"exec-memory.grow","anchors":["exec-memory.grow"],"title":null,"level":0,"path":"exec/instructions","prose":"The MEMORYGROW instruction is non-deterministic.\n It may either succeed, returning the old memory size \\X{sz},\n or fail, returning {-1}.\n Failure must occur if the referenced memory instance has a maximum size defined that would be exceeded.\n However, failure can occur in other cases as well.\n In practice, the choice depends on the resources available to the embedder.","crossrefs":["impl-exec","embedder"],"formal_refs":["Step/memory.grow","Step/memory.grow-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.grow"},{"id":"exec-memory.fill","anchors":["exec-memory.fill"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/memory.fill","Step_read/memory.fill-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.fill"},{"id":"exec-memory.copy","anchors":["exec-memory.copy"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/memory.copy","Step_read/memory.copy-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.copy"},{"id":"exec-memory.init","anchors":["exec-memory.init"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/memory.init","Step_read/memory.init-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-memory.init"},{"id":"exec-data.drop","anchors":["exec-data.drop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/data.drop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-data.drop"},{"id":"exec-instr-ref","anchors":["exec-instr-ref"],"title":"Reference Instructions","level":2,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-ref"},{"id":"exec-ref.null","anchors":["exec-ref.null"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/ref.null"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.null"},{"id":"exec-ref.func","anchors":["exec-ref.func"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/ref.func"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.func"},{"id":"exec-ref.is_null","anchors":["exec-ref.is_null"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/ref.is_null","Step_pure/ref.is_null-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.is_null"},{"id":"exec-ref.as_non_null","anchors":["exec-ref.as_non_null"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/ref.as_non_null","Step_pure/ref.as_non_null-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.as_non_null"},{"id":"exec-ref.eq","anchors":["exec-ref.eq"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/ref.eq","Step_pure/ref.eq-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.eq"},{"id":"exec-ref.test","anchors":["exec-ref.test"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/ref.test","Step_read/ref.test-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.test"},{"id":"exec-ref.cast","anchors":["exec-ref.cast"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/ref.cast","Step_read/ref.cast-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.cast"},{"id":"exec-ref.i31","anchors":["exec-ref.i31"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/ref.i31"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-ref.i31"},{"id":"exec-i31.get","anchors":["exec-i31.get"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/i31.get","Step_pure/i31.get-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-i31.get"},{"id":"exec-struct.new","anchors":["exec-struct.new"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/struct.new"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.new"},{"id":"exec-struct.new_default","anchors":["exec-struct.new_default"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/struct.new_default"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.new_default"},{"id":"exec-struct.get","anchors":["exec-struct.get","exec-struct.get_sx"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/struct.get","Step_read/struct.get-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.get"},{"id":"exec-struct.set","anchors":["exec-struct.set"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/struct.set","Step/struct.set-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-struct.set"},{"id":"exec-array.new","anchors":["exec-array.new"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/array.new"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new"},{"id":"exec-array.new_default","anchors":["exec-array.new_default"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.new_default"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_default"},{"id":"exec-array.new_fixed","anchors":["exec-array.new_fixed"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/array.new_fixed"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_fixed"},{"id":"exec-array.new_data","anchors":["exec-array.new_data"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.new_data","Step_read/array.new_data-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_data"},{"id":"exec-array.new_elem","anchors":["exec-array.new_elem"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.new_elem","Step_read/array.new_elem-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.new_elem"},{"id":"exec-array.get","anchors":["exec-array.get","exec-array.get_sx"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.get","Step_read/array.get-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.get"},{"id":"exec-array.set","anchors":["exec-array.set"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step/array.set","Step/array.set-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.set"},{"id":"exec-array.len","anchors":["exec-array.len"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.len","Step_read/array.len-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.len"},{"id":"exec-array.fill","anchors":["exec-array.fill"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.fill","Step_read/array.fill-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.fill"},{"id":"exec-array.copy","anchors":["exec-array.copy"],"title":null,"level":0,"path":"exec/instructions","prose":"Where:","crossrefs":[],"formal_refs":["Step_read/array.copy","Step_read/array.copy-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.copy"},{"id":"aux-sx","anchors":["aux-sx"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["sx"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#aux-sx"},{"id":"exec-array.init_data","anchors":["exec-array.init_data"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.init_data","Step_read/array.init_data-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.init_data"},{"id":"exec-array.init_elem","anchors":["exec-array.init_elem"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_read/array.init_elem","Step_read/array.init_elem-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-array.init_elem"},{"id":"exec-any.convert_extern","anchors":["exec-any.convert_extern"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/any.convert_extern","Step_pure/any.convert_extern-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-any.convert_extern"},{"id":"exec-extern.convert_any","anchors":["exec-extern.convert_any"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/extern.convert_any","Step_pure/extern.convert_any-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-extern.convert_any"},{"id":"exec-instr-numeric","anchors":["exec-instr-numeric"],"title":"Numeric Instructions","level":2,"path":"exec/instructions","prose":"Numeric instructions are defined in terms of the generic numeric operators.\nThe mapping of numeric instructions to their underlying operators is expressed by the following definition:\n\nAnd for conversion operators:\n\nWhere the underlying operators are partial, the corresponding instruction will trap when the result is not defined.\nWhere the underlying operators are non-deterministic, because they may return one of multiple possible NaN values, so are the corresponding instructions.\n\n For example, the result of instruction \\I32.\\ADD applied to operands i_1, i_2\n invokes \\ADD_{\\I32}(i_1, i_2),\n which maps to the generic \\iadd_{32}(i_1, i_2) via the above definition.\n Similarly, \\I64.\\TRUNC\\K{\\_}\\F32\\K{\\_s} applied to z\n invokes \\TRUNC^{\\K{s}}_{\\F32,\\I64}(z),\n which maps to the generic \\truncs_{32,64}(z).","crossrefs":["exec-numeric","exec-cvtop","trap","syntax-nan"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-numeric"},{"id":"exec-const","anchors":["exec-const"],"title":":math:`\\X{nt}\\K{.}\\CONST~c`","level":3,"path":"exec/instructions","prose":"1. Push the value (CONST nt c) to the stack.\n\n No formal reduction rule is required for this instruction, since CONST instructions already are values.","crossrefs":["syntax-val"],"formal_refs":["(CONST","nt","c)","CONST"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-const"},{"id":"exec-unop","anchors":["exec-unop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/unop","Step_pure/unop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-unop"},{"id":"exec-binop","anchors":["exec-binop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/binop","Step_pure/binop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-binop"},{"id":"exec-testop","anchors":["exec-testop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/testop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-testop"},{"id":"exec-relop","anchors":["exec-relop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/relop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-relop"},{"id":"exec-cvtop","anchors":["exec-cvtop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/cvtop","Step_pure/cvtop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-cvtop"},{"id":"exec-instr-vec","anchors":["exec-instr-vec"],"title":"Vector Instructions","level":2,"path":"exec/instructions","prose":"Vector instructions that operate bitwise are handled as integer operations of respective bit width.\n\nMost other vector instructions are defined in terms of numeric operators that are applied lane-wise according to the given shape.\n\n For example, the result of instruction \\K{i32x4}.\\ADD applied to operands v_1, v_2\n invokes \\ADD_{\\K{i32x4}}(v_1, v_2), which maps to\n \\lanes^{-1}_{\\K{i32x4}}(\\ADD_{\\I32}(i_1, i_2)^\\ast),\n where i_1^\\ast and i_2^\\ast are sequences resulting from invoking\n \\lanes_{\\K{i32x4}}(v_1) and \\lanes_{\\K{i32x4}}(v_2)\n respectively.\n\nFor non-deterministic operators this definition is generalized to sets:\n\nwhere {\\Large\\times} \\{x^\\ast\\}^N transforms a sequence of N sets of values into a set of sequences of N values by computing the set product:\n\nThe remaining vector operators use individual definitions.","crossrefs":["exec-numeric","syntax-shape","op-vec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-instr-vec"},{"id":"exec-vconst","anchors":["exec-vconst"],"title":":math:`\\V128\\K{.}\\VCONST~c`","level":3,"path":"exec/instructions","prose":"1. Push the value (VCONST V128 c) to the stack.\n\n No formal reduction rule is required for this instruction, since CONST instructions are already values.","crossrefs":["syntax-val"],"formal_refs":["(VCONST","V128","c)","CONST"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vconst"},{"id":"exec-vvunop","anchors":["exec-vvunop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vvunop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvunop"},{"id":"exec-vvbinop","anchors":["exec-vvbinop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vvbinop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvbinop"},{"id":"exec-vvternop","anchors":["exec-vvternop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vvternop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvternop"},{"id":"exec-vvtestop","anchors":["exec-vvtestop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vvtestop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vvtestop"},{"id":"exec-vunop","anchors":["exec-vunop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vunop","Step_pure/vunop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vunop"},{"id":"exec-vbinop","anchors":["exec-vbinop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vbinop","Step_pure/vbinop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbinop"},{"id":"exec-vternop","anchors":["exec-vternop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vternop","Step_pure/vternop-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vternop"},{"id":"exec-vtestop","anchors":["exec-vtestop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vtestop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vtestop"},{"id":"exec-vrelop","anchors":["exec-vrelop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vrelop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vrelop"},{"id":"exec-vshiftop","anchors":["exec-vshiftop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vshiftop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshiftop"},{"id":"exec-vbitmask","anchors":["exec-vbitmask"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vbitmask"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vbitmask"},{"id":"exec-vswizzlop","anchors":["exec-vswizzlop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vswizzlop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vswizzlop"},{"id":"exec-vshuffle","anchors":["exec-vshuffle"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vshuffle"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vshuffle"},{"id":"exec-vsplat","anchors":["exec-vsplat"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vsplat"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vsplat"},{"id":"exec-vextract_lane","anchors":["exec-vextract_lane"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vextract_lane","Step_pure/vextract_lane-*"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextract_lane"},{"id":"exec-vreplace_lane","anchors":["exec-vreplace_lane"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vreplace_lane"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vreplace_lane"},{"id":"exec-vextunop","anchors":["exec-vextunop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vextunop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextunop"},{"id":"exec-vextbinop","anchors":["exec-vextbinop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vextbinop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextbinop"},{"id":"exec-vextternop","anchors":["exec-vextternop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vextternop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vextternop"},{"id":"exec-vnarrow","anchors":["exec-vnarrow"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vnarrow"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vnarrow"},{"id":"exec-vcvtop","anchors":["exec-vcvtop"],"title":null,"level":0,"path":"exec/instructions","prose":"","crossrefs":[],"formal_refs":["Step_pure/vcvtop"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-vcvtop"},{"id":"exec-expr","anchors":["exec-expr"],"title":"Expressions","level":2,"path":"exec/instructions","prose":"An expression is evaluated relative to a current frame pointing to its containing module instance.\n\n Evaluation iterates this reduction rule until reaching a value.\n Expressions constituting function bodies are executed during function invocation.","crossrefs":["syntax-expr","exec-notation-textual","syntax-frame","syntax-moduleinst","syntax-func","exec-invoke"],"formal_refs":["Eval_expr"],"url":"https://webassembly.github.io/spec/core/exec/instructions.html#exec-expr"},{"id":"exec/modules-modules","anchors":[],"title":"Modules","level":1,"path":"exec/modules","prose":"For modules, the execution semantics primarily defines instantiation, which allocates instances for a module and its contained definitions, initializes memories and tables from contained data and element segments, and invokes the start function if present. It also includes invocation of exported functions.","crossrefs":["exec-instantiation","alloc","syntax-mem","syntax-table","syntax-data","syntax-elem","syntax-start","exec-invocation"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/modules.html"},{"id":"alloc","anchors":["alloc"],"title":"Allocation","level":2,"path":"exec/modules","prose":"New instances of\ntags,\nglobals,\nmemories,\ntables,\nfunctions,\ndata segments, and\nelement segments\nare allocated in a store s, as defined by the following auxiliary functions.","crossrefs":["syntax-taginst","syntax-globalinst","syntax-meminst","syntax-tableinst","syntax-funcinst","syntax-datainst","syntax-eleminst","syntax-store"],"formal_refs":["s"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc"},{"id":"alloc-tag","anchors":["alloc-tag"],"title":":ref:`Tags <syntax-taginst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["alloctag"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-tag"},{"id":"alloc-global","anchors":["alloc-global"],"title":":ref:`Globals <syntax-globalinst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["allocglobal"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-global"},{"id":"alloc-mem","anchors":["alloc-mem"],"title":":ref:`Memories <syntax-meminst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["allocmem"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-mem"},{"id":"alloc-table","anchors":["alloc-table"],"title":":ref:`Tables <syntax-tableinst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["alloctable"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-table"},{"id":"alloc-func","anchors":["alloc-func"],"title":":ref:`Functions <syntax-funcinst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["allocfunc"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-func"},{"id":"alloc-data","anchors":["alloc-data"],"title":":ref:`Data segments <syntax-datainst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["allocdata"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-data"},{"id":"alloc-elem","anchors":["alloc-elem"],"title":":ref:`Element segments <syntax-eleminst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["allocelem"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-elem"},{"id":"grow-mem","anchors":["grow-mem"],"title":"Growing :ref:`memories <syntax-meminst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["growmem"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#grow-mem"},{"id":"grow-table","anchors":["grow-table"],"title":"Growing :ref:`tables <syntax-tableinst>`","level":3,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["growtable"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#grow-table"},{"id":"alloc-module","anchors":["alloc-module"],"title":":ref:`Modules <syntax-moduleinst>`","level":3,"path":"exec/modules","prose":"Here, the notation \\F{allocx}^\\ast is shorthand for multiple allocations of object kind X, defined as follows:\n\nFor types, however, allocation is defined in terms of rolling and substitution of all preceding types to produce a list of closed defined types:","crossrefs":["alloc","aux-roll-rectype","notation-subst","type-closed","syntax-deftype"],"formal_refs":["allocmodule","allocXs","alloctags","allocglobals","allocmems","alloctables","allocfuncs","allocdatas","allocelems"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-module"},{"id":"alloc-type","anchors":["alloc-type"],"title":null,"level":0,"path":"exec/modules","prose":"Finally, export instances are produced with the help of the following definition:","crossrefs":[],"formal_refs":["alloctypes"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-type"},{"id":"alloc-export","anchors":["alloc-export"],"title":null,"level":0,"path":"exec/modules","prose":"The definition of module allocation is mutually recursive with the allocation of its associated functions, because the resulting module instance is passed to the allocators as an argument, in order to form the necessary closures.\n In an implementation, this recursion is easily unraveled by mutating one or the other in a secondary step.","crossrefs":[],"formal_refs":["allocexports","allocexport"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#alloc-export"},{"id":"exec-module","anchors":["exec-module","exec-instantiation"],"title":"Instantiation","level":2,"path":"exec/modules","prose":"Given a store s, a module is instantiated with a list of external addresses externaddr supplying the required imports as follows.\n\nInstantiation checks that the module is valid and the provided imports match the declared types,\nand may fail* with an error otherwise.\nInstantiation can also result in an exception or trap when initializing a table or memory from an active segment or when executing the start function.\nIt is up to the embedder to define how such conditions are reported.","crossrefs":["syntax-store","syntax-externaddr","valid","match-externtype","exception","trap","syntax-table","syntax-mem","syntax-data","syntax-start","embedder"],"formal_refs":["s","module","externaddr*"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#exec-module"},{"id":"exec-initvals","anchors":["exec-initvals"],"title":null,"level":0,"path":"exec/modules","prose":"where:","crossrefs":[],"formal_refs":["instantiate"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#exec-initvals"},{"id":"eval-exprs","anchors":["eval-exprs"],"title":null,"level":0,"path":"exec/modules","prose":"and:","crossrefs":[],"formal_refs":["evalexprs"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#eval-exprs"},{"id":"eval-globals","anchors":["eval-globals"],"title":null,"level":0,"path":"exec/modules","prose":"","crossrefs":[],"formal_refs":["evalglobals"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#eval-globals"},{"id":"aux-rundata","anchors":["aux-rundata","aux-runelem"],"title":null,"level":0,"path":"exec/modules","prose":"Checking import types assumes that the module instance has already been allocated to compute the respective closed defined types.\n However, this forward reference merely is a way to simplify the specification.\n In practice, implementations will likely allocate or canonicalize types beforehand, when compiling a module, in a stage before instantiation and before imports are checked.\n\n Similarly, module allocation and the evaluation of global and table initializers as well as element segments are mutually recursive because the global initialization values val_G, ref_T, and element segment contents ref_E* are passed to the module allocator while depending on the module instance moduleinst and store s' returned by allocation.\n Again, this recursion is just a specification device.\n In practice, the initialization values can be determined beforehand by staging module allocation such that first, the module's own function instances are pre-allocated in the store, then the initializer expressions are evaluated in order, allocating globals on the way, then the rest of the module instance is allocated, and finally the new function instances' MODULE fields are set to that module instance.\n This is possible because validation ensures that initialization expressions cannot actually call a function, only take their reference.\n\n All failure conditions are checked before any observable mutation of the store takes place.\n Store mutation is not atomic;\n it happens in individual steps that may be interleaved with other threads.\n\n Evaluation of constant expressions does not affect the store.","crossrefs":["syntax-moduleinst","alloc-module","type-closed","syntax-deftype","exec-expr","syntax-global","syntax-table","syntax-elem","syntax-val","exec-initvals","syntax-funcinst","valid-module","valid-constant"],"formal_refs":["rundata_","runelem_","val_G*","ref_T","ref_E**","moduleinst","s'","MODULE"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#aux-rundata"},{"id":"exec-invocation","anchors":["exec-invocation"],"title":"Invocation","level":2,"path":"exec/modules","prose":"Once a module has been instantiated, any exported function can be invoked externally via its function address funcaddr in the store s and an appropriate list val of argument values.\n\nInvocation may fail* with an error if the arguments do not fit the function type.\nInvocation can also result in an exception or trap.\nIt is up to the embedder to define how such conditions are reported.\n\n If the embedder API performs type checks itself, either statically or dynamically, before performing an invocation, then no failure other than traps or exceptions can occur.","crossrefs":["syntax-module","exec-instantiation","syntax-funcaddr","syntax-store","syntax-val","syntax-functype","exception","trap","embedder"],"formal_refs":["invoke","funcaddr","s","val*"],"url":"https://webassembly.github.io/spec/core/exec/modules.html#exec-invocation"},{"id":"exec-op-partial","anchors":["exec-op-partial","exec-numeric"],"title":"Numerics","level":1,"path":"exec/numerics","prose":"Numeric primitives are defined in a generic manner, by operators indexed over a bit width N.\n\nSome operators are non-deterministic, because they can return one of several possible results (such as different NaN values).\nTechnically, each operator thus returns a set of allowed values.\nFor convenience, deterministic results are expressed as plain values, which are assumed to be identified with a respective singleton set.\n\nSome operators are partial, because they are not defined on certain inputs.\nTechnically, an empty set of results is returned for these inputs.\n\nIn formal notation, each operator is defined by equational clauses that apply in decreasing order of precedence.\nThat is, the first clause that is applicable to the given arguments defines the result.\nIn some cases, similar clauses are combined into one by using the notation \\pm or \\mp.\nWhen several of these placeholders occur in a single clause, then they must be resolved consistently: either the upper sign is chosen for all of them or the lower sign.\n\n For example, the fcopysign operator is defined as follows:\n\n .. math::\n \\begin{array}{@{}lcll}\n \\fcopysign_N(\\pm p_1, \\pm p_2) &=& \\pm p_1 \\\\\n \\fcopysign_N(\\pm p_1, \\mp p_2) &=& \\mp p_1 \\\\\n \\end{array}\n\n This definition is to be read as a shorthand for the following expansion of each clause into two separate ones:\n\n .. math::\n \\begin{array}{@{}lcll}\n \\fcopysign_N(+ p_1, + p_2) &=& + p_1 \\\\\n \\fcopysign_N(- p_1, - p_2) &=& - p_1 \\\\\n \\fcopysign_N(+ p_1, - p_2) &=& - p_1 \\\\\n \\fcopysign_N(- p_1, + p_2) &=& + p_1 \\\\\n \\end{array}\n\nNumeric operators are lifted to input sequences by applying the operator element-wise, returning a sequence of results. When there are multiple inputs, they must be of equal length.\n\n For example, the unary operator fabs, when given a sequence of floating-point values, return a sequence of floating-point results:\n\n .. math::\n \\begin{array}{lll@{\\qquad}l}\n \\fabs_N(z^n) &=& \\fabs_N(z[0])~\\dots~\\fabs_N(z[n])\n \\end{array}\n\n The binary operator iadd, when given two sequences of integers of the same length, n, return a sequence of integer results:\n\n .. math::\n \\begin{array}{lll@{\\qquad}l}\n \\iadd_N(i_1^n, i_2^n) &=& \\iadd_N(i_1[0], i_2[0])~\\dots~\\iadd_N(i_1[n], i_2[n])\n \\end{array}","crossrefs":["syntax-nan"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#exec-op-partial"},{"id":"aux-trunc","anchors":["aux-trunc"],"title":null,"level":0,"path":"exec/numerics","prose":"Conventions:\n\n The meta variable d is used to range over single bits.\n\n The meta variable p is used to range over (signless) magnitudes of floating-point values, including NAN and \\infty.\n\n The meta variable q is used to range over (signless) rational magnitudes, excluding NAN or \\infty.\n\n The notation f^{-1} denotes the inverse of a bijective function f.\n\n* Truncation of rational values is written \\truncz(\\pm q), with the usual mathematical definition:\n\n .. math::\n \\begin{array}{lll@{\\qquad}l}\n \\truncz(\\pm q) &=& \\pm i & (\\iff i \\in \\mathbb{N} \\wedge +q - 1 < i \\leq +q) \\\\\n \\end{array}","crossrefs":["syntax-float"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-trunc"},{"id":"aux-sat","anchors":["aux-sat"],"title":null,"level":0,"path":"exec/numerics","prose":"Saturation of integers is written \\satu_N(i) and \\sats_N(i). The arguments to these two functions range over arbitrary signed integers.\n\n Unsigned saturation, \\satu_N(i) clamps i to between 0 and 2^N-1:\n\n .. math::\n \\begin{array}{lll@{\\qquad}l}\n \\satu_N(i) &=& 0 & (\\iff i < 0) \\\\\n \\satu_N(i) &=& 2^N-1 & (\\iff i > 2^N-1)\\\\\n \\satu_N(i) &=& i & (\\otherwise) \\\\\n \\end{array}\n\n * Signed saturation, \\sats_N(i) clamps i to between -2^{N-1} and 2^{N-1}-1:\n\n .. math::\n \\begin{array}{lll@{\\qquad}l}\n \\sats_N(i) &=& -2^{N-1} & (\\iff i < -2^{N-1})\\\\\n \\sats_N(i) &=& 2^{N-1}-1 & (\\iff i > 2^{N-1}-1)\\\\\n \\sats_N(i) &=& i & (\\otherwise)\n \\end{array}","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-sat"},{"id":"aux-bits","anchors":["aux-bits"],"title":"Representations","level":2,"path":"exec/numerics","prose":"Numbers and numeric vectors have an underlying binary representation as a sequence of bits:\n\nThe first case of these applies to representations of both integer value types and packed types.\n\nEach of these functions is a bijection, hence they are invertible.","crossrefs":["syntax-valtype","syntax-packtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-bits"},{"id":"aux-ibits","anchors":["aux-ibits"],"title":"Integers","level":3,"path":"exec/numerics","prose":"Integers are represented as base two unsigned numbers:\n\nBoolean operators like \\wedge, \\vee, or \\veebar are lifted to bit sequences of equal length by applying them pointwise.","crossrefs":["syntax-int"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-ibits"},{"id":"aux-fbias","anchors":["aux-fbias","aux-fsign","aux-fbits"],"title":"Floating-Point","level":3,"path":"exec/numerics","prose":"Floating-point values are represented in the respective binary format defined by IEEE754 (Section 3.4):\n\nwhere M = \\signif(N) and E = \\expon(N).","crossrefs":["syntax-float"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-fbias"},{"id":"aux-lanes","anchors":["aux-lanes","aux-packnum","aux-unpacknum","syntax-i128"],"title":"Vectors","level":3,"path":"exec/numerics","prose":"Numeric vectors of type VN have the same underlying representation as an IN.\nThey can also be interpreted as a sequence of numeric values packed into a VN with a particular shape t\\K{x}M,\nprovided that N = t\\cdot M.\n\nThis function is a bijection on IN, hence it is invertible.\n\nNumeric values can be packed into lanes of a specific lane type and vice versa:","crossrefs":["syntax-lanetype"],"formal_refs":["lpacknum_","lunpacknum_"],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-lanes"},{"id":"aux-littleendian","anchors":["aux-littleendian","aux-bytes"],"title":"Storage","level":3,"path":"exec/numerics","prose":"When a number is stored into memory, it is converted into a sequence of bytes in LittleEndian byte order:\n\nAgain these functions are invertible bijections.","crossrefs":["syntax-mem","syntax-byte"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-littleendian"},{"id":"int-ops","anchors":["int-ops"],"title":"Integer Operations","level":2,"path":"exec/numerics","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#int-ops"},{"id":"aux-signed","anchors":["aux-signed"],"title":"Sign Interpretation","level":3,"path":"exec/numerics","prose":"Integer operators are defined on iN values.\nOperators that use a signed interpretation convert the value using the following definition, which takes the two's complement when the value lies in the upper half of the value range (i.e., its most significant bit is 1):\n\nThis function is bijective, and hence invertible.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-signed"},{"id":"aux-tobool","anchors":["aux-tobool"],"title":"Boolean Interpretation","level":3,"path":"exec/numerics","prose":"The integer result of predicates -- i.e., tests and relational operators -- is defined with the help of the following auxiliary function producing the value 1 or 0 depending on a condition.","crossrefs":["syntax-testop","syntax-relop"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-tobool"},{"id":"op-iadd","anchors":["op-iadd"],"title":":math:`\\iadd_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the result of adding i_1 and i_2 modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iadd"},{"id":"op-isub","anchors":["op-isub"],"title":":math:`\\isub_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the result of subtracting i_2 from i_1 modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-isub"},{"id":"op-imul","anchors":["op-imul"],"title":":math:`\\imul_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the result of multiplying i_1 and i_2 modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-imul"},{"id":"op-idiv","anchors":["op-idiv"],"title":":math:`\\idivu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"If i_2 is 0, then the result is undefined.\n\n Else, return the result of dividing i_1 by i_2, truncated toward zero.\n\n This operator is partial.","crossrefs":["exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-idiv"},{"id":"exec/numerics-math-idivs-n-i-1-i-2","anchors":[],"title":":math:`\\idivs_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n If j_2 is 0, then the result is undefined.\n\n Else if j_1 divided by j_2 is 2^{N-1}, then the result is undefined.\n\n* Else, return the result of dividing j_1 by j_2, truncated toward zero.\n\n This operator is partial.\n Besides division by 0, the result of (-2^{N-1})/(-1) = +2^{N-1} is not representable as an N-bit signed integer.","crossrefs":["aux-signed","exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-irem","anchors":["op-irem"],"title":":math:`\\iremu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"If i_2 is 0, then the result is undefined.\n\n Else, return the remainder of dividing i_1 by i_2.\n\n This operator is partial.\n\n As long as both operators are defined,\n it holds that i_1 = i_2\\cdot\\idivu(i_1, i_2) + \\iremu(i_1, i_2).","crossrefs":["exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irem"},{"id":"exec/numerics-math-irems-n-i-1-i-2","anchors":[],"title":":math:`\\irems_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n If i_2 is 0, then the result is undefined.\n\n Else, return the remainder of dividing j_1 by j_2, with the sign of the dividend j_1.\n\n This operator is partial.\n\n As long as both operators are defined,\n it holds that i_1 = i_2\\cdot\\idivs(i_1, i_2) + \\irems(i_1, i_2).","crossrefs":["aux-signed","exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-inot","anchors":["op-inot"],"title":":math:`\\inot_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise negation of i.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-inot"},{"id":"op-irev","anchors":["op-irev"],"title":":math:`\\irev_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise reversal of i.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irev"},{"id":"op-iand","anchors":["op-iand"],"title":":math:`\\iand_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise conjunction of i_1 and i_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iand"},{"id":"op-iandnot","anchors":["op-iandnot"],"title":":math:`\\iandnot_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise conjunction of i_1 and the bitwise negation of i_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iandnot"},{"id":"op-ior","anchors":["op-ior"],"title":":math:`\\ior_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise disjunction of i_1 and i_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ior"},{"id":"op-ixor","anchors":["op-ixor"],"title":":math:`\\ixor_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the bitwise exclusive disjunction of i_1 and i_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ixor"},{"id":"op-ishl","anchors":["op-ishl"],"title":":math:`\\ishl_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let k be i_2 modulo N.\n\n Return the result of shifting i_1 left by k bits, modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ishl"},{"id":"op-ishr","anchors":["op-ishr"],"title":":math:`\\ishru_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let k be i_2 modulo N.\n\n Return the result of shifting i_1 right by k bits, extended with 0 bits.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ishr"},{"id":"exec/numerics-math-ishrs-n-i-1-i-2","anchors":[],"title":":math:`\\ishrs_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let k be i_2 modulo N.\n\n Return the result of shifting i_1 right by k bits, extended with the most significant bit of the original value.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-irotl","anchors":["op-irotl"],"title":":math:`\\irotl_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let k be i_2 modulo N.\n\n Return the result of rotating i_1 left by k bits.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irotl"},{"id":"op-irotr","anchors":["op-irotr"],"title":":math:`\\irotr_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let k be i_2 modulo N.\n\n Return the result of rotating i_1 right by k bits.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irotr"},{"id":"op-iclz","anchors":["op-iclz"],"title":":math:`\\iclz_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the count of leading zero bits in i; all bits are considered leading zeros if i is 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iclz"},{"id":"op-ictz","anchors":["op-ictz"],"title":":math:`\\ictz_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the count of trailing zero bits in i; all bits are considered trailing zeros if i is 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ictz"},{"id":"op-ipopcnt","anchors":["op-ipopcnt"],"title":":math:`\\ipopcnt_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the count of non-zero bits in i.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ipopcnt"},{"id":"op-ieqz","anchors":["op-ieqz"],"title":":math:`\\ieqz_N(i)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i is zero, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ieqz"},{"id":"op-inez","anchors":["op-inez"],"title":":math:`\\inez_N(i)`","level":3,"path":"exec/numerics","prose":"* Return 0 if i is zero, 1 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-inez"},{"id":"op-ieq","anchors":["op-ieq"],"title":":math:`\\ieq_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 equals i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ieq"},{"id":"op-ine","anchors":["op-ine"],"title":":math:`\\ine_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 does not equal i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ine"},{"id":"op-ilt","anchors":["op-ilt"],"title":":math:`\\iltu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 is less than i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ilt"},{"id":"exec/numerics-math-ilts-n-i-1-i-2","anchors":[],"title":":math:`\\ilts_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n* Return 1 if j_1 is less than j_2, 0 otherwise.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-igt","anchors":["op-igt"],"title":":math:`\\igtu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 is greater than i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-igt"},{"id":"exec/numerics-math-igts-n-i-1-i-2","anchors":[],"title":":math:`\\igts_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n* Return 1 if j_1 is greater than j_2, 0 otherwise.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-ile","anchors":["op-ile"],"title":":math:`\\ileu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 is less than or equal to i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ile"},{"id":"exec/numerics-math-iles-n-i-1-i-2","anchors":[],"title":":math:`\\iles_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n* Return 1 if j_1 is less than or equal to j_2, 0 otherwise.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-ige","anchors":["op-ige"],"title":":math:`\\igeu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return 1 if i_1 is greater than or equal to i_2, 0 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ige"},{"id":"exec/numerics-math-iges-n-i-1-i-2","anchors":[],"title":":math:`\\iges_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1.\n\n Let j_2 be the signed interpretation of i_2.\n\n* Return 1 if j_1 is greater than or equal to j_2, 0 otherwise.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-iextendn","anchors":["op-iextendn"],"title":":math:`\\iextendMs_N(i)`","level":3,"path":"exec/numerics","prose":"Let j be the result of computing \\wrap_{N,M}(i).\n\n Return \\extends_{M,N}(j).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iextendn"},{"id":"op-ibitselect","anchors":["op-ibitselect"],"title":":math:`\\ibitselect_N(i_1, i_2, i_3)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the bitwise conjunction of i_1 and i_3.\n\n Let j_3' be the bitwise negation of i_3.\n\n Let j_2 be the bitwise conjunction of i_2 and j_3'.\n\n Return the bitwise disjunction of j_1 and j_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ibitselect"},{"id":"op-iabs","anchors":["op-iabs"],"title":":math:`\\iabs_N(i)`","level":3,"path":"exec/numerics","prose":"Let j be the signed interpretation of i.\n\n If j is greater than or equal to 0, then return i.\n\n* Else return the negation of `j`, modulo 2^N.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iabs"},{"id":"op-ineg","anchors":["op-ineg"],"title":":math:`\\ineg_N(i)`","level":3,"path":"exec/numerics","prose":"* Return the result of negating i, modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ineg"},{"id":"op-imin","anchors":["op-imin"],"title":":math:`\\iminu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return i_1 if \\iltu_N(i_1, i_2) is 1, return i_2 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-imin"},{"id":"exec/numerics-math-imins-n-i-1-i-2","anchors":[],"title":":math:`\\imins_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return i_1 if \\ilts_N(i_1, i_2) is 1, return i_2 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-imax","anchors":["op-imax"],"title":":math:`\\imaxu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return i_1 if \\igtu_N(i_1, i_2) is 1, return i_2 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-imax"},{"id":"exec/numerics-math-imaxs-n-i-1-i-2","anchors":[],"title":":math:`\\imaxs_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return i_1 if \\igts_N(i_1, i_2) is 1, return i_2 otherwise.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-iadd_sat","anchors":["op-iadd_sat"],"title":":math:`\\iaddsatu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let i be the result of adding i_1 and i_2.\n\n Return \\satu_N(i).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iadd_sat"},{"id":"exec/numerics-math-iaddsats-n-i-1-i-2","anchors":[],"title":":math:`\\iaddsats_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1\n\n Let j_2 be the signed interpretation of i_2\n\n Let j be the result of adding j_1 and j_2.\n\n Return the value whose signed interpretation is \\sats_N(j).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-isub_sat","anchors":["op-isub_sat"],"title":":math:`\\isubsatu_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let i be the result of subtracting i_2 from i_1.\n\n Return \\satu_N(i).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-isub_sat"},{"id":"exec/numerics-math-isubsats-n-i-1-i-2","anchors":[],"title":":math:`\\isubsats_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j_1 be the signed interpretation of i_1\n\n Let j_2 be the signed interpretation of i_2\n\n Let j be the result of subtracting j_2 from j_1.\n\n Return the value whose signed interpretation is \\sats_N(j).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-iavgr","anchors":["op-iavgr"],"title":":math:`\\iavgru_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"Let j be the result of adding i_1, i_2, and 1.\n\n Return the result of dividing j by 2, truncated toward zero.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iavgr"},{"id":"op-iq15mulrsat","anchors":["op-iq15mulrsat"],"title":":math:`\\iq15mulrsats_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"* Return the whose signed interpretation is the result of \\sats_N(\\ishrs_N(i_1 \\cdot i_2 + 2^{14}, 15)).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-iq15mulrsat"},{"id":"float-ops","anchors":["float-ops"],"title":"Floating-Point Operations","level":2,"path":"exec/numerics","prose":"Floating-point arithmetic follows the IEEE754 standard,\nwith the following qualifications:\n\n All operators use round-to-nearest ties-to-even, except where otherwise specified.\n Non-default directed rounding attributes are not supported.\n\n Following the recommendation that operators propagate NaN payloads from their operands is permitted but not required.\n\n* All operators use \"non-stop\" mode, and floating-point exceptions are not otherwise observable.\n In particular, neither alternate floating-point exception handling attributes nor operators on status flags are supported.\n There is no observable difference between quiet and signalling NaNs.\n\n Some of these limitations may be lifted in future versions of WebAssembly.","crossrefs":["syntax-nan"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#float-ops"},{"id":"aux-ieee","anchors":["aux-ieee"],"title":"Rounding","level":3,"path":"exec/numerics","prose":"Rounding always is round-to-nearest ties-to-even, in correspondence with IEEE754 (Section 4.3.1).\n\nAn exact floating-point number is a rational number that is exactly representable as a floating-point number of given bit width N.\n\nA limit number for a given floating-point bit width N is a positive or negative number whose magnitude is the smallest power of 2 that is not exactly representable as a floating-point number of width N (that magnitude is 2^{128} for N = 32 and 2^{1024} for N = 64).\n\nA candidate number is either an exact floating-point number or a positive or negative limit number for the given bit width N.\n\nA candidate pair is a pair z_1,z_2 of candidate numbers, such that no candidate number exists that lies between the two.\n\nA real number r is converted to a floating-point value of bit width N as follows:\n\n If r is 0, then return +0.\n\n Else if r is an exact floating-point number, then return r.\n\n Else if r greater than or equal to the positive limit, then return +\\infty.\n\n Else if r is less than or equal to the negative limit, then return -\\infty.\n\n Else if z_1 and z_2 are a candidate pair such that z_1 < r < z_2, then:\n\n If |r - z_1| < |r - z_2|, then let z be z_1.\n\n Else if |r - z_1| > |r - z_2|, then let z be z_2.\n\n Else if |r - z_1| = |r - z_2| and the significand of z_1 is even, then let z be z_1.\n\n Else, let z be z_2.\n\n If z is 0, then:\n\n If r < 0, then return -0.\n\n Else, return +0.\n\n Else if z is a limit number, then:\n\n If r < 0, then return -\\infty.\n\n Else, return +\\infty.\n\n Else, return z.\n\nwhere:","crossrefs":["syntax-float"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-ieee"},{"id":"aux-nans","anchors":["aux-nans"],"title":"NaN Propagation","level":3,"path":"exec/numerics","prose":"When the result of a floating-point operator other than fneg, fabs, or fcopysign is a NaN,\nthen its sign is non-deterministic and the payload is computed as follows:\n\n If the payload of all NaN inputs to the operator is canonical (including the case that there are no NaN inputs), then the payload of the output is canonical as well.\n\n Otherwise the payload is picked non-deterministically among all arithmetic NaNs; that is, its most significant bit is 1 and all others are unspecified.\n\n* In the deterministic profile, however, a positive canonical NaNs is reliably produced in the latter case.\n\nThe non-deterministic result is expressed by the following auxiliary function producing a set of allowed outputs from a set of inputs:","crossrefs":["syntax-nan","syntax-payload","canonical-nan","arithmetic-nan","profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#aux-nans"},{"id":"op-fadd","anchors":["op-fadd"],"title":":math:`\\fadd_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if both z_1 and z_2 are infinities of opposite signs, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 and z_2 are infinities of equal sign, then return that infinity.\n\n Else if either z_1 or z_2 is an infinity, then return that infinity.\n\n Else if both z_1 and z_2 are zeroes of opposite sign, then return positive zero.\n\n Else if both z_1 and z_2 are zeroes of equal sign, then return that zero.\n\n Else if either z_1 or z_2 is a zero, then return the other operand.\n\n Else if both z_1 and z_2 are values with the same magnitude but opposite signs, then return positive zero.\n\n* Else return the result of adding z_1 and z_2, rounded to the nearest representable value.","crossrefs":["aux-ieee"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fadd"},{"id":"op-fsub","anchors":["op-fsub"],"title":":math:`\\fsub_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if both z_1 and z_2 are infinities of equal signs, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 and z_2 are infinities of opposite sign, then return z_1.\n\n Else if z_1 is an infinity, then return that infinity.\n\n Else if z_2 is an infinity, then return that infinity negated.\n\n Else if both z_1 and z_2 are zeroes of equal sign, then return positive zero.\n\n Else if both z_1 and z_2 are zeroes of opposite sign, then return z_1.\n\n Else if z_2 is a zero, then return z_1.\n\n Else if z_1 is a zero, then return z_2 negated.\n\n Else if both z_1 and z_2 are the same value, then return positive zero.\n\n* Else return the result of subtracting z_2 from z_1, rounded to the nearest representable value.\n\n Up to the non-determinism regarding NaNs, it always holds that \\fsub_N(z_1, z_2) = \\fadd_N(z_1, \\fneg_N(z_2)).","crossrefs":["aux-ieee"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fsub"},{"id":"op-fmul","anchors":["op-fmul"],"title":":math:`\\fmul_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if one of z_1 and z_2 is a zero and the other an infinity, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 and z_2 are infinities of equal sign, then return positive infinity.\n\n Else if both z_1 and z_2 are infinities of opposite sign, then return negative infinity.\n\n Else if either z_1 or z_2 is an infinity and the other a value with equal sign, then return positive infinity.\n\n Else if either z_1 or z_2 is an infinity and the other a value with opposite sign, then return negative infinity.\n\n Else if both z_1 and z_2 are zeroes of equal sign, then return positive zero.\n\n Else if both z_1 and z_2 are zeroes of opposite sign, then return negative zero.\n\n* Else return the result of multiplying z_1 and z_2, rounded to the nearest representable value.","crossrefs":["aux-ieee"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fmul"},{"id":"op-fdiv","anchors":["op-fdiv"],"title":":math:`\\fdiv_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if both z_1 and z_2 are infinities, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 and z_2 are zeroes, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if z_1 is an infinity and z_2 a value with equal sign, then return positive infinity.\n\n Else if z_1 is an infinity and z_2 a value with opposite sign, then return negative infinity.\n\n Else if z_2 is an infinity and z_1 a value with equal sign, then return positive zero.\n\n Else if z_2 is an infinity and z_1 a value with opposite sign, then return negative zero.\n\n Else if z_1 is a zero and z_2 a value with equal sign, then return positive zero.\n\n Else if z_1 is a zero and z_2 a value with opposite sign, then return negative zero.\n\n Else if z_2 is a zero and z_1 a value with equal sign, then return positive infinity.\n\n Else if z_2 is a zero and z_1 a value with opposite sign, then return negative infinity.\n\n Else return the result of dividing z_1 by z_2, rounded to the nearest representable value.","crossrefs":["aux-ieee"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fdiv"},{"id":"op-fma","anchors":["op-fma"],"title":":math:`\\fma_N(z_1, z_2, z_3)`","level":3,"path":"exec/numerics","prose":"The function \\fma is the same as fusedMultiplyAdd defined by IEEE754 (Section 5.4.1).\nIt computes (z_1 \\cdot z_2) + z_3 as if with unbounded range and precision, rounding only once for the final result.\n\n If either z_1 or z_2 or z_3 is a NaN, return an element of \\nans_N{z_1, z_2, z_3}.\n\n Else if either z_1 or z_2 is a zero and the other is an infinity, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 or z_2 are infinities of equal sign, and z_3 is a negative infinity, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 or z_2 are infinities of opposite sign, and z_3 is a positive infinity, then return an element of \\nans_N\\{\\}.\n\n Else if either z_1 or z_2 is an infinity and the other is a value of the same sign, and z_3 is a negative infinity, then return an element of \\nans_N\\{\\}.\n\n Else if either z_1 or z_2 is an infinity and the other is a value of the opposite sign, and z_3 is a positive infinity, then return an element of \\nans_N\\{\\}.\n\n Else if both z_1 and z_2 are zeroes of the same sign and z_3 is a zero, then return positive zero.\n\n Else if both z_1 and z_2 are zeroes of the opposite sign and z_3 is a positive zero, then return positive zero.\n\n Else if both z_1 and z_2 are zeroes of the opposite sign and z_3 is a negative zero, then return negative zero.\n\n Else return the result of multiplying z_1 and z_2, adding z_3 to the intermediate, and the final result ref:`rounded <aux-ieee>` to the nearest representable value.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fma"},{"id":"op-fmin","anchors":["op-fmin"],"title":":math:`\\fmin_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if either z_1 or z_2 is a negative infinity, then return negative infinity.\n\n Else if either z_1 or z_2 is a positive infinity, then return the other value.\n\n Else if both z_1 and z_2 are zeroes of opposite signs, then return negative zero.\n\n* Else return the smaller value of z_1 and z_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fmin"},{"id":"op-fmax","anchors":["op-fmax"],"title":":math:`\\fmax_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return an element of \\nans_N\\{z_1, z_2\\}.\n\n Else if either z_1 or z_2 is a positive infinity, then return positive infinity.\n\n Else if either z_1 or z_2 is a negative infinity, then return the other value.\n\n Else if both z_1 and z_2 are zeroes of opposite signs, then return positive zero.\n\n* Else return the larger value of z_1 and z_2.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fmax"},{"id":"op-fcopysign","anchors":["op-fcopysign"],"title":":math:`\\fcopysign_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If z_1 and z_2 have the same sign, then return z_1.\n\n Else return z_1 with negated sign.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fcopysign"},{"id":"op-fabs","anchors":["op-fabs"],"title":":math:`\\fabs_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return z with positive sign.\n\n Else if z is an infinity, then return positive infinity.\n\n Else if z is a zero, then return positive zero.\n\n Else if z is a positive value, then z.\n\n* Else return z negated.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fabs"},{"id":"op-fneg","anchors":["op-fneg"],"title":":math:`\\fneg_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return z with negated sign.\n\n Else if z is an infinity, then return that infinity negated.\n\n Else if z is a zero, then return that zero negated.\n\n Else return z negated.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fneg"},{"id":"op-fsqrt","anchors":["op-fsqrt"],"title":":math:`\\fsqrt_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return an element of \\nans_N\\{z\\}.\n\n Else if z is negative infinity, then return an element of \\nans_N\\{\\}.\n\n Else if z is positive infinity, then return positive infinity.\n\n Else if z is a zero, then return that zero.\n\n Else if z has a negative sign, then return an element of \\nans_N\\{\\}.\n\n Else return the square root of z.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fsqrt"},{"id":"op-fceil","anchors":["op-fceil"],"title":":math:`\\fceil_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return an element of \\nans_N\\{z\\}.\n\n Else if z is an infinity, then return z.\n\n Else if z is a zero, then return z.\n\n Else if z is smaller than 0 but greater than -1, then return negative zero.\n\n* Else return the smallest integral value that is not smaller than z.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fceil"},{"id":"op-ffloor","anchors":["op-ffloor"],"title":":math:`\\ffloor_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return an element of \\nans_N\\{z\\}.\n\n Else if z is an infinity, then return z.\n\n Else if z is a zero, then return z.\n\n Else if z is greater than 0 but smaller than 1, then return positive zero.\n\n* Else return the largest integral value that is not larger than z.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ffloor"},{"id":"op-ftrunc","anchors":["op-ftrunc"],"title":":math:`\\ftrunc_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return an element of \\nans_N\\{z\\}.\n\n Else if z is an infinity, then return z.\n\n Else if z is a zero, then return z.\n\n Else if z is greater than 0 but smaller than 1, then return positive zero.\n\n Else if z is smaller than 0 but greater than -1, then return negative zero.\n\n Else return the integral value with the same sign as z and the largest magnitude that is not larger than the magnitude of z.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ftrunc"},{"id":"op-fnearest","anchors":["op-fnearest"],"title":":math:`\\fnearest_N(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return an element of \\nans_N\\{z\\}.\n\n Else if z is an infinity, then return z.\n\n Else if z is a zero, then return z.\n\n Else if z is greater than 0 but smaller than or equal to 0.5, then return positive zero.\n\n Else if z is smaller than 0 but greater than or equal to -0.5, then return negative zero.\n\n Else return the integral value that is nearest to z; if two values are equally near, return the even one.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fnearest"},{"id":"op-feq","anchors":["op-feq"],"title":":math:`\\feq_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 0.\n\n Else if both z_1 and z_2 are zeroes, then return 1.\n\n Else if both z_1 and z_2 are the same value, then return 1.\n\n Else return 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-feq"},{"id":"op-fne","anchors":["op-fne"],"title":":math:`\\fne_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 1.\n\n Else if both z_1 and z_2 are zeroes, then return 0.\n\n Else if both z_1 and z_2 are the same value, then return 0.\n\n Else return 1.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fne"},{"id":"op-flt","anchors":["op-flt"],"title":":math:`\\flt_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 0.\n\n Else if z_1 and z_2 are the same value, then return 0.\n\n Else if z_1 is positive infinity, then return 0.\n\n Else if z_1 is negative infinity, then return 1.\n\n Else if z_2 is positive infinity, then return 1.\n\n Else if z_2 is negative infinity, then return 0.\n\n Else if both z_1 and z_2 are zeroes, then return 0.\n\n Else if z_1 is smaller than z_2, then return 1.\n\n* Else return 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-flt"},{"id":"op-fgt","anchors":["op-fgt"],"title":":math:`\\fgt_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 0.\n\n Else if z_1 and z_2 are the same value, then return 0.\n\n Else if z_1 is positive infinity, then return 1.\n\n Else if z_1 is negative infinity, then return 0.\n\n Else if z_2 is positive infinity, then return 0.\n\n Else if z_2 is negative infinity, then return 1.\n\n Else if both z_1 and z_2 are zeroes, then return 0.\n\n Else if z_1 is larger than z_2, then return 1.\n\n* Else return 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fgt"},{"id":"op-fle","anchors":["op-fle"],"title":":math:`\\fle_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 0.\n\n Else if z_1 and z_2 are the same value, then return 1.\n\n Else if z_1 is positive infinity, then return 0.\n\n Else if z_1 is negative infinity, then return 1.\n\n Else if z_2 is positive infinity, then return 1.\n\n Else if z_2 is negative infinity, then return 0.\n\n Else if both z_1 and z_2 are zeroes, then return 1.\n\n Else if z_1 is smaller than or equal to z_2, then return 1.\n\n* Else return 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fle"},{"id":"op-fge","anchors":["op-fge"],"title":":math:`\\fge_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If either z_1 or z_2 is a NaN, then return 0.\n\n Else if z_1 and z_2 are the same value, then return 1.\n\n Else if z_1 is positive infinity, then return 1.\n\n Else if z_1 is negative infinity, then return 0.\n\n Else if z_2 is positive infinity, then return 0.\n\n Else if z_2 is negative infinity, then return 1.\n\n Else if both z_1 and z_2 are zeroes, then return 1.\n\n Else if z_1 is larger than or equal to z_2, then return 1.\n\n* Else return 0.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fge"},{"id":"op-fpmin","anchors":["op-fpmin"],"title":":math:`\\fpmin_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If z_2 is less than z_1 then return z_2.\n\n Else return z_1.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fpmin"},{"id":"op-fpmax","anchors":["op-fpmax"],"title":":math:`\\fpmax_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"If z_1 is less than z_2 then return z_2.\n\n Else return z_1.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-fpmax"},{"id":"convert-ops","anchors":["convert-ops"],"title":"Conversions","level":2,"path":"exec/numerics","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#convert-ops"},{"id":"op-extend","anchors":["op-extend"],"title":":math:`\\extendu_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"* Return i.\n\n In the abstract syntax, unsigned extension just reinterprets the same value.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-extend"},{"id":"exec/numerics-math-extends-m-n-i","anchors":[],"title":":math:`\\extends_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"Let j be the signed interpretation of i of size M.\n\n Return the two's complement of j relative to size N.","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-wrap","anchors":["op-wrap"],"title":":math:`\\wrap_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"* Return i modulo 2^N.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-wrap"},{"id":"op-trunc","anchors":["op-trunc"],"title":":math:`\\truncu_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then the result is undefined. \n\n Else if z is an infinity, then the result is undefined. \n\n Else if z is a number and \\truncz(z) is a value within range of the target type, then return that value.\n\n Else the result is undefined.\n\n This operator is partial.\n It is not defined for NaNs, infinities, or values for which the result is out of range.","crossrefs":["exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-trunc"},{"id":"exec/numerics-math-truncs-m-n-z","anchors":[],"title":":math:`\\truncs_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then the result is undefined. \n\n Else if z is an infinity, then the result is undefined. \n\n If z is a number and \\truncz(z) is a value within range of the target type, then return that value.\n\n Else the result is undefined.\n\n This operator is partial.\n It is not defined for NaNs, infinities, or values for which the result is out of range.","crossrefs":["exec-op-partial"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-trunc_sat","anchors":["op-trunc_sat"],"title":":math:`\\truncsatu_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return 0.\n\n Else if z is negative infinity, then return 0.\n\n Else if z is positive infinity, then return 2^N - 1.\n\n Else, return \\satu_N(\\truncz(z)).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-trunc_sat"},{"id":"exec/numerics-math-truncsats-m-n-z","anchors":[],"title":":math:`\\truncsats_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a NaN, then return 0.\n\n Else if z is negative infinity, then return -2^{N-1}.\n\n Else if z is positive infinity, then return 2^{N-1} - 1.\n\n Else, return the value whose signed interpretation is \\sats_N(\\trunc(z)).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-promote","anchors":["op-promote"],"title":":math:`\\promote_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a canonical NaN, then return an element of \\nans_N\\{\\} (i.e., a canonical NaN of size N).\n\n Else if z is a NaN, then return an element of \\nans_N\\{\\pm \\NAN(1)\\} (i.e., any arithmetic NaN of size N).\n\n* Else, return z.","crossrefs":["canonical-nan","arithmetic-nan"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-promote"},{"id":"op-demote","anchors":["op-demote"],"title":":math:`\\demote_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"If z is a canonical NaN, then return an element of \\nans_N\\{\\} (i.e., a canonical NaN of size N).\n\n Else if z is a NaN, then return an element of \\nans_N\\{\\pm \\NAN(1)\\} (i.e., any NaN of size N).\n\n Else if z is an infinity, then return that infinity.\n\n Else if z is a zero, then return that zero.\n\n* Else, return \\ieee_N(z).","crossrefs":["canonical-nan"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-demote"},{"id":"op-convert","anchors":["op-convert"],"title":":math:`\\convertu_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"* Return \\ieee_N(i).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-convert"},{"id":"exec/numerics-math-converts-m-n-i","anchors":[],"title":":math:`\\converts_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"Let j be the signed interpretation of i.\n\n Return \\ieee_N(j).","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-reinterpret","anchors":["op-reinterpret"],"title":":math:`\\reinterpret_{t_1,t_2}(c)`","level":3,"path":"exec/numerics","prose":"Let d^\\ast be the bit sequence \\bits_{t_1}(c).\n\n Return the constant c' for which \\bits_{t_2}(c') = d^\\ast.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-reinterpret"},{"id":"op-narrow","anchors":["op-narrow"],"title":":math:`\\narrows_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"Let j be the signed interpretation of i of size M.\n\n Return the value whose signed interpretation is \\sats_N(j).","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-narrow"},{"id":"exec/numerics-math-narrowu-m-n-i","anchors":[],"title":":math:`\\narrowu_{M,N}(i)`","level":3,"path":"exec/numerics","prose":"Let j be the signed interpretation of i of size M.\n\n Return \\satu_N(j).","crossrefs":["aux-signed"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html"},{"id":"op-vec","anchors":["op-vec"],"title":"Vector Operations","level":2,"path":"exec/numerics","prose":"Most vector operations are performed by applying numeric operations lanewise.\nHowever, some operators consider multiple lanes at once.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vec"},{"id":"op-ivbitmask","anchors":["op-ivbitmask"],"title":":math:`\\ivbitmask_N(i^m)`","level":3,"path":"exec/numerics","prose":"1. For each i_k in i^m, let b_k be the result of computing \\ilts_N(i, 0).\n\n2. Let b^m be the concatenation of all b_k.\n\n3. Return the result of computing \\ibits_{32}^{-1}((0)^{32-m}~b^m).","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivbitmask"},{"id":"op-ivswizzle","anchors":["op-ivswizzle","op-ivswizzle_lane"],"title":":math:`\\ivswizzle(i^n, j^n)`","level":3,"path":"exec/numerics","prose":"1. For each j_k in j^n, let r_k be the value \\ivswizzlelane(i^n, j_k).\n\n2. Let r^n be the concatenation of all r_k.\n\n3. Return r^n.\n\nwhere:","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivswizzle"},{"id":"op-ivshuffle","anchors":["op-ivshuffle"],"title":":math:`\\ivshuffle(j^n, i_1^n, i_2^n)`","level":3,"path":"exec/numerics","prose":"1. Let i^\\ast ne the concatenation of i_1^n and i_2^n.\n\n2. For each j_k in j^n, let r_k be i^\\ast[j_k].\n\n3. Let r^n be the concatenation of all r_k.\n\n4. Return r^n.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivshuffle"},{"id":"op-ivadd_pairwise","anchors":["op-ivadd_pairwise"],"title":":math:`\\ivaddpairwise_N(i^{2m})`","level":3,"path":"exec/numerics","prose":"1. Let (i_1~i_2)^m be i^{2m}, decomposed into pairwise elements.\n\n2. For each i_{1k} in i_1^m and corresponding i_{2k} in i_2^m, let r_k be \\iadd_N(i_{1k}, i_{2k}).\n\n3. Let r^m be the concatenation of all r_k.\n\n4. Return r^m.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivadd_pairwise"},{"id":"op-ivmul","anchors":["op-ivmul"],"title":":math:`\\ivmul_N(i_1^m, i_2^m)`","level":3,"path":"exec/numerics","prose":"1. For each i_{1k} in i_1^m and corresponding i_{2k} in i_2^m, let r_k be \\imul_N(i_{1k}, i_{2k}).\n\n2. Let r^m be the concatenation of all r_k.\n\n3. Return r^m.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivmul"},{"id":"op-ivdot","anchors":["op-ivdot"],"title":":math:`\\ivdot_N(i_1^{2m}, i_2^{2m})`","level":3,"path":"exec/numerics","prose":"1. For each i_{1k} in i_1^{2m} and corresponding i_{2k} in i_2^{2m}, let j_k be \\imul_N(i_{1k}, i_{2k}).\n\n2. Let j^{2m} be the concatenation of all j_k.\n\n3. Let (j_1~j_2)^m be j^{2m}, decomposed into pairwise elements.\n\n4. For each i_{1k} in i_1^m and corresponding i_{2k} in i_2^m, let r_k be \\iadd_N(i_{1k}, i_{2k}).\n\n5. Let r^m be the concatenation of all r_k.\n\n6. Return r^m.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivdot"},{"id":"op-ivdot_sat","anchors":["op-ivdot_sat"],"title":":math:`\\ivdotsat_N(i_1^m, i_2^m)`","level":3,"path":"exec/numerics","prose":"1. For each i_{1k} in i_1^{2m} and corresponding i_{2k} in i_2^{2m}, let j_k be \\imul_N(i_{1k}, i_{2k}).\n\n2. Let j^{2m} be the concatenation of all j_k.\n\n3. Let (j_1~j_2)^m be j^{2m}, decomposed into pairwise elements.\n\n4. For each i_{1k} in i_1^m and corresponding i_{2k} in i_2^m, let r_k be \\iaddsat_N(i_{1k}, i_{2k}).\n\n5. Let r^m be the concatenation of all r_k.\n\n6. Return r^m.\n\nThe previous operators are lifted to operators on arguments of vector type by wrapping them in corresponding lane projections and injections and intermediate extension operations:","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivdot_sat"},{"id":"op-vextunop","anchors":["op-vextunop"],"title":":math:`\\vextunop_{\\X{sh}_1, \\X{sh}_2}(c)`","level":3,"path":"exec/numerics","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vextunop"},{"id":"op-vextbinop","anchors":["op-vextbinop"],"title":":math:`\\vextbinop_{\\X{sh}_1, \\X{sh}_2}(c_1, c_2)`","level":3,"path":"exec/numerics","prose":"where f, \\sx_1, \\sx_2, h, and k are instantiated as follows, depending on the operator:\n\n Relaxed operations and the paramater R_{\\F{idot}} are introduced below.","crossrefs":["relaxed-ops"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vextbinop"},{"id":"op-vextternop","anchors":["op-vextternop"],"title":":math:`\\vextternop_{\\X{sh}_1, \\X{sh}_2}(c_1, c_2, c_3)`","level":3,"path":"exec/numerics","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vextternop"},{"id":"op-vnarrow","anchors":["op-vnarrow"],"title":":math:`\\VNARROW{\\K\\_}\\sx_{\\X{sh}_1, \\X{sh}_2}(c_1, c_2)`","level":3,"path":"exec/numerics","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vnarrow"},{"id":"op-vcvtop","anchors":["op-vcvtop"],"title":":math:`\\vcvtop{\\K\\_}\\half^?{\\K\\_}\\zero^?_{\\X{sh}_1, \\X{sh}_2}(i)`","level":3,"path":"exec/numerics","prose":"where h, k, n, and \\X{condition} are instantiated as follows, depending on the operator:\n\nwhile \\Large\\times \\{x^\\ast\\}^N transforms a sequence of N sets of non-deterministic values into a set of non-deterministic sequences of N values by computing the set product:","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-vcvtop"},{"id":"relaxed-ops","anchors":["relaxed-ops","aux-relaxed"],"title":"Relaxed Operations","level":2,"path":"exec/numerics","prose":"The result of relaxed operators are implementation-dependent, because the set of possible results may depend on properties of the host environment, such as its hardware.\nTechnically, their behaviour is controlled by a set of global parameters to the semantics that an implementation can instantiate in different ways.\nThese choices are fixed, that is, parameters are constant during the execution of any given program.\n\nEvery such parameter is an index into a sequence of possible sets of results and must be instantiated to a defined index.\nIn the deterministic profile, every parameter is prescribed to be 0.\nThis behaviour is expressed by the following auxiliary function,\nwhere R is a global parameter selecting one of the allowed outcomes:\n\n Each parameter can be thought of as inducing a family of operations\n that is fixed to one particular choice by an implementation.\n The fixed operation itself can still be non-deterministic or partial.\n\n Implementations are expexted to either choose the behaviour that is the most efficient on the underlying hardware,\n or the behaviour of the deterministic profile.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#relaxed-ops"},{"id":"op-frelaxed_madd","anchors":["op-frelaxed_madd"],"title":":math:`\\frelaxedmadd_N(z_1, z_2, z_3)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{fmadd}} \\in \\{0, 1\\}.\n\n* Return \\relaxed(R_{\\F{fmadd}})[\\fadd_N(\\fmul_N(z_1, z_2), z_3), \\fma_N(z_1, z_2, z_3)].\n\n Relaxed multiply-add allows for fused or unfused results,\n which leads to implementation-dependent rounding behaviour.\n In the deterministic profile,\n the unfused behaviour is used.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-frelaxed_madd"},{"id":"op-frelaxed_nmadd","anchors":["op-frelaxed_nmadd"],"title":":math:`\\frelaxednmadd_N(z_1, z_2, z_3)`","level":3,"path":"exec/numerics","prose":"* Return \\frelaxedmadd(-z_1, z_2, z_3).\n\n This operation is implementation-dependent because \\frelaxedmadd is implementation-dependent.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-frelaxed_nmadd"},{"id":"op-frelaxed_min","anchors":["op-frelaxed_min"],"title":":math:`\\frelaxedmin_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{fmin}} \\in \\{0, 1, 2, 3\\}.\n\n If z_1 is a NaN, then return \\relaxed(R_{\\F{fmin}})[ \\fmin_N(z_1, z_2), \\NAN(n), z_2, z_2 ].\n\n If z_2 is a NaN, then return \\relaxed(R_{\\F{fmin}})[ \\fmin_N(z_1, z_2), z_1, \\NAN(n), z_1 ].\n\n If both z_1 and z_2 are zeroes of opposite sign, then return \\relaxed(R_{\\F{fmin}})[ \\fmin_N(z_1, z_2), \\pm 0, \\mp 0, -0 ]`.\n\n Return \\fmin_N(z_1, z_2).\n\n Relaxed minimum is implementation-dependent for NaNs and for zeroes with different signs.\n In the deterministic profile,\n it behaves like regular \\fmin.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-frelaxed_min"},{"id":"op-frelaxed_max","anchors":["op-frelaxed_max"],"title":":math:`\\frelaxedmax_N(z_1, z_2)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{fmax}} \\in \\{0, 1, 2, 3\\}.\n\n If z_1 is a NaN, then return \\relaxed(R_{\\F{fmax}})[ \\fmax_N(z_1, z_2), \\NAN(n), z_2, z_2 ].\n\n If z_2 is a NaN, then return \\relaxed(R_{\\F{fmax}})[ \\fmax_N(z_1, z_2), z_1, \\NAN(n), z_1 ].\n\n If both z_1 and z_2 are zeroes of opposite sign, then return \\relaxed(R_{\\F{fmax}})[ \\fmax_N(z_1, z_2), \\pm 0, \\mp 0, +0 ]`.\n\n Return \\fmax_N(z_1, z_2).\n\n Relaxed maximum is implementation-dependent for NaNs and for zeroes with different signs.\n In the deterministic profile,\n it behaves like regular \\fmax.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-frelaxed_max"},{"id":"op-irelaxed_q15mulr_s","anchors":["op-irelaxed_q15mulr_s"],"title":":math:`\\irelaxedq15mulrs_N(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{iq15mulr}} \\in \\{0, 1\\}.\n\n If both i_1 and i_2 equal (\\signed^{-1}_N(-2^{N-1}), then return \\relaxed(R_{\\F{iq15mulr}})[ 2^{N-1}-1, \\signed^{-1}_N(-2^{N-1}) ].\n\n Return \\iq15mulrsats(i_1, i_2)\n\n Relaxed Q15 multiplication is implementation-dependent when the result overflows.\n In the deterministic profile,\n it behaves like regular \\iq15mulrsats.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irelaxed_q15mulr_s"},{"id":"op-relaxed_trunc","anchors":["op-relaxed_trunc","op-relaxed_trunc_u"],"title":":math:`\\relaxedtrunc^u_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{trunc\\_u}} \\in \\{0, 1\\}.\n\n If z is normal or subnormal and \\trunc(z) is non-negative and less than 2^N, then return \\truncu_{M,N}(z).\n\n Else, return \\relaxed(R_{\\F{trunc\\_u}})[ \\truncsatu_{M,N}(z), \\mathbf{R} ].\n\n Relaxed unsigned truncation is non-deterministic for NaNs and out-of-range values.\n In the deterministic profile,\n it behaves like regular \\truncsatu.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-relaxed_trunc"},{"id":"op-relaxed_trunc_s","anchors":["op-relaxed_trunc_s"],"title":":math:`\\relaxedtrunc^s_{M,N}(z)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{trunc\\_s}} \\in \\{0, 1\\}.\n\n If z is normal or subnormal and \\trunc(z) is greater than or equal to -2^{N-1} and less than 2^{N-1}, then return \\truncs_{M,N}(z).\n\n Else, return \\relaxed(R_{\\F{trunc\\_s}})[ \\truncsats_{M,N}(z), \\mathbf{R} ].\n\n Relaxed signed truncation is non-deterministic for NaNs and out-of-range values.\n In the deterministic profile,\n it behaves like regular \\truncsats.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-relaxed_trunc_s"},{"id":"op-ivrelaxed_swizzle","anchors":["op-ivrelaxed_swizzle","op-ivrelaxed_swizzle_lane"],"title":":math:`\\ivrelaxedswizzle(i^n, j^n)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{swizzle}} \\in \\{0, 1\\}.\n\n For each j_k in j^n, let r_k be the value \\ivrelaxedswizzlelane(i^n, j_k).\n\n Let r^n be the concatenation of all r_k.\n\n* Return r^n.\n\nwhere:\n\n Relaxed swizzle is implementation-dependent\n if the signed interpretation of any of the 8-bit indices in j^n is larger than or equal to 16.\n In the deterministic profile,\n it behaves like regular \\ivswizzle.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-ivrelaxed_swizzle"},{"id":"op-irelaxed_dot","anchors":["op-irelaxed_dot","op-irelaxed_dot_add"],"title":":math:`\\VRELAXEDDOT(i_1, i_2)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{idot}} \\in \\{0, 1\\}.\nIt also affects the behaviour of \\VRELAXEDDOTADD.\n\nIts definition is part of the definition of \\vextbinop specified above.\n\n Relaxed dot product is implementation-dependent when the second operand is negative in a signed intepretation.\n In the deterministic profile,\n it behaves like signed dot product.","crossrefs":["op-vextbinop","profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irelaxed_dot"},{"id":"op-irelaxed_laneselect","anchors":["op-irelaxed_laneselect"],"title":":math:`\\irelaxedlaneselect_N(i_1, i_2, i_3)`","level":3,"path":"exec/numerics","prose":"The implementation-specific behaviour of this operation is determined by the global parameter R_{\\F{laneselect}} \\in \\{0, 1\\}.\n\n If i_3 is smaller than 2^{N-1}, then let i'_3 be the value 0, otherwise 2^N-1.\n\n Let i''_3 be \\relaxed(R_{\\F{laneselect}})[i_3, i'_3].\n\n* Return \\ibitselect_N(i_1, i_2, i''_3).\n\n Relaxed lane selection is non-deterministic when the mask mixes set and cleared bits,\n since the value of the high bit may or may not be expanded to all bits.\n In the deterministic profile,\n it behaves like \\ibitselect.","crossrefs":["profile-deterministic"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/numerics.html#op-irelaxed_laneselect"},{"id":"syntax-runtime","anchors":["syntax-runtime"],"title":"Runtime Structure","level":1,"path":"exec/runtime","prose":"Store, stack, and other runtime structure forming the WebAssembly abstract machine, such as values or module instances, are made precise in terms of additional auxiliary syntax.","crossrefs":["store","stack","syntax-val","syntax-moduleinst"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-runtime"},{"id":"syntax-num","anchors":["syntax-num","syntax-vec","syntax-ref","syntax-ref.i31num","syntax-ref.struct","syntax-ref.array","syntax-ref.exn","syntax-ref.host","syntax-ref.extern","syntax-nullref","syntax-val","syntax-pack"],"title":"Values","level":2,"path":"exec/runtime","prose":"WebAssembly computations manipulate values of either the four basic number types, i.e., integers and floating-point data of 32 or 64 bit width each, or vectors of 128 bit width, or of reference type.\n\nIn most places of the semantics, values of different types can occur.\nIn order to avoid ambiguities, values are therefore represented with an abstract syntax that makes their type explicit.\nIt is convenient to reuse the same notation as for the CONST instructions and REF.NULL producing them.\n\nReferences other than null are represented with additional administrative instructions.\nThey either are scalar references, containing a 31-bit integer,\nnull references,\nstructure references, pointing to a specific structure address,\narray references, pointing to a specific array address,\nfunction references, pointing to a specific function address,\nexception references, pointing to a specific exception address,\nor host references pointing to an uninterpreted form of host address defined by the embedder.\nAny of the aformentioned references can furthermore be wrapped up as an external reference.\n\n Future versions of WebAssembly may add additional forms of values.","crossrefs":["syntax-numtype","syntax-int","syntax-float","syntax-vecnum","syntax-reftype","syntax-const","syntax-instr-admin","syntax-structaddr","syntax-arrayaddr","syntax-funcaddr","syntax-exnaddr","syntax-hostaddr","embedder"],"formal_refs":["val","num","vec","ref","CONST","REF.NULL"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-num"},{"id":"aux-default","anchors":["aux-default"],"title":null,"level":0,"path":"exec/runtime","prose":"Value types can have an associated default value;\nit is the respective value for number types, for vector types, and null for nullable reference types.\nFor other references, no default value is defined, $default_(t) hence is an optional value val?.","crossrefs":["syntax-valtype","syntax-numtype","syntax-vectype","syntax-reftype"],"formal_refs":["default_","$default_(t)","val?"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#aux-default"},{"id":"exec/runtime-convention","anchors":[],"title":"Convention","level":3,"path":"exec/runtime","prose":"* The meta variable r ranges over reference values where clear from context.","crossrefs":[],"formal_refs":["r"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"syntax-result","anchors":["syntax-result"],"title":"Results","level":2,"path":"exec/runtime","prose":"A result is the outcome of a computation.\nIt is either a sequence of values, a thrown exception, or a trap.","crossrefs":["syntax-val","exec-throw_ref","syntax-trap"],"formal_refs":["result"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-result"},{"id":"syntax-store","anchors":["syntax-store","store"],"title":"Store","level":2,"path":"exec/runtime","prose":"The store represents all global state that can be manipulated by WebAssembly programs.\nIt consists of the runtime representation of all instances of\nfunctions,\ntables,\nmemories,\nglobals,\ntags,\nelement segments,\ndata segments,\nand\nstructures,\narrays or\nexceptions\nthat have been allocated during the life time of the abstract machine.\n\nIt is an invariant of the semantics that no element or data instance is addressed from anywhere else but the owning module instances.\n\nSyntactically, the store is defined as a record listing the existing instances of each category:\n\n In practice, implementations may apply techniques like garbage collection or reference counting to remove objects from the store that are no longer referenced.\n However, such techniques are not semantically observable,\n and hence outside the scope of this specification.","crossrefs":["syntax-funcinst","syntax-tableinst","syntax-meminst","syntax-globalinst","syntax-taginst","syntax-eleminst","syntax-datainst","syntax-structinst","syntax-arrayinst","syntax-exninst","alloc","syntax-addr","notation-record"],"formal_refs":["store"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-store"},{"id":"exec/runtime-convention","anchors":[],"title":"Convention","level":3,"path":"exec/runtime","prose":"* The meta variable s ranges over stores where clear from context.","crossrefs":[],"formal_refs":["s"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"syntax-funcaddr","anchors":["syntax-funcaddr","syntax-tableaddr","syntax-memaddr","syntax-globaladdr","syntax-tagaddr","syntax-elemaddr","syntax-dataaddr","syntax-structaddr","syntax-arrayaddr","syntax-exnaddr","syntax-hostaddr","syntax-addr"],"title":"Addresses","level":2,"path":"exec/runtime","prose":"Function instances,\ntable instances,\nmemory instances,\nglobal instances,\ntag instances,\nelement instances,\ndata instances\nand\nstructure,\narray or\nexception instances\nin the store are referenced with abstract addresses.\nThese are simply indices into the respective store component.\nIn addition, an embedder may supply an uninterpreted set of host addresses.\n\nAn embedder may assign identity to exported store objects corresponding to their addresses,\neven where this identity is not observable from within WebAssembly code itself\n(such as for function instances or immutable globals).\n\n Addresses are dynamic, globally unique references to runtime objects,\n in contrast to indices,\n which are static, module-local references to their original definitions.\n A memory address memaddr denotes the abstract address of a memory instance in the store,\n not an offset inside a memory instance.\n\n There is no specific limit on the number of allocations of store objects,\n hence logical addresses can be arbitrarily large natural numbers.","crossrefs":["syntax-funcinst","syntax-tableinst","syntax-meminst","syntax-globalinst","syntax-taginst","syntax-eleminst","syntax-datainst","syntax-structinst","syntax-arrayinst","syntax-exninst","syntax-store","embedder","syntax-export","syntax-index"],"formal_refs":["addr","funcaddr","tableaddr","memaddr","globaladdr","tagaddr","elemaddr","dataaddr","structaddr","arrayaddr","exnaddr","hostaddr"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-funcaddr"},{"id":"free-funcaddr","anchors":["free-funcaddr","free-tableaddr","free-memaddr","free-globaladdr","free-tagaddr","free-elemaddr","free-dataaddr","free-structaddr","free-arrayaddr","free-localaddr","free-labeladdr","free-addr"],"title":"Conventions","level":3,"path":"exec/runtime","prose":"* The notation $addr(A) denotes the set of addresses from address space addr occurring free in A. We sometimes reinterpret this set as the list of its elements, without assuming any particular order.","crossrefs":["syntax-list"],"formal_refs":["$addr(A)","addr","A"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#free-funcaddr"},{"id":"syntax-externaddr","anchors":["syntax-externaddr"],"title":"External Addresses","level":2,"path":"exec/runtime","prose":"An external address is the runtime address of an entity that can be imported or exported.\nIt is an address denoting either a\nfunction instance,\nglobal instance,\ntable instance,\nmemory instance, or\ntag instance\nin the shared store.","crossrefs":["syntax-addr","syntax-funcinst","syntax-globalinst","syntax-tableinst","syntax-meminst","syntax-taginst","syntax-store"],"formal_refs":["externaddr"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-externaddr"},{"id":"syntax-moduleinst","anchors":["syntax-moduleinst"],"title":"Module Instances","level":2,"path":"exec/runtime","prose":"A module instance is the runtime representation of a module.\nIt is created by instantiating a module,\nand collects runtime representations of all entities that are imported, defined, or exported by the module.\n\nEach component references runtime instances corresponding to respective declarations from the original module -- whether imported or defined -- in the order of their static indices.\nFunction instances,\ntable instances,\nmemory instances,\nglobal instances, and\ntag instances\nare denoted by their respective addresses in the store.\n\nIt is an invariant of the semantics that all export instances in a given module instance have different names.\n\n All record fields except EXPORTS are to be considered private components of a module instance.\n They are not accessible to other modules,\n only to function instances originating from the same module.","crossrefs":["syntax-module","exec-instantiation","syntax-index","syntax-funcinst","syntax-tableinst","syntax-meminst","syntax-globalinst","syntax-taginst","syntax-addr","syntax-store","syntax-exportinst","syntax-name"],"formal_refs":["moduleinst","EXPORTS"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-moduleinst"},{"id":"syntax-hostfunc","anchors":["syntax-hostfunc","syntax-funcinst"],"title":"Function Instances","level":2,"path":"exec/runtime","prose":"A function instance is the runtime representation of a function.\nIt effectively is a closure of the original function over the runtime module instance of its originating module.\nThe module instance is used to resolve references to other definitions during execution of the function.\n\nA host function is a function expressed outside WebAssembly but passed to a module as an import.\nThe definition and behavior of host functions are outside the scope of this specification.\nFor the purpose of this specification, it is assumed that when invoked,\na host function behaves non-deterministically,\nbut within certain constraints that ensure the integrity of the runtime.\n\n Function instances are immutable, and their identity is not observable by WebAssembly code.\n However, an embedder might provide implicit or explicit means for distinguishing their addresses.","crossrefs":["syntax-func","syntax-moduleinst","syntax-module","syntax-import","exec-invoke-host","embedder","syntax-funcaddr"],"formal_refs":["funcinst","funccode"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc"},{"id":"syntax-tableinst","anchors":["syntax-tableinst"],"title":"Table Instances","level":2,"path":"exec/runtime","prose":"A table instance is the runtime representation of a table.\nIt records its type and holds a sequence of reference values.\n\nTable elements can be mutated through table instructions, the execution of an active element segment, or by external means provided by the embedder.\n\nIt is an invariant of the semantics that all table elements have a type matching the element type of tabletype.\nIt also is an invariant that the length of the element sequence never exceeds the maximum size of tabletype.","crossrefs":["syntax-table","syntax-tabletype","syntax-ref","syntax-instr-table","syntax-elem","embedder","match-reftype"],"formal_refs":["tableinst","tabletype"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-tableinst"},{"id":"page-size","anchors":["page-size","syntax-meminst"],"title":"Memory Instances","level":2,"path":"exec/runtime","prose":"A memory instance is the runtime representation of a linear memory.\nIt records its type and holds a sequence of bytes.\n\nThe length of the sequence always is a multiple of the WebAssembly page size, which is defined to be the constant -- abbreviated $Ki.\n\nA memory's bytes can be mutated through memory instructions, the execution of an active data segment, or by external means provided by the embedder.\n\nIt is an invariant of the semantics that the length of the byte sequence, divided by page size, never exceeds the maximum size of memtype.","crossrefs":["syntax-mem","syntax-memtype","syntax-byte","syntax-instr-memory","syntax-data","embedder"],"formal_refs":["meminst","$Ki","memtype"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#page-size"},{"id":"syntax-globalinst","anchors":["syntax-globalinst"],"title":"Global Instances","level":2,"path":"exec/runtime","prose":"A global instance is the runtime representation of a global variable.\nIt records its type and holds an individual value.\n\nThe value of mutable globals can be mutated through variable instructions or by external means provided by the embedder.\n\nIt is an invariant of the semantics that the value has a type matching the value type of globaltype.","crossrefs":["syntax-global","syntax-globaltype","syntax-val","syntax-instr-variable","embedder","match-valtype","syntax-valtype"],"formal_refs":["globalinst","globaltype"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-globalinst"},{"id":"syntax-taginst","anchors":["syntax-taginst"],"title":"Tag Instances","level":2,"path":"exec/runtime","prose":"A tag instance is the runtime representation of a tag definition.\nIt records the defined type of the tag.","crossrefs":["syntax-tag","syntax-deftype"],"formal_refs":["taginst"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-taginst"},{"id":"syntax-eleminst","anchors":["syntax-eleminst"],"title":"Element Instances","level":2,"path":"exec/runtime","prose":"An element instance is the runtime representation of an element segment.\nIt holds a list of references and its type.\n\nIt is an invariant of the semantics that all elements of a segment have a type matching elemtype.","crossrefs":["syntax-elem","syntax-reftype","match-reftype"],"formal_refs":["eleminst","elemtype"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-eleminst"},{"id":"syntax-datainst","anchors":["syntax-datainst"],"title":"Data Instances","level":2,"path":"exec/runtime","prose":"A data instance is the runtime representation of a data segment.\nIt holds a list of bytes.","crossrefs":["syntax-data","syntax-byte"],"formal_refs":["datainst"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-datainst"},{"id":"syntax-exportinst","anchors":["syntax-exportinst"],"title":"Export Instances","level":2,"path":"exec/runtime","prose":"An export instance is the runtime representation of an export.\nIt defines the export's name and the associated external address.","crossrefs":["syntax-export","syntax-name","syntax-externaddr"],"formal_refs":["exportinst"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-exportinst"},{"id":"exec/runtime-conventions","anchors":[],"title":"Conventions","level":3,"path":"exec/runtime","prose":"The following auxiliary functions are assumed on sequences of external addresses.\nThey extract addresses of a specific kind in an order-preserving fashion:\n\n $funcsxa(xa) extracts all function addresses from xa,\n $tablesxa(xa) extracts all table addresses from xa,\n $memsxa(xa) extracts all memory addresses from xa,\n $globalsxa(xa) extracts all global addresses from xa,\n $tagsxa(xa) extracts all tag addresses from xa*.","crossrefs":["syntax-funcaddr"],"formal_refs":["funcsxa","tablesxa","memsxa","globalsxa","tagsxa","$funcsxa(xa*)","xa*","$tablesxa(xa*)","$memsxa(xa*)","$globalsxa(xa*)","$tagsxa(xa*)"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"syntax-fieldval","anchors":["syntax-fieldval","syntax-packval","syntax-structinst","syntax-arrayinst","syntax-aggrinst"],"title":"Aggregate Instances","level":2,"path":"exec/runtime","prose":"A structure instance is the runtime representation of a heap object allocated from a structure type.\nLikewise, an array instance is the runtime representation of a heap object allocated from an array type.\nBoth record their respective defined type and hold a list of the values of their fields.","crossrefs":["syntax-structtype","syntax-arraytype","syntax-deftype"],"formal_refs":["structinst","arrayinst","fieldval","packval"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-fieldval"},{"id":"aux-packfield","anchors":["aux-packfield","aux-unpackfield"],"title":"Conventions","level":3,"path":"exec/runtime","prose":"Conversion of a regular value to a field value is defined as follows:\n\n \n\n The inverse conversion of a field value to a regular value is defined as follows:","crossrefs":["syntax-val","syntax-fieldval"],"formal_refs":["packfield_","unpackfield_"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#aux-packfield"},{"id":"syntax-exninst","anchors":["syntax-exninst"],"title":"Exception Instances","level":2,"path":"exec/runtime","prose":"An exception instance is the runtime representation of an exception produced by a THROW instruction.\nIt holds the address of the respective tag and the argument values.","crossrefs":["exception","syntax-tagaddr","syntax-tag","syntax-val"],"formal_refs":["exninst","THROW"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-exninst"},{"id":"syntax-frame","anchors":["syntax-frame","syntax-callframe","syntax-label","syntax-handler","frame","label","handler","stack"],"title":"Stack","level":2,"path":"exec/runtime","prose":"Besides the store, most instructions interact with an implicit stack.\nThe stack contains the two kinds of entries:\n\n Values: the operands of instructions.\n\n Control Frames: currently active control flow structures.\n\nThe latter can in turn be one of the following:\n\n Labels: active structured control instructions that can be targeted by branches.\n\n (Call) Frames: the activation records of active function calls.\n\n Handlers: active exception handlers.\n\n Where clear from context, call frame is abbreviated to just frame*.\n\nAll these entries can occur on the stack in any order during the execution of a program.\nStack entries are described by abstract syntax as follows.\n\n It is possible to model the WebAssembly semantics using separate stacks for operands, control constructs, and calls.\n However, because the stacks are interdependent, additional book keeping about associated stack heights would be required.\n For the purpose of this specification, an interleaved representation is simpler.","crossrefs":["store","syntax-instr","syntax-instr-control","syntax-func"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-frame"},{"id":"exec/runtime-values","anchors":[],"title":"Values","level":3,"path":"exec/runtime","prose":"Values are represented by themselves.","crossrefs":["syntax-val"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"exec/runtime-labels","anchors":[],"title":"Labels","level":3,"path":"exec/runtime","prose":"Labels carry an argument arity n and their associated branch target, which is expressed syntactically as an instruction sequence:\n\nIntuitively, instr is the continuation* to execute when the branch is taken, in place of the original control construct.\n\n For example, a loop label has the form\n\n \n\n When performing a branch to this label, this executes the loop, effectively restarting it from the beginning.\n Conversely, a simple block label has the form\n\n \n\n When branching, the empty continuation ends the targeted block, such that execution can proceed with consecutive instructions.","crossrefs":["syntax-instr"],"formal_refs":["label","LABEL_","n","`(LOOP","bt","$instrdots)","`eps","instr*"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"exec/runtime-call-frames","anchors":[],"title":"Call Frames","level":3,"path":"exec/runtime","prose":"Call frames carry the return arity n of the respective function,\nhold the values of its locals (including arguments) in the order corresponding to their static local indices,\nand a reference to the function's own module instance:\n\nLocals may be uninitialized, in which case they are empty.\nLocals are mutated by respective variable instructions.","crossrefs":["syntax-local","syntax-localidx","syntax-moduleinst","syntax-instr-variable"],"formal_refs":["callframe","frame","n"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"exec/runtime-exception-handlers","anchors":[],"title":"Exception Handlers","level":3,"path":"exec/runtime","prose":"Exception handlers are installed by TRYTABLE instructions and record the corresponding list of catch clauses:\n\nThe handlers on the stack are searched when an exception is thrown.","crossrefs":["syntax-catch","syntax-throw"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"aux-blocktype","anchors":["aux-blocktype"],"title":"Conventions","level":3,"path":"exec/runtime","prose":"The meta variable L ranges over labels where clear from context.\n\n The meta variable f ranges over frame states where clear from context.\n\n The meta variable H ranges over exception handlers where clear from context.\n\n The following auxiliary definition takes a block type and looks up the instruction type that it denotes in the current frame:","crossrefs":["syntax-blocktype","syntax-instrtype"],"formal_refs":["blocktype_","L","f"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#aux-blocktype"},{"id":"syntax-trap","anchors":["syntax-trap","syntax-instr-admin"],"title":"Administrative Instructions","level":2,"path":"exec/runtime","prose":"This section is only relevant for the formal notation.\n\nIn order to express the reduction of traps, calls, exception handling, and control instructions, the syntax of instructions is extended to include the following administrative instructions:\n\nA reference represents a reference value of respective form \"on the stack\".\n\nThe LABEL, FRAME, and HANDLER instructions model labels, frames, and active exception handlers, respectively, \"on the stack\".\nMoreover, the administrative syntax maintains the nesting structure of the original structured control instruction or function body and their instruction sequences.\n\nThe TRAP instruction represents the occurrence of a trap.\nTraps are bubbled up through nested instruction sequences, ultimately reducing the entire program to a single TRAP instruction, signalling abrupt termination.\n\n For example, the reduction rule for BLOCK is:\n\n \n\n if the block type bt denotes a function type FUNC t_1^m t_2^n,\n such that n is the block's result arity.\n This rule replaces the block with a label instruction,\n which can be interpreted as \"pushing\" the label on the stack.\n When its end is reached, i.e., the inner instruction sequence has been reduced to the empty sequence -- or rather, a sequence of n values representing the results -- then the LABEL instruction is eliminated courtesy of its own reduction rule:\n\n \n\n This can be interpreted as removing the label from the stack and only leaving the locally accumulated operand values.\n Validation guarantees that n matches the number |val*| of resulting values at this point.","crossrefs":["exec-notation","trap","syntax-call","syntax-handler","syntax-instr-control","syntax-ref","syntax-label","syntax-frame","syntax-func","syntax-instrs","exec-block","syntax-blocktype","syntax-functype","syntax-val","exec-label"],"formal_refs":["instr/admin","(BLOCK","bt","instr*)","(LABEL_","n","`eps","`instr*","val*)","val*","LABEL","FRAME","HANDLER","TRAP","BLOCK","FUNC","t_1^m","t_2^n","|val*|"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-trap"},{"id":"syntax-state","anchors":["syntax-state","syntax-thread","syntax-config"],"title":"Configurations","level":2,"path":"exec/runtime","prose":"A configuration describes the current computation.\nIt consists of the computations's state and the sequence of instructions left to execute.\nThe state in turn consists of a global store and a current frame referring to the module instance in which the computation runs, i.e., where the current function originates from.\n\n.. old\n A configuration consists of the current store and an executing thread.\n\n A thread is a computation over instructions\n that operates relative to the state of a current frame referring to the module instance in which the computation runs, i.e., where the current function originates from.\n\n .. math::\n \\begin{array}{llcl}\n \\production{configuration} & \\config &::=&\n \\store; \\thread \\\\\n \\production{thread} & \\thread &::=&\n \\frame; \\instr^\\ast \\\\\n \\end{array}\n\n The current version of WebAssembly is single-threaded,\n but configurations with multiple threads may be supported in the future.","crossrefs":["syntax-instr","syntax-store","syntax-frame","syntax-moduleinst"],"formal_refs":["config","state"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html#syntax-state"},{"id":"exec/runtime-conventions","anchors":[],"title":"Conventions","level":3,"path":"exec/runtime","prose":"The meta variable z ranges over frame states where clear from context.\n\n The following shorthands are defined for accessing a state z (s; f):\n\n - type\n - tag\n - global\n - mem\n - table\n - func\n - data\n - elem\n - local\n\n* These shorthands also extend to notation for updating state:\n\n - with_global\n - with_mem\n - with_table\n - with_local","crossrefs":["notation-replace"],"formal_refs":["z","(s;","f)","type","tag","global","mem","table","func","data","elem","local","with_global","with_mem","with_table","with_local"],"url":"https://webassembly.github.io/spec/core/exec/runtime.html"},{"id":"exec-type","anchors":["exec-type"],"title":"Types","level":1,"path":"exec/types","prose":"Execution has to check and compare types in a few places, such as executing CALL_INDIRECT or instantiating modules.\n\nIt is an invariant of the semantics that all types occurring during execution are closed.\n\n Runtime type checks generally involve types from multiple modules or types not defined by a module at all,\n such that any module-local type indices occurring inside them would not generally be meaningful.","crossrefs":["syntax-type","exec-call_indirect","exec-instantiation","syntax-module","type-closed","syntax-typeidx"],"formal_refs":["CALL_INDIRECT"],"url":"https://webassembly.github.io/spec/core/exec/types.html#exec-type"},{"id":"type-inst","anchors":["type-inst"],"title":"Instantiation","level":2,"path":"exec/types","prose":"Any form of type can be instantiated into a closed type inside a module instance by substituting each type index x occurring in it with the corresponding defined type moduleinst.TYPES[x].\n\n This is the runtime equivalent to type closure, which is applied at validation time.","crossrefs":["syntax-type","type-closed","syntax-moduleinst","notation-subst","syntax-typeidx","syntax-deftype","type-closure"],"formal_refs":["inst_valtype","inst_reftype","x","moduleinst.TYPES[x]"],"url":"https://webassembly.github.io/spec/core/exec/types.html#type-inst"},{"id":"exec/values-values","anchors":[],"title":"Values","level":1,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"valid-val","anchors":["valid-val"],"title":"Value Typing","level":2,"path":"exec/values","prose":"For the purpose of checking argument values against the parameter types of exported functions,\nvalues are classified by value types.\nThe following auxiliary typing rules specify this typing relation relative to a store S in which possibly referenced addresses live.\n\nVal_ok/*","crossrefs":["syntax-val","syntax-func","syntax-valtype","syntax-store","syntax-addr"],"formal_refs":["Val_ok/*"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-val"},{"id":"valid-num","anchors":["valid-num"],"title":"Numeric Values","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Num_ok"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-num"},{"id":"valid-vec","anchors":["valid-vec"],"title":"Vector Values","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Vec_ok"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-vec"},{"id":"valid-ref","anchors":["valid-ref"],"title":"Null References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/null"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-ref"},{"id":"valid-ref.i31num","anchors":["valid-ref.i31num"],"title":"Scalar References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/i31"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-ref.i31num"},{"id":"valid-ref.struct","anchors":["valid-ref.struct"],"title":"Structure References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/struct"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-ref.struct"},{"id":"valid-ref.array","anchors":["valid-ref.array"],"title":"Array References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/array"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-ref.array"},{"id":"valid-ref.exn","anchors":["valid-ref.exn"],"title":"Exception References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/exn"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-ref.exn"},{"id":"exec/values-function-references","anchors":[],"title":"Function References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/func"],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"exec/values-host-references","anchors":[],"title":"Host References","level":3,"path":"exec/values","prose":"A bare host reference is considered internalized.","crossrefs":[],"formal_refs":["Ref_ok/host"],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"exec/values-external-references","anchors":[],"title":"External References","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/extern"],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"exec/values-subsumption","anchors":[],"title":"Subsumption","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Ref_ok/sub"],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"valid-externaddr","anchors":["valid-externaddr"],"title":"External Typing","level":2,"path":"exec/values","prose":"For the purpose of checking external address against imports,\nsuch values are classified by external types.\nThe following auxiliary typing rules specify this typing relation relative to a store S in which the referenced instances live.","crossrefs":["syntax-externaddr","syntax-import","syntax-externtype","syntax-store"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr"},{"id":"valid-externaddr-func","anchors":["valid-externaddr-func"],"title":"Functions","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/func"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr-func"},{"id":"valid-externaddr-table","anchors":["valid-externaddr-table"],"title":"Tables","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/table"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr-table"},{"id":"valid-externaddr-mem","anchors":["valid-externaddr-mem"],"title":"Memories","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/mem"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr-mem"},{"id":"valid-externaddr-global","anchors":["valid-externaddr-global"],"title":"Globals","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/global"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr-global"},{"id":"valid-externaddr-tag","anchors":["valid-externaddr-tag"],"title":"Tags","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/tag"],"url":"https://webassembly.github.io/spec/core/exec/values.html#valid-externaddr-tag"},{"id":"exec/values-subsumption","anchors":[],"title":"Subsumption","level":3,"path":"exec/values","prose":"","crossrefs":[],"formal_refs":["Externaddr_ok/sub"],"url":"https://webassembly.github.io/spec/core/exec/values.html"},{"id":"index-webassembly-specification","anchors":[],"title":"WebAssembly Specification","level":1,"path":"index","prose":"..\n Only include these links when using (multi-page) html builder.\n (The singlepage html builder is called builder_singlehtml.)","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/index.html"},{"id":"intro","anchors":["intro"],"title":"Introduction","level":1,"path":"intro/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/index.html#intro"},{"id":"intro/introduction-introduction","anchors":[],"title":"Introduction","level":1,"path":"intro/introduction","prose":"WebAssembly (abbreviated Wasm [#wasm]_) is a safe, portable, low-level code format\ndesigned for efficient execution and compact representation.\nIts main goal is to enable high performance applications on the Web, but it does not make any Web-specific assumptions or provide Web-specific features, so it can be employed in other environments as well.\n\nWebAssembly is an open standard developed by a `W3C Community Group <https://www.w3.org/community/webassembly/>`_.\n\nThis document describes version release of the core WebAssembly standard.\nIt is intended that it will be superseded by new incremental releases with additional features in the future.","crossrefs":["scope"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/introduction.html"},{"id":"goals","anchors":["goals"],"title":"Design Goals","level":2,"path":"intro/introduction","prose":"The design goals of WebAssembly are the following:\n\n Fast, safe, and portable semantics:\n\n Fast: executes with near native code performance, taking advantage of capabilities common to all contemporary hardware.\n\n Safe: code is validated and executes in a memory-safe [#memorysafe]_, sandboxed environment preventing data corruption or security breaches.\n\n Well-defined: fully and precisely defines valid programs and their behavior in a way that is easy to reason about informally and formally.\n\n Hardware-independent: can be compiled on all modern architectures, desktop or mobile devices and embedded systems alike.\n\n Language-independent: does not privilege any particular language, programming model, or object model.\n\n Platform-independent: can be embedded in browsers, run as a stand-alone VM, or integrated in other environments.\n\n Open: programs can interoperate with their environment in a simple and universal manner.\n\n Efficient and portable representation:\n\n Compact: has a binary format that is fast to transmit by being smaller than typical text or native code formats.\n\n Modular: programs can be split up in smaller parts that can be transmitted, cached, and consumed separately.\n\n Efficient: can be decoded, validated, and compiled in a fast single pass, equally with either just-in-time (JIT) or ahead-of-time (AOT) compilation.\n\n Streamable: allows decoding, validation, and compilation to begin as soon as possible, before all data has been seen.\n\n Parallelizable: allows decoding, validation, and compilation to be split into many independent parallel tasks.\n\n * Portable: makes no architectural assumptions that are not broadly supported across modern hardware.\n\nWebAssembly code is also intended to be easy to inspect and debug, especially in environments like web browsers, but such features are beyond the scope of this specification.\n\n.. [#wasm] A contraction of \"WebAssembly\", not an acronym, hence not using all-caps.\n\n.. [#memorysafe] No program can break WebAssembly's memory model. Of course, it cannot guarantee that an unsafe language compiling to WebAssembly does not corrupt its own memory layout, e.g. inside WebAssembly's linear memory.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/introduction.html#goals"},{"id":"scope","anchors":["scope"],"title":"Scope","level":2,"path":"intro/introduction","prose":"At its core, WebAssembly is a virtual instruction set architecture (virtual ISA).\nAs such, it has many use cases and can be embedded in many different environments.\nTo encompass their variety and enable maximum reuse, the WebAssembly specification is split and layered into several documents.\n\nThis document is concerned with the core ISA layer of WebAssembly.\nIt defines the instruction set, binary encoding, validation, and execution semantics, as well as a textual representation.\nIt does not, however, define how WebAssembly programs can interact with a specific environment they execute in, nor how they are invoked from such an environment.\n\nInstead, this specification is complemented by additional documents defining interfaces to specific embedding environments such as the Web.\nThese will each define a WebAssembly application programming interface (API) suitable for a given environment.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/introduction.html#scope"},{"id":"security","anchors":["security"],"title":"Security Considerations","level":2,"path":"intro/introduction","prose":"WebAssembly provides no ambient access to the computing environment in which code is executed.\nAny interaction with the environment, such as I/O, access to resources, or operating system calls, can only be performed by invoking functions provided by the embedder and imported into a WebAssembly module.\nAn embedder can establish security policies suitable for a respective environment by controlling or limiting which functional capabilities it makes available for import.\nSuch considerations are an embedder’s responsibility and the subject of API definitions for a specific environment.\n\nBecause WebAssembly is designed to be translated into machine code running directly on the host's hardware, it is potentially vulnerable to side channel attacks on the hardware level.\nIn environments where this is a concern, an embedder may have to put suitable mitigations into place to isolate WebAssembly computations.","crossrefs":["function","embedder","module","scope"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/introduction.html#security"},{"id":"dependencies","anchors":["dependencies"],"title":"Dependencies","level":2,"path":"intro/introduction","prose":"WebAssembly depends on two existing standards:\n\n IEEE754, for the representation of floating-point data and the semantics of respective numeric operations.\n\n Unicode, for the representation of import/export names and the text format.\n\nHowever, to make this specification self-contained, relevant aspects of the aforementioned standards are defined and formalized as part of this specification,\nsuch as the binary representation and rounding of floating-point values, and the value range and UTF-8 encoding of Unicode characters.\n\n The aforementioned standards are the authoritative source of all respective definitions.\n Formalizations given in this specification are intended to match these definitions.\n Any discrepancy in the syntax or semantics described is to be considered an error.","crossrefs":["syntax-float","float-ops","syntax-name","text","aux-fbits","aux-ieee","syntax-char","binary-utf8"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/introduction.html#dependencies"},{"id":"intro/overview-overview","anchors":[],"title":"Overview","level":1,"path":"intro/overview","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html"},{"id":"concepts","anchors":["concepts"],"title":"Concepts","level":2,"path":"intro/overview","prose":"WebAssembly encodes a low-level, assembly-like programming language.\nThis language is structured around the following concepts.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#concepts"},{"id":"value","anchors":["value"],"title":null,"level":0,"path":"intro/overview","prose":"Values\n WebAssembly provides only four basic number types.\n These are integers and IEEE754 numbers,\n each in 32 and 64 bit width.\n 32-bit integers also serve as Booleans and as memory addresses.\n The usual operations on these types are available,\n including the full matrix of conversions between them.\n There is no distinction between signed and unsigned integer types.\n Instead, integers are interpreted by respective operations\n as either unsigned or signed in two’s complement representation.\n\n In addition to these basic number types, there is a single 128 bit wide\n vector type representing different types of packed data.\n The supported representations are four 32-bit, or two 64-bit\n IEEE754 numbers, or different widths of packed integer values,\n specifically two 64-bit integers, four 32-bit integers, eight\n 16-bit integers, or sixteen 8-bit integers.\n\n Finally, values can consist of opaque references that represent pointers towards different sorts of entities.\n Unlike with other types, their size or representation is not observable.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#value"},{"id":"instruction","anchors":["instruction"],"title":null,"level":0,"path":"intro/overview","prose":"Instructions\n The computational model of WebAssembly is based on a stack machine.\n Code consists of sequences of instructions that are executed in order.\n Instructions manipulate values on an implicit operand stack [#stackmachine]_\n and fall into two main categories.\n Simple instructions perform basic operations on data.\n They pop arguments from the operand stack and push results back to it.\n Control instructions alter control flow.\n Control flow is structured, meaning it is expressed with well-nested constructs such as blocks, loops, and conditionals.\n Branches can only target such constructs.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#instruction"},{"id":"trap","anchors":["trap"],"title":null,"level":0,"path":"intro/overview","prose":"Traps\n Under some conditions, certain instructions may produce a trap,\n which immediately aborts execution.\n Traps cannot be handled by WebAssembly code,\n but are reported to the outside environment,\n where they typically can be caught.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#trap"},{"id":"function","anchors":["function"],"title":null,"level":0,"path":"intro/overview","prose":"Functions\n Code is organized into separate functions.\n Each function takes a sequence of values as parameters\n and returns a sequence of values as results.\n Functions can call each other, including recursively,\n resulting in an implicit call stack that cannot be accessed directly.\n Functions may also declare mutable local variables that are usable as virtual registers.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#function"},{"id":"table","anchors":["table"],"title":null,"level":0,"path":"intro/overview","prose":"Tables\n A table is an array of opaque values of a particular reference type.\n It allows programs to select such values indirectly through a dynamic index operand.\n Thereby, for example, a program can call functions indirectly through a dynamic index into a table.\n This allows emulating function pointers by way of table indices.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#table"},{"id":"memory","anchors":["memory"],"title":null,"level":0,"path":"intro/overview","prose":"Linear Memory\n A linear memory is a contiguous, mutable array of raw bytes.\n Such a memory is created with an initial size but can be grown dynamically.\n A program can load and store values from/to a linear memory at any byte address (including unaligned).\n Integer loads and stores can specify a storage size which is smaller than the size of the respective value type.\n A trap occurs if an access is not within the bounds of the current memory size.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#memory"},{"id":"module","anchors":["module"],"title":null,"level":0,"path":"intro/overview","prose":"Modules\n A WebAssembly binary takes the form of a module\n that contains definitions for functions, tables, and linear memories,\n as well as mutable or immutable global variables.\n Definitions can also be imported, specifying a module/name pair and a suitable type.\n Each definition can optionally be exported under one or more names.\n In addition to definitions, modules can define initialization data for their memories or tables\n that takes the form of segments copied to given offsets.\n They can also define a start function that is automatically executed.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#module"},{"id":"embedder","anchors":["embedder"],"title":null,"level":0,"path":"intro/overview","prose":"Embedder\n A WebAssembly implementation will typically be embedded into a host environment.\n This environment defines how loading of modules is initiated,\n how imports are provided (including host-side definitions), and how exports can be accessed.\n However, the details of any particular embedding are beyond the scope of this specification, and will instead be provided by complementary, environment-specific API definitions.\n\n.. [#stackmachine] In practice, implementations need not maintain an actual operand stack. Instead, the stack can be viewed as a set of anonymous registers that are implicitly referenced by instructions. The type system ensures that the stack height, and thus any referenced register, is always known statically.","crossrefs":["validation"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#embedder"},{"id":"intro/overview-semantic-phases","anchors":[],"title":"Semantic Phases","level":2,"path":"intro/overview","prose":"Conceptually, the semantics of WebAssembly is divided into three phases.\nFor each part of the language, the specification specifies each of them.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html"},{"id":"decoding","anchors":["decoding"],"title":null,"level":0,"path":"intro/overview","prose":"Decoding\n WebAssembly modules are distributed in a binary format.\n Decoding processes that format and converts it into an internal representation of a module.\n In this specification, this representation is modelled by abstract syntax, but a real implementation could compile directly to machine code instead.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#decoding"},{"id":"validation","anchors":["validation"],"title":null,"level":0,"path":"intro/overview","prose":"Validation\n A decoded module has to be valid.\n Validation checks a number of well-formedness conditions to guarantee that the module is meaningful and safe.\n In particular, it performs type checking of functions and the instruction sequences in their bodies, ensuring for example that the operand stack is used consistently.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#validation"},{"id":"execution","anchors":["execution","instantiation","invocation"],"title":null,"level":0,"path":"intro/overview","prose":"Execution\n Finally, a valid module can be executed.\n Execution can be further divided into two phases:\n\n Instantiation.\n A module instance is the dynamic representation of a module,\n complete with its own state and execution stack.\n Instantiation executes the module body itself, given definitions for all its imports.\n It initializes globals, memories and tables and invokes the module's start function if defined.\n It returns the instances of the module's exports.\n\n Invocation.\n Once instantiated, further WebAssembly computations can be initiated by invoking an exported function on a module instance.\n Given the required arguments, that executes the respective function and returns its results.\n\n Instantiation and invocation are operations within the embedding environment.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/intro/overview.html#execution"},{"id":"syntax/conventions-conventions","anchors":[],"title":"Conventions","level":1,"path":"syntax/conventions","prose":"WebAssembly is a programming language that has multiple concrete representations\n(its binary format and the text format).\nBoth map to a common structure.\nFor conciseness, this structure is described in the form of an abstract syntax.\nAll parts of this specification are defined in terms of this abstract syntax.","crossrefs":["binary","text"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/syntax/conventions.html"},{"id":"grammar","anchors":["grammar"],"title":"Grammar Notation","level":2,"path":"syntax/conventions","prose":"The following conventions are adopted in defining grammar rules for abstract syntax.\n\n Terminal symbols (atoms) are written in sans-serif font or in symbolic form: I32, NOP, , .\n\n Nonterminal symbols are written in italic font: valtype, instr.\n\n A^n is a sequence of n iterations of A.\n\n A is a possibly empty sequence of iterations of A.\n (This is a shorthand for A^n used where n is not relevant.)\n\n A+` is a non-empty sequence of iterations of A.\n (This is a shorthand for A^n where n.)\n\n A?` is an optional occurrence of A.\n (This is a shorthand for A^n where n.)\n\n Productions are written sym.\n\n Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, symsplit/1, and starting continuations with ellipses, symsplit/2.\n\n Some productions are augmented with side conditions, \"\\iff \\X{condition}\", that provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n* If the same meta variable or non-terminal symbol appears multiple times in a production, then all those occurrences must have the same instantiation.\n (This is a shorthand for a side condition requiring multiple different variables to be equal.)","crossrefs":[],"formal_refs":["I32","NOP","valtype","instr","A^n","n","A","A*","A+","A?","sym","symsplit/1","symsplit/2"],"url":"https://webassembly.github.io/spec/core/syntax/conventions.html#grammar"},{"id":"notation-epsilon","anchors":["notation-epsilon","notation-length","notation-index","notation-slice","notation-replace","notation-record","notation-project","notation-concat","notation-compose"],"title":"Auxiliary Notation","level":2,"path":"syntax/conventions","prose":"A B\n\nWhen dealing with syntactic constructs the following notation is also used:\n\n eps denotes the empty sequence.\n\n s denotes the length of a sequence s.\n\n s[i] denotes the i-th element of a sequence s`, starting from .\n\n s[i n] denotes the sub-sequence s[i]...s[i+n-1] of a sequence s.\n\n s[[i]=A] denotes the same sequence as s,\n except that the i-th element is replaced with A.\n\n s[[i n] A^n] denotes the same sequence as s,\n except that the sub-sequence s[i n] is replaced with A^n.\n\n s_1++s_2 denotes the sequence s_1 concatenated with s_2;\n this is equivalent to s_1 s_2, but used for clarity.\n\n s denotes the flattened sequence, formed by concatenating all sequences s_i in s.\n\n A s denotes that A is a member of the sequence s, that is, s is of the form s_1 A s_2 for some sequences s_1, s_2.\n\nMoreover, the following conventions are employed:\n\n The notation x^n, where x is a non-terminal symbol, is treated as a meta variable ranging over respective sequences of x (similarly for x, x+, x?).\n\n When given a sequence x^n,\n then the occurrences of x in an iterated sequence (!%...x...!%)^n are assumed to denote the individual elements of x^n, respectively\n (similarly for x, x+, x?).\n This implicitly expresses a form of mapping syntactic constructions over a sequence.\n\n e^(i<n) denotes the same sequence as e^n,\n but implicitly also defines i^n to be the sequence of values to ($(n-1)).\n\n For example, if x^n is the sequence a b c, then ($($f(x) 1))^n denotes the sequence ($($f(a) ($($f(b) ($($f(c).\n\n The form e^(i<n) additionally gives access to an index variable inside the iteration.\n For example, ($($f(x) i))^(i<n) denotes the sequence ($($f(a) ($($f(b) ($($f(c).\n\nProductions of the following form are interpreted as records that map a fixed set of fields FIELD_ i to \"values\" A_i, respectively:\n\nrecorddots\n\nThe following notation is adopted for manipulating such records:\n\n Where the type of a record is clear from context, empty fields with value eps are often omitted.\n\n r.FIELD denotes the contents of the FIELD component of r.\n\n r[.FIELD A] denotes the same record as r,\n except that the value of the FIELD component is replaced with A.\n\n r[.FIELD A] denotes the same record as r,\n except that A is appended to the sequence value of the FIELD component,\n that is, it is short for r[.FIELD r.FIELD A].\n\n r_1++r_2 denotes the composition of two identically shaped records by concatenating each field of sequences point-wise:\n\n \n\n r denotes the composition of a sequence of records, respectively; if the sequence is empty, then all fields of the resulting record are empty.\n\nThe update notation for sequences and records generalizes recursively to nested components accessed by \"paths\" pth:\n\n s[$(`[i]#pth A)] is short for s[[i] s[i][pth A]],\n\n r[$(!%.FIELD pth A)] is short for r[.FIELD r.FIELD[pth A]].","crossrefs":[],"formal_refs":["record","`FIELD_","A_1*","FIELD_","A_2*","B_1*","B_2*","(A_1*","B_1*)","(A_2*","B_2*)","A","B","eps","|s|","s","s[i]","i","s[i","n]","s[i]...s[i+n-1]","s[[i]=A]","s[[i","A^n]","A^n","s_1++s_2","s_1","s_2","s*","s_i","x^n","x","x*","x+","x?","(!%...x...!%)^n","e^(i<n)","e^n","i^n","($(n-1))","a","b","c","($($f(x)","1))^n","($($f(a)","($($f(b)","($($f(c)","i))^(i<n)","A_i","recorddots","r.FIELD","FIELD","r","r[.FIELD","A]","A*]","A*","r_1++r_2","r*","pth","s[$(`[i]#pth","A)]","s[[i]","s[i][pth","A]]","r[$(!%.FIELD","r.FIELD[pth"],"url":"https://webassembly.github.io/spec/core/syntax/conventions.html#notation-epsilon"},{"id":"syntax-list","anchors":["syntax-list"],"title":"Lists","level":2,"path":"syntax/conventions","prose":"Lists are bounded sequences of the form A^n (or A*),\nwhere the A can either be values or complex constructions.\nA list can have at most elements.","crossrefs":[],"formal_refs":["list","A^n","A*","A"],"url":"https://webassembly.github.io/spec/core/syntax/conventions.html#syntax-list"},{"id":"syntax","anchors":["syntax"],"title":"Structure","level":1,"path":"syntax/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/syntax/index.html#syntax"},{"id":"syntax-instr","anchors":["syntax-instr"],"title":"Instructions","level":1,"path":"syntax/instructions","prose":"WebAssembly code consists of sequences of instructions.\nIts computational model is based on a stack machine in that instructions manipulate values on an implicit operand stack,\nconsuming (popping) argument values and producing or returning (pushing) result values.\n\nIn addition to dynamic operands from the stack, some instructions also have static immediate arguments,\ntypically indices or type annotations,\nwhich are part of the instruction itself.\n\nSome instructions are structured in that they contain nested sequences of instructions.\n\nThe following sections group instructions into a number of different categories.\n\nThe syntax of instruction is further extended with additional forms for the purpose of specifying execution.","crossrefs":["syntax-index","syntax-instr-control","syntax-instr-admin","exec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr"},{"id":"syntax-instr-parametric","anchors":["syntax-instr-parametric"],"title":"Parametric Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group can operate on operands of any value type.\n\nThe NOP instruction does nothing.\n\nThe UNREACHABLE instruction causes an unconditional trap.\n\nThe DROP instruction simply throws away a single operand.\n\nThe SELECT instruction selects one of its first two operands based on whether its third operand is zero or not.\nIt may include a value type determining the type of these operands.\nIf missing, the operands must be of numeric or vector type.\n\n In future versions of WebAssembly, the type annotation on SELECT may allow for more than a single value being selected at the same time.","crossrefs":["syntax-valtype","trap","syntax-numtype","syntax-vectype"],"formal_refs":["instr/parametric","NOP","UNREACHABLE","DROP","SELECT"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-parametric"},{"id":"syntax-nop","anchors":["syntax-nop","syntax-unreachable","syntax-block","syntax-loop","syntax-if","syntax-br","syntax-br_if","syntax-br_table","syntax-br_on_null","syntax-br_on_non_null","syntax-br_on_cast","syntax-br_on_cast_fail","syntax-call","syntax-call_ref","syntax-call_indirect","syntax-return","syntax-return_call","syntax-return_call_ref","syntax-return_call_indirect","syntax-throw","syntax-throw_ref","syntax-try_table","syntax-catch","syntax-instrs","syntax-instr-control","exception"],"title":"Control Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group affect the flow of control.\n\nThe BLOCK, LOOP, IF and TRY_TABLE instructions are structured instructions.\nThey bracket nested sequences of instructions, called blocks.\nAs the grammar prescribes, they must be well-nested.\n\nA structured instruction can consume input and produce output on the operand stack according to its annotated block type.\n\nEach structured control instruction introduces an implicit label.\nLabels are targets for branch instructions that reference them with label indices.\nUnlike with other index spaces, indexing of labels is relative by nesting depth,\nthat is, label refers to the innermost structured control instruction enclosing the referring branch instruction,\nwhile increasing indices refer to those farther out.\nConsequently, labels can only be referenced from within the associated structured control instruction.\nThis also implies that branches can only be directed outwards,\n\"breaking\" from the block of the control construct they target.\nThe exact effect depends on that control construct.\nIn case of BLOCK or IF it is a forward jump,\nresuming execution after the end of the block.\nIn case of LOOP it is a backward jump to the beginning of the loop.\n\n This enforces structured control flow.\n Intuitively, a branch targeting a BLOCK or IF behaves like a \\K{break} statement in most C-like languages,\n while a branch targeting a LOOP behaves like a \\K{continue} statement.\n\nBranch instructions come in several flavors:\nBR performs an unconditional branch,\nBR_IF performs a conditional branch,\nand BR_TABLE performs an indirect branch through an operand indexing into the label list that is an immediate to the instruction, or to a default target if the operand is out of bounds.\nThe BR_ON_NULL and BR_ON_NON_NULL instructions check whether a reference operand is null and branch if that is the case or not the case, respectively.\nSimilarly, BR_ON_CAST and BR_ON_CAST_FAIL attempt a downcast on a reference operand and branch if that succeeds, or fails, respectively.\n\nThe RETURN instruction is a shortcut for an unconditional branch to the outermost block, which implicitly is the body of the current function.\nTaking a branch unwinds the operand stack up to the height where the targeted structured control instruction was entered.\nHowever, branches may additionally consume operands themselves, which they push back on the operand stack after unwinding.\nForward branches require operands according to the output of the targeted block's type, i.e., represent the values produced by the terminated block.\nBackward branches require operands according to the input of the targeted block's type, i.e., represent the values consumed by the restarted block.\n\nThe CALL instruction invokes another function, consuming the necessary arguments from the stack and returning the result values of the call.\nThe CALL_REF instruction invokes a function indirectly through a function reference operand.\nThe CALL_INDIRECT instruction calls a function indirectly through an operand indexing into a table that is denoted by a table index and must contain function references.\nSince it may contain functions of heterogeneous type,\nthe callee is dynamically checked against the function type indexed by the instruction's second immediate, and the call is aborted with a trap if it does not match.\n\nThe RETURN_CALL, RETURN_CALL_REF, and RETURN_CALL_INDIRECT instructions are tail-call variants of the previous ones.\nThat is, they first return from the current function before actually performing the respective call.\nIt is guaranteed that no sequence of nested calls using only these instructions can cause resource exhaustion due to hitting an implementation's limit on the number of active calls.\n\nThe instructions THROW, THROW_REF, and TRY_TABLE are concerned with exceptions.\nThe THROW and THROW_REF instructions raise and reraise an exception, respectively, and transfers control to the innermost enclosing exception handler that has a matching catch clause.\nThe TRY_TABLE instruction installs an exception handler that handles exceptions as specified by its catch clauses.","crossrefs":["syntax-blocktype","syntax-labelidx","syntax-index","syntax-nullref","syntax-func","syntax-reftype","syntax-table","syntax-tableidx","syntax-functype","trap","impl-exec"],"formal_refs":["instr/block","instr/br","instr/call","instr/exn","catch","BLOCK","LOOP","IF","TRY_TABLE","BR","BR_IF","BR_TABLE","BR_ON_NULL","BR_ON_NON_NULL","BR_ON_CAST","BR_ON_CAST_FAIL","RETURN","CALL","CALL_REF","CALL_INDIRECT","RETURN_CALL","RETURN_CALL_REF","RETURN_CALL_INDIRECT","THROW","THROW_REF"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-nop"},{"id":"syntax-instr-variable","anchors":["syntax-instr-variable"],"title":"Variable Instructions","level":2,"path":"syntax/instructions","prose":"Variable instructions are concerned with access to local or global variables.\n\nThese instructions get or set the values of respective variables.\nThe LOCAL.TEE instruction is like LOCAL.SET but also returns its argument.","crossrefs":["syntax-local","syntax-global"],"formal_refs":["instr/local","instr/global","LOCAL.TEE","LOCAL.SET"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-variable"},{"id":"syntax-instr-table","anchors":["syntax-instr-table","syntax-table.get","syntax-table.set","syntax-table.size","syntax-table.grow","syntax-table.fill"],"title":"Table Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group are concerned with tables table.\n\nThe TABLE.GET and TABLE.SET instructions load or store an element in a table, respectively.\n\nThe TABLE.SIZE instruction returns the current size of a table.\nThe TABLE.GROW instruction grows table by a given delta and returns the previous size, or if enough space cannot be allocated.\nIt also takes an initialization value for the newly allocated entries.\n\nThe TABLE.FILL instruction sets all entries in a range to a given value.\nThe TABLE.COPY instruction copies elements from a source table region to a possibly overlapping destination region; the first index denotes the destination.\nThe TABLE.INIT instruction copies elements from a passive element segment into a table.\n\nThe ELEM.DROP instruction prevents further use of a passive element segment. This instruction is intended to be used as an optimization hint. After an element segment is dropped its elements can no longer be retrieved, so the memory used by this segment may be freed.\n\n An additional instruction that accesses a table is the control instruction CALL_INDIRECT.","crossrefs":["syntax-table","syntax-elem","syntax-instr-control"],"formal_refs":["instr/table","instr/elem","TABLE.GET","TABLE.SET","TABLE.SIZE","TABLE.GROW","TABLE.FILL","TABLE.COPY","TABLE.INIT","ELEM.DROP","CALL_INDIRECT"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-table"},{"id":"syntax-loadn","anchors":["syntax-loadn","syntax-storen","syntax-memarg","syntax-loadop","syntax-storeop","syntax-vloadop","syntax-lanewidth","syntax-instr-memory"],"title":"Memory Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group are concerned with linear memory.\n\nMemory is accessed with LOAD and STORE instructions for the different number types and vector types.\nThey all take a memory index and a memory argument memarg that contains an address offset and the expected alignment (expressed as the exponent of a power of 2).\n\nInteger loads and stores can optionally specify a storage size sz that is smaller than the bit width of the respective value type.\nIn the case of loads, a sign extension mode sx is then required to select appropriate behavior.\n\nVector loads can specify a shape that is half the bit width of V128. Each lane is half its usual size, and the sign extension mode sx then specifies how the smaller lane is extended to the larger lane.\nAlternatively, vector loads can perform a splat, such that only a single lane of the specified storage size is loaded, and the result is duplicated to all lanes.\n\nThe static address offset is added to the dynamic address operand, yielding a 33-bit or 65-bit effective address that is the zero-based index at which the memory is accessed.\nAll values are read and written in LittleEndian byte order.\nA trap results if any of the accessed memory bytes lies outside the address range implied by the memory's current size.\n\nThe MEMORY.SIZE instruction returns the current size of a memory.\nThe MEMORY.GROW instruction grows a memory by a given delta and returns the previous size, or if enough memory cannot be allocated.\nBoth instructions operate in units of page size.\n\nThe MEMORY.FILL instruction sets all values in a region of memory to a given byte.\nThe MEMORY.COPY instruction copies data from a source memory region to a possibly overlapping destination region in another or the same memory; the first index denotes the destination.\nThe MEMORY.INIT instruction copies data from a passive data segment into a memory.\n\nThe DATA.DROP instruction prevents further use of a passive data segment. This instruction is intended to be used as an optimization hint. After a data segment is dropped its data can no longer be retrieved, so the memory used by this segment may be freed.","crossrefs":["syntax-mem","syntax-numtype","syntax-vectype","syntax-memidx","syntax-valtype","trap","page-size","syntax-data"],"formal_refs":["memarg","loadop_","storeop_","vloadop_","instr/memory","instr/data","LOAD","STORE","sz","sx","V128","MEMORY.SIZE","MEMORY.GROW","MEMORY.FILL","MEMORY.COPY","MEMORY.INIT","DATA.DROP"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-loadn"},{"id":"syntax-ref.null","anchors":["syntax-ref.null","syntax-ref.func","syntax-ref.is_null","syntax-ref.as_non_null","syntax-ref.eq","syntax-ref.test","syntax-ref.cast","syntax-instr-ref"],"title":"Reference Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group are concerned with accessing references.\n\nThe REF.NULL and REF.FUNC instructions produce a null reference or a reference to a given function, respectively.\n\nThe instruction REF.IS_NULL checks for null,\nwhile REF.AS_NON_NULL converts a nullable to a non-null one, and traps if it encounters null.\n\nThe REF.EQ compares two references.\n\nThe instructions REF.TEST and REF.CAST test the dynamic type of a reference operand.\nThe former merely returns the result of the test,\nwhile the latter performs a downcast and traps if the operand's type does not match.\n\n The BR_ON_NULL and BR_ON_NON_NULL instructions provide versions of REF.AS_NON_NULL that branch depending on the success or failure of a null test instead of trapping.\n Similarly, the BR_ON_CAST and BR_ON_CAST_FAIL instructions provides versions of REF.CAST that branch depending on the success of the downcast instead of trapping.\n\n An additional instruction operating on function references is the control instruction CALL_REF.","crossrefs":["syntax-reftype","syntax-nullref","trap","type-inst","syntax-instr-control"],"formal_refs":["instr/func","instr/ref","REF.NULL","REF.FUNC","REF.IS_NULL","REF.AS_NON_NULL","REF.EQ","REF.TEST","REF.CAST","BR_ON_NULL","BR_ON_NON_NULL","BR_ON_CAST","BR_ON_CAST_FAIL","CALL_REF"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-ref.null"},{"id":"syntax-struct.new","anchors":["syntax-struct.new","syntax-struct.new_default","syntax-struct.get","syntax-struct.get_s","syntax-struct.get_u","syntax-struct.set","syntax-array.new","syntax-array.new_default","syntax-array.new_fixed","syntax-array.new_data","syntax-array.new_elem","syntax-array.get","syntax-array.get_s","syntax-array.get_u","syntax-array.set","syntax-array.len","syntax-array.fill","syntax-array.copy","syntax-array.init_data","syntax-array.init_elem","syntax-ref.i31","syntax-i31.get_s","syntax-i31.get_u","syntax-any.convert_extern","syntax-extern.convert_any","syntax-instr-aggr","syntax-instr-struct","syntax-instr-array","syntax-instr-i31","syntax-instr-extern"],"title":"Aggregate Instructions","level":2,"path":"syntax/instructions","prose":"Instructions in this group are concerned with creating and accessing references to aggregate types.\n\nThe instructions STRUCT.NEW and STRUCT.NEW_DEFAULT allocate a new structure, initializing them either with operands or with default values.\nThe remaining instructions on structs access individual fields,\nallowing for different sign extension modes in the case of packed storage types.\n\nSimilarly, arrays can be allocated either with an explicit initialization operand or a default value.\nFurthermore, ARRAY.NEW_FIXED allocates an array with statically fixed size,\nand ARRAY.NEW_DATA and ARRAY.NEW_ELEM allocate an array and initialize it from a data or element segment, respectively.\nThe instructions ARRAY.GET, ARRAY.GET sx, and ARRAY.SET access individual slots,\nagain allowing for different sign extension modes in the case of a packed storage type;\nARRAY.LEN produces the length of an array;\nARRAY.FILL fills a specified slice of an array with a given value and ARRAY.COPY, ARRAY.INIT_DATA, and ARRAY.INIT_ELEM copy elements to a specified slice of an array from a given array, data segment, or element segment, respectively.\n\nThe instructions REF.I31 and I31.GET sx convert between type I32 and an unboxed scalar.\n\nThe instructions ANY.CONVERT_EXTERN and EXTERN.CONVERT_ANY allow lossless conversion between references represented as type (REF NULL EXTERN) and as (REF NULL ANY).","crossrefs":["syntax-reftype","syntax-aggrtype","syntax-structtype","syntax-packtype","syntax-arraytype","syntax-data","syntax-elem","syntax-i31"],"formal_refs":["instr/struct","instr/array","instr/i31","instr/extern","STRUCT.NEW","STRUCT.NEW_DEFAULT","ARRAY.NEW_FIXED","ARRAY.NEW_DATA","ARRAY.NEW_ELEM","ARRAY.GET","sx","ARRAY.SET","ARRAY.LEN","ARRAY.FILL","ARRAY.COPY","ARRAY.INIT_DATA","ARRAY.INIT_ELEM","REF.I31","I31.GET","I32","ANY.CONVERT_EXTERN","EXTERN.CONVERT_ANY","(REF","NULL","EXTERN)","ANY)"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-struct.new"},{"id":"syntax-sx","anchors":["syntax-sx","syntax-sz","syntax-num_","syntax-const","syntax-unop","syntax-binop","syntax-testop","syntax-relop","syntax-cvtop","syntax-instr-numeric"],"title":"Numeric Instructions","level":2,"path":"syntax/instructions","prose":"Numeric instructions provide basic operations over numeric values of specific type.\nThese operations closely match respective operations available in hardware.\n\nNumeric instructions are divided by number type.\nFor each type, several subcategories can be distinguished:\n\n Constants: return a static constant.\n\n Unary operations: consume one operand and produce one result of the respective type.\n\n Binary operations: consume two operands and produce one result of the respective type.\n\n Tests: consume one operand of the respective type and produce a Boolean integer result.\n\n Comparisons: consume two operands of the respective type and produce a Boolean integer result.\n\n Conversions: consume a value of one type and produce a result of another\n (the source type of the conversion is the one after the \"\").\n\nSome integer instructions come in two flavors,\nwhere a signedness annotation sx distinguishes whether the operands are to be interpreted as unsigned or signed integers.\nFor the other integer instructions, the use of two's complement for the signed interpretation means that they behave the same regardless of signedness.","crossrefs":["syntax-value","syntax-numtype","aux-signed","syntax-uint","syntax-sint"],"formal_refs":["sz","sx","num_","instr/num","unop_","binop_","testop_","relop_","cvtop__"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-sx"},{"id":"syntax-laneidx","anchors":["syntax-laneidx","syntax-lanetype","syntax-dim","syntax-shape","syntax-half","syntax-zero","syntax-vvunop","syntax-vvbinop","syntax-vvternop","syntax-vvtestop","syntax-vtestop","syntax-vrelop","syntax-vswizzlop","syntax-vshiftop","syntax-vunop","syntax-vbinop","syntax-vternop","syntax-vextunop","syntax-vextbinop","syntax-vextternop","syntax-vcvtop","syntax-instr-vec","syntax-instr-vec-relaxed"],"title":"Vector Instructions","level":2,"path":"syntax/instructions","prose":"Vector instructions (also known as SIMD instructions, single instruction multiple data) provide basic operations over values of vector type.\n\nVector instructions have a naming convention involving a shape prefix that\ndetermines how their operands will be interpreted,\nwritten t#X#N, and consisting of a lane type t, a possibly packed numeric type, and its dimension N, which denotes the number of lanes of that type.\nOperations are performed point-wise on the values of each lane.\n\nInstructions prefixed with V128 do not involve a specific interpretation, and treat the V128 as either an i128 value or a vector of individual bits.\n\n For example, the shape I32 X interprets the operand\n as four i32 values, packed into an i128.\n The bit width of the lane type t times N always is .\n\nVector instructions can be grouped into several subcategories:\n\n Constants: return a static constant.\n\n Unary Operations: consume one V128 operand and produce one V128 result.\n\n Binary Operations: consume two V128 operands and produce one V128 result.\n\n Ternary Operations: consume three V128 operands and produce one V128 result.\n\n Tests: consume one V128 operand and produce a Boolean integer result.\n\n Shifts: consume a V128 operand and an I32 operand, producing one V128 result.\n\n Splats: consume a value of numeric type and produce a V128 result of a specified shape.\n\n Extract lanes: consume a V128 operand and return the numeric value in a given lane.\n\n Replace lanes*: consume a V128 operand and a numeric value for a given lane, and produce a V128 result.\n\nSome vector instructions have a signedness annotation sx which distinguishes whether the elements in the operands are to be interpreted as unsigned or signed integers.\nFor the other vector instructions, the use of two's complement for the signed interpretation means that they behave the same regardless of signedness.","crossrefs":["syntax-value","syntax-vectype","syntax-numtype","aux-signed","syntax-uint","syntax-sint"],"formal_refs":["lanetype","dim","shape","ishape","bshape","half","zero","laneidx","instr/vec","vvunop","vvbinop","vvternop","vvtestop","vunop_","vbinop_","vternop_","vtestop_","vrelop_","vswizzlop_","vshiftop_","vextunop__","vextbinop__","vextternop__","vcvtop__","t#X#N","t","N","V128","i128","I32","X","i32","sx"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-laneidx"},{"id":"aux-lanetype","anchors":["aux-lanetype","aux-dim","aux-zeroop","aux-halfop"],"title":"Conventions","level":3,"path":"syntax/instructions","prose":"The function $lanetype(shape) extracts the lane type of a shape. lanetype\n\n The function $dim(shape) extracts the dimension of a shape. dim\n\n The function $zeroop(vcvtop) extracts the ZERO flag from a vector conversion operator, or returns eps if it does not contain any. zeroop\n\n The function $halfop(vcvtop) extracts the half flag from a vector conversion operator, or returns eps if it does not contain any. halfop","crossrefs":[],"formal_refs":["$lanetype(shape)","lanetype","$dim(shape)","dim","$zeroop(vcvtop)","ZERO","eps","zeroop","$halfop(vcvtop)","half","halfop"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#aux-lanetype"},{"id":"syntax-expr","anchors":["syntax-expr"],"title":"Expressions","level":2,"path":"syntax/instructions","prose":"Function bodies, initialization values for globals, elements and offsets of element segments, and offsets of data segments are given as expressions, which are sequences of instructions.\n\nIn some places, validation restricts expressions to be constant, which limits the set of allowable instructions.","crossrefs":["syntax-func","syntax-global","syntax-elem","syntax-data","syntax-instr","valid-constant"],"formal_refs":["expr"],"url":"https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-expr"},{"id":"syntax-module","anchors":["syntax-module"],"title":"Modules","level":1,"path":"syntax/modules","prose":"WebAssembly programs are organized into modules,\nwhich are the unit of deployment, loading, and compilation.\nA module collects definitions for\ntypes,\ntags, and\nglobals,\nmemories,\ntables,\nfunctions.\nIn addition, it can declare\nimports and exports\nand provide initialization in the form of\ndata and element segments,\nor a start function.\n\nEach of the lists --- and thus the entire module --- may be empty.","crossrefs":["syntax-type","syntax-tag","syntax-global","syntax-mem","syntax-table","syntax-func","syntax-import","syntax-export","syntax-data","syntax-elem","syntax-start"],"formal_refs":["module"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-module"},{"id":"syntax-idx","anchors":["syntax-idx","syntax-typeidx","syntax-tagidx","syntax-globalidx","syntax-memidx","syntax-tableidx","syntax-funcidx","syntax-dataidx","syntax-elemidx","syntax-localidx","syntax-labelidx","syntax-fieldidx","syntax-index"],"title":"Indices","level":2,"path":"syntax/modules","prose":"Definitions are referenced with zero-based indices.\nEach class of definition has its own index space, as distinguished by the following classes.\n\nThe index space for\ntags,\nglobals,\nmemories,\ntables, and\nfunctions\nincludes respective imports declared in the same module.\nThe indices of these imports precede the indices of other definitions in the same index space.\n\nData indices reference data segments and element indices reference element segments.\n\nThe index space for locals is only accessible inside a function and includes the parameters of that function, which precede the local variables.\n\nLabel indices reference structured control instructions inside an instruction sequence.\n\nEach aggregate type provides an index space for its fields.","crossrefs":["syntax-tag","syntax-global","syntax-mem","syntax-table","syntax-func","syntax-import","syntax-data","syntax-elem","syntax-local","syntax-instr-control","syntax-aggrtype","syntax-fieldtype"],"formal_refs":["idx","typeidx","funcidx","globalidx","tableidx","memidx","tagidx","elemidx","dataidx","labelidx","localidx","fieldidx"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-idx"},{"id":"syntax/modules-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/modules","prose":"The meta variable l ranges over label indices.\n\n The meta variables x, y range over indices in any of the other index spaces.","crossrefs":[],"formal_refs":["l","x","y"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html"},{"id":"free-typeidx","anchors":["free-typeidx","free-tagidx","free-globalidx","free-memidx","free-tableidx","free-funcidx","free-dataidx","free-elemidx","free-localidx","free-labelidx","free-fieldidx","free-index"],"title":null,"level":0,"path":"syntax/modules","prose":"For every index space abcidx, the notation $abcidx(A) denotes the set of indices from that index space occurring free in A. Sometimes this set is reinterpreted as the list of its elements.\n\n For example, if instr is (DATA.DROP (MEMORY.INIT, then $dataidx_instrs(instr*), or equivalently, the set .","crossrefs":["syntax-list"],"formal_refs":["abcidx","$abcidx(A)","A","instr*","(DATA.DROP","(MEMORY.INIT","$dataidx_instrs(instr*)"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#free-typeidx"},{"id":"syntax-type","anchors":["syntax-type","syntax-typedef"],"title":"Types","level":2,"path":"syntax/modules","prose":"The type section of a module defines a list of recursive types, each consisting of a list of sub types referenced by individual type indices.\nAll function, structure, or array types used in a module must be defined in this section.","crossrefs":["syntax-rectype","syntax-subtype","syntax-typeidx","syntax-functype","syntax-structtype","syntax-arraytype"],"formal_refs":["type"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-type"},{"id":"syntax-tag","anchors":["syntax-tag"],"title":"Tags","level":2,"path":"syntax/modules","prose":"The tag section of a module defines a list of tags:\n\nThe type index of a tag must refer to a function type that declares its tag type.\n\nTags are referenced through tag indices,\nstarting with the smallest index not referencing a tag import.","crossrefs":["syntax-typeidx","syntax-functype","syntax-tagtype","syntax-tagidx","syntax-import"],"formal_refs":["tag"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-tag"},{"id":"syntax-global","anchors":["syntax-global"],"title":"Globals","level":2,"path":"syntax/modules","prose":"The global section of a module defines a list of global variables (or globals for short):\n\nEach global stores a single value of the type specified in the global type.\nIt also specifies whether a global is immutable or mutable.\nMoreover, each global is initialized with a value given by a constant initializer expression.\n\nGlobals are referenced through global indices,\nstarting with the smallest index not referencing a global import.","crossrefs":["syntax-globaltype","valid-constant","syntax-expr","syntax-globalidx","syntax-import"],"formal_refs":["global"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-global"},{"id":"syntax-mem","anchors":["syntax-mem"],"title":"Memories","level":2,"path":"syntax/modules","prose":"The mem section of a module defines a list of linear memories (or memories for short) as described by their memory type:\n\nA memory is a list of raw uninterpreted bytes.\nThe minimum size in the limits of its memory type specifies the initial size of that memory, while its maximum, if present, restricts the size to which it can grow later.\nBoth are in units of page size.\n\nMemories can be initialized through data segments.\n\nMemories are referenced through memory indices,\nstarting with the smallest index not referencing a memory import.\nMost constructs implicitly reference memory index .","crossrefs":["syntax-memtype","syntax-limits","page-size","syntax-data","syntax-memidx","syntax-import"],"formal_refs":["mem"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-mem"},{"id":"syntax-table","anchors":["syntax-table"],"title":"Tables","level":2,"path":"syntax/modules","prose":"The table section of a module defines a list of tables described by their table type:\n\nA table is an array of opaque values of a particular reference type that is specified by the table type.\nEach table slot is initialized with a value given by a constant initializer expression.\nTables can further be initialized through element segments.\n\nThe minimum size in the limits of the table type specifies the initial size of that table, while its maximum restricts the size to which it can grow later.\n\nTables are referenced through table indices,\nstarting with the smallest index not referencing a table import.\nMost constructs implicitly reference table index .","crossrefs":["syntax-tabletype","syntax-reftype","valid-constant","syntax-expr","syntax-elem","syntax-limits","syntax-tableidx","syntax-import"],"formal_refs":["table"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-table"},{"id":"syntax-local","anchors":["syntax-local","syntax-func"],"title":"Functions","level":2,"path":"syntax/modules","prose":"The func section of a module defines a list of functions with the following structure:\n\nThe type index of a function declares its signature by reference to a function type defined in the module.\nThe parameters of the function are referenced through 0-based local indices in the function's body; they are mutable.\n\nThe locals declare a list of mutable local variables and their types.\nThese variables are referenced through local indices in the function's body.\nThe index of the first local is the smallest index not referencing a parameter.\n\nA function's expression is an instruction sequence that represents the body of the function.\nUpon termination it must produce a stack matching the function type's result type.\n\nFunctions are referenced through function indices,\nstarting with the smallest index not referencing a function import.","crossrefs":["syntax-typeidx","syntax-functype","syntax-localidx","syntax-expr","syntax-instr","syntax-resulttype","syntax-funcidx","syntax-import"],"formal_refs":["func","local"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-local"},{"id":"syntax-data","anchors":["syntax-data","syntax-datamode"],"title":"Data Segments","level":2,"path":"syntax/modules","prose":"The data section of a module defines a list of data segments,\nwhich can be used to initialize a range of memory from a static list of bytes.\n\nSimilar to element segments, data segments have a mode that identifies them as either active or passive.\nA passive data segment's contents can be copied into a memory using the MEMORY.INIT instruction.\nAn active data segment copies its contents into a memory during instantiation, as specified by a memory index and a constant expression defining an offset into that memory.\n\nData segments are referenced through data indices.","crossrefs":["syntax-list","syntax-byte","exec-instantiation","syntax-memidx","valid-constant","syntax-expr","syntax-dataidx"],"formal_refs":["data","datamode","MEMORY.INIT"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-data"},{"id":"syntax-elem","anchors":["syntax-elem","syntax-elemmode"],"title":"Element Segments","level":2,"path":"syntax/modules","prose":"The elem section of a module defines a list of element segments,\nwhich can be used to initialize a subrange of a table from a static list of elements.\n\nEach element segment defines a reference type and a corresponding list of constant element expressions.\n\nElement segments have a mode that identifies them as either active, passive, or declarative.\nA passive element segment's elements can be copied to a table using the TABLE.INIT instruction.\nAn active element segment copies its elements into a table during instantiation, as specified by a table index and a constant expression defining an offset into that table.\nA declarative element segment is not available at runtime but merely serves to forward-declare references that are formed in code with instructions like REF.FUNC.\nThe offset is given by another constant expression.\n\nElement segments are referenced through element indices.","crossrefs":["syntax-list","syntax-reftype","valid-constant","syntax-expr","exec-instantiation","syntax-tableidx","syntax-elemidx"],"formal_refs":["elem","elemmode","TABLE.INIT","REF.FUNC"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-elem"},{"id":"syntax-start","anchors":["syntax-start"],"title":"Start Function","level":2,"path":"syntax/modules","prose":"The start section of a module declares the function index of a start function that is automatically invoked when the module is instantiated, after tables and memories have been initialized.\n\n The start function is intended for initializing the state of a module.\n The module and its exports are not accessible externally before this initialization has completed.","crossrefs":["syntax-funcidx","exec-instantiation","syntax-table","syntax-mem"],"formal_refs":["start"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-start"},{"id":"syntax-importdesc","anchors":["syntax-importdesc","syntax-import"],"title":"Imports","level":2,"path":"syntax/modules","prose":"The import section of a module defines a set of imports that are required for instantiation.\n\nEach import is labeled by a two-level name space, consisting of a module name and an item name for an entity within that module.\nImportable definitions are\ntags,\nglobals,\nmemories,\ntables, and\nfunctions.\nEach import is specified by a respective external type that a definition provided during instantiation is required to match.\n\nEvery import defines an index in the respective index space.\nIn each index space, the indices of imports go before the first index of any definition contained in the module itself.\n\n Unlike export names, import names are not necessarily unique.\n It is possible to import the same module/item name pair multiple times;\n such imports may even have different type descriptions, including different kinds of entities.\n A module with such imports can still be instantiated depending on the specifics of how an embedder allows resolving and supplying imports.\n However, embedders are not required to support such overloading,\n and a WebAssembly module itself cannot implement an overloaded name.","crossrefs":["exec-instantiation","syntax-name","syntax-tag","syntax-global","syntax-mem","syntax-table","syntax-func","syntax-externtype","syntax-index","embedder"],"formal_refs":["import"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-importdesc"},{"id":"syntax-exportdesc","anchors":["syntax-exportdesc","syntax-export","syntax-externidx"],"title":"Exports","level":2,"path":"syntax/modules","prose":"The export section of a module defines a set of exports that become accessible to the host environment once the module has been instantiated.\n\nEach export is labeled by a unique name.\nExportable definitions are\ntags,\nglobals,\nmemories,\ntables, and\nfunctions,\nwhich are referenced through a respective index.","crossrefs":["exec-instantiation","syntax-name","syntax-tag","syntax-global","syntax-mem","syntax-table","syntax-func"],"formal_refs":["export","externidx"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html#syntax-exportdesc"},{"id":"syntax/modules-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/modules","prose":"The following auxiliary notation is defined for sequences of exports, filtering out indices of a specific kind in an order-preserving fashion:","crossrefs":[],"formal_refs":["funcsxx","tablesxx","memsxx","globalsxx","tagsxx"],"url":"https://webassembly.github.io/spec/core/syntax/modules.html"},{"id":"syntax/types-types","anchors":[],"title":"Types","level":1,"path":"syntax/types","prose":"Various entities in WebAssembly are classified by types.\nTypes are checked during validation, instantiation, and possibly execution.","crossrefs":["valid","exec-instantiation","syntax-call_indirect"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/syntax/types.html"},{"id":"syntax-numtype","anchors":["syntax-numtype"],"title":"Number Types","level":2,"path":"syntax/types","prose":"Number types classify numeric values.\n\nThe types I32 and I64 classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types F32 and F64 classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as single and double precision, as defined by the IEEE754 standard (Section 3.3).\n\nNumber types are transparent, meaning that their bit patterns can be observed.\nValues of number type can be stored in memories.","crossrefs":["syntax-mem"],"formal_refs":["numtype","I32","I64","F32","F64"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype"},{"id":"bitwidth-numtype","anchors":["bitwidth-numtype","bitwidth-valtype"],"title":"Conventions","level":3,"path":"syntax/types","prose":"The notation $size(t)` denotes the bit width* of a number type t.\n That is, $size(I32) $size(F32) and $size(I64) $size(F64).","crossrefs":[],"formal_refs":["size","$size(t)","t","$size(I32)","$size(F32)","$size(I64)","$size(F64)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#bitwidth-numtype"},{"id":"syntax-vectype","anchors":["syntax-vectype"],"title":"Vector Types","level":2,"path":"syntax/types","prose":"Vector types classify vectors of numeric values processed by vector instructions (also known as SIMD instructions, single instruction multiple data).\n\nThe type V128 corresponds to a 128 bit vector of packed integer or floating-point data. The packed data\ncan be interpreted as signed or unsigned integers, single or double precision floating-point\nvalues, or a single 128 bit type. The interpretation is determined by individual operations.\n\nVector types, like number types are transparent, meaning that their bit patterns can be observed.\nValues of vector type can be stored in memories.","crossrefs":["syntax-numtype","syntax-mem"],"formal_refs":["vectype","V128"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-vectype"},{"id":"bitwidth-vectype","anchors":["bitwidth-vectype"],"title":"Conventions","level":3,"path":"syntax/types","prose":"* The notation $vsize(t) for bit width extends to vector types as well, that is, $vsize(V128).","crossrefs":["bitwidth-numtype"],"formal_refs":["vsize","$vsize(t)","$vsize(V128)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#bitwidth-vectype"},{"id":"syntax-typeuse","anchors":["syntax-typeuse"],"title":"Type Uses","level":2,"path":"syntax/types","prose":"A type use is the use site of a type index referencing a composite type defined in a module.\nIt classifies objects of the respective type.\n\nThe syntax of type uses is extended with additional forms for the purpose of specifying validation and execution.","crossrefs":["syntax-typeidx","syntax-comptype","syntax-type","syntax-module","syntax-typeuse-ext","valid","exec"],"formal_refs":["typeuse/syn"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-typeuse"},{"id":"type-abstract","anchors":["type-abstract","type-concrete","syntax-i31","syntax-heaptype","syntax-absheaptype"],"title":"Heap Types","level":2,"path":"syntax/types","prose":"Heap types classify objects in the runtime store.\nThere are three disjoint hierarchies of heap types:\n\n- function types classify functions,\n- aggregate types classify dynamically allocated managed data, such as structures, arrays, or unboxed scalars,\n- external types classify external references possibly owned by the embedder.\n\nThe values from the latter two hierarchies are interconvertible by ways of the EXTERN.CONVERT_ANY and ANY.CONVERT_EXTERN instructions.\nThat is, both type hierarchies are inhabited by an isomorphic set of values, but may have different, incompatible representations in practice.\n\nA heap type is either abstract or concrete.\nA concrete heap type consists of a type use that classifies an object of the respective type defined in a module.\nAbstract types are denoted by individual keywords.\n\nThe type FUNC denotes the common supertype of all function types, regardless of their concrete definition.\nDually, the type NOFUNC denotes the common subtype of all function types, regardless of their concrete definition.\nThis type has no values.\n\nThe type EXN denotes the common supertype of all exception references.\nThis type has no concrete subtypes.\nDually, the type NOEXN denotes the common subtype of all forms of exception references.\nThis type has no values.\n\nThe type EXTERN denotes the common supertype of all external references received through the embedder.\nThis type has no concrete subtypes.\nDually, the type NOEXTERN denotes the common subtype of all forms of external references.\nThis type has no values.\n\nThe type ANY denotes the common supertype of all aggregate types, as well as possibly abstract values produced by internalizing an external reference of type EXTERN.\nDually, the type NONE denotes the common subtype of all forms of aggregate types.\nThis type has no values.\n\nThe type EQ is a subtype of ANY that includes all types for which references can be compared, i.e., aggregate values and I31.\n\nThe types STRUCT and ARRAY denote the common supertypes of all structure and array aggregates, respectively.\n\nThe type I31 denotes unboxed scalars, that is, integers injected into references.\nTheir observable value range is limited to 31 bits.\n\n Values of type I31 are not actually allocated in the store,\n but represented in a way that allows them to be mixed with actual references into the store without ambiguity.\n Engines need to perform some form of pointer tagging to achieve this,\n which is why one bit is reserved.\n Since this type is to be reliably unboxed on all hardware platforms supported by WebAssembly,\n it cannot be wider than 32 bits minus the tag bit.\n\n Although the types NONE, NOFUNC, NOEXN, and NOEXTERN are not inhabited by any values,\n they can be used to form the types of all null references in their respective hierarchy.\n For example, (REF NULL NOFUNC) is the generic type of a null reference compatible with all function reference types.\n\nThe syntax of abstract heap types is extended with additional forms for the purpose of specifying validation and execution.","crossrefs":["store","syntax-func","embedder","syntax-typeuse","syntax-type","syntax-functype","syntax-ref.exn","syntax-structtype","syntax-arraytype","syntax-reftype","syntax-heaptype-ext","valid","exec"],"formal_refs":["absheaptype/syn","heaptype","EXTERN.CONVERT_ANY","ANY.CONVERT_EXTERN","FUNC","NOFUNC","EXN","NOEXN","EXTERN","NOEXTERN","ANY","NONE","EQ","I31","STRUCT","ARRAY","(REF","NULL","NOFUNC)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#type-abstract"},{"id":"syntax-reftype","anchors":["syntax-reftype","syntax-null"],"title":"Reference Types","level":2,"path":"syntax/types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","crossrefs":["syntax-value","store","syntax-heaptype","syntax-null","syntax-table","syntax-mem"],"formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"id":"syntax/types-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/types","prose":"The reference type $ANYREF is an abbreviation for (REF NULL ANY).\n\n The reference type $EQREF is an abbreviation for (REF NULL EQ).\n\n The reference type $I31REF is an abbreviation for (REF NULL I31).\n\n The reference type $STRUCTREF is an abbreviation for (REF NULL STRUCT).\n\n The reference type $ARRAYREF is an abbreviation for (REF NULL ARRAY).\n\n The reference type $FUNCREF is an abbreviation for (REF NULL FUNC).\n\n The reference type $EXNREF is an abbreviation for (REF NULL EXN).\n\n The reference type $EXTERNREF is an abbreviation for (REF NULL EXTERN).\n\n The reference type $NULLREF is an abbreviation for (REF NULL NONE).\n\n The reference type $NULLFUNCREF is an abbreviation for (REF NULL NOFUNC).\n\n The reference type $NULLEXNREF is an abbreviation for (REF NULL NOEXN).\n\n The reference type $NULLEXTERNREF is an abbreviation for (REF NULL NOEXTERN).","crossrefs":[],"formal_refs":["$ANYREF","(REF","NULL","ANY)","$EQREF","EQ)","$I31REF","I31)","$STRUCTREF","STRUCT)","$ARRAYREF","ARRAY)","$FUNCREF","FUNC)","$EXNREF","EXN)","$EXTERNREF","EXTERN)","$NULLREF","NONE)","$NULLFUNCREF","NOFUNC)","$NULLEXNREF","NOEXN)","$NULLEXTERNREF","NOEXTERN)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html"},{"id":"syntax-valtype","anchors":["syntax-valtype","syntax-consttype"],"title":"Value Types","level":2,"path":"syntax/types","prose":"Value types classify the individual values that WebAssembly code can compute with and the values that a variable accepts.\nThey are either number types, vector types, or reference types.\n\nThe syntax of value types is extended with additional forms for the purpose of specifying validation.","crossrefs":["syntax-numtype","syntax-vectype","syntax-reftype","syntax-valtype-ext","valid"],"formal_refs":["consttype","valtype/syn"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-valtype"},{"id":"syntax/types-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/types","prose":"* The meta variable t ranges over value types or subclasses thereof where clear from context.","crossrefs":[],"formal_refs":["t"],"url":"https://webassembly.github.io/spec/core/syntax/types.html"},{"id":"syntax-resulttype","anchors":["syntax-resulttype"],"title":"Result Types","level":2,"path":"syntax/types","prose":"Result types classify the result of executing instructions or functions,\nwhich is a sequence of values, written with brackets.","crossrefs":["exec-instr","syntax-instr","syntax-func"],"formal_refs":["resulttype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-resulttype"},{"id":"syntax-blocktype","anchors":["syntax-blocktype"],"title":"Block Types","level":2,"path":"syntax/types","prose":"Block types classify the input and output of structured control instructions delimiting blocks of instructions.\n\nThey are given either as a type index that refers to a suitable function type reinterpreted as an instruction type,\nor as an optional value type inline,\nwhich is a shorthand for the instruction type eps valtype?.","crossrefs":["syntax-instr-control","syntax-block","syntax-funcidx","syntax-functype","syntax-instrtype","syntax-valtype"],"formal_refs":["blocktype","eps","valtype?"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-blocktype"},{"id":"syntax-comptype","anchors":["syntax-comptype","syntax-functype","syntax-aggrtype","syntax-structtype","syntax-arraytype","syntax-fieldtype","syntax-storagetype","syntax-packtype"],"title":"Composite Types","level":2,"path":"syntax/types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","crossrefs":["syntax-func","syntax-instr"],"formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"id":"bitwidth-fieldtype","anchors":["bitwidth-fieldtype","aux-unpack"],"title":"Conventions","level":3,"path":"syntax/types","prose":"The notation $psize(t) for the bit width of a value type t extends to packed types as well, that is, $psize(I8) and $psize(I16).\n\n The auxiliary function \\unpack maps a storage type to the value type obtained when accessing a field:","crossrefs":["bitwidth-valtype","syntax-valtype"],"formal_refs":["psize","unpack","$psize(t)","t","$psize(I8)","$psize(I16)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#bitwidth-fieldtype"},{"id":"syntax-rectype","anchors":["syntax-rectype","syntax-subtype","syntax-final"],"title":"Recursive Types","level":2,"path":"syntax/types","prose":"Recursive types denote a group of mutually recursive composite types, each of which can optionally declare a list of type uses of supertypes that it matches.\nEach type can also be declared final, preventing further subtyping.\n\nIn a module, each member of a recursive type is assigned a separate type index.\n\n.. _index:: ! address type, number type, bit width\n pair: abstract syntax; address type\n single: memory; address type\n single: table; address type","crossrefs":["syntax-comptype","syntax-typeuse","match-comptype","syntax-module","syntax-typeidx"],"formal_refs":["rectype","subtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-rectype"},{"id":"syntax-addrtype","anchors":["syntax-addrtype"],"title":"Address Types","level":2,"path":"syntax/types","prose":"Address types are a subset of number types that classify the values that can be used as offsets into\nmemories and tables.","crossrefs":["syntax-numtype","syntax-mem","syntax-table"],"formal_refs":["addrtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-addrtype"},{"id":"aux-addrtype-min","anchors":["aux-addrtype-min"],"title":"Conventions","level":3,"path":"syntax/types","prose":"The minimum of two address types is defined as the address type whose bit width is the minimum of the two.","crossrefs":["bitwidth-numtype"],"formal_refs":["minat"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#aux-addrtype-min"},{"id":"syntax-limits","anchors":["syntax-limits"],"title":"Limits","level":2,"path":"syntax/types","prose":"Limits classify the size range of resizeable storage associated with memory types and table types.\n\nIf no maximum is present,\nthen the respective storage can grow to any valid size.","crossrefs":["syntax-memtype","syntax-tabletype"],"formal_refs":["limits"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-limits"},{"id":"syntax-tagtype","anchors":["syntax-tagtype"],"title":"Tag Types","level":2,"path":"syntax/types","prose":"Tag types classify the signature tags\nwith a type use referring to the definition of a function type that declares the types of parameter and result values associated with the tag.\nThe result type is empty for exception tags.","crossrefs":["syntax-tag","syntax-typeuse","syntax-functype"],"formal_refs":["tagtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-tagtype"},{"id":"syntax-mut","anchors":["syntax-mut","syntax-globaltype"],"title":"Global Types","level":2,"path":"syntax/types","prose":"Global types classify global variables, which hold a value and can either be mutable or immutable.","crossrefs":["syntax-global"],"formal_refs":["globaltype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-mut"},{"id":"syntax-memtype","anchors":["syntax-memtype"],"title":"Memory Types","level":2,"path":"syntax/types","prose":"Memory types classify linear memories and their size range.\n\nThe limits constrain the minimum and optionally the maximum size of a memory.\nThe limits are given in units of page size.","crossrefs":["syntax-mem","page-size"],"formal_refs":["memtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-memtype"},{"id":"syntax-tabletype","anchors":["syntax-tabletype"],"title":"Table Types","level":2,"path":"syntax/types","prose":"Table types classify tables over elements of reference type within a size range.\n\nLike memories, tables are constrained by limits for their minimum and optionally maximum size.\nThe limits are given in numbers of entries.","crossrefs":["syntax-table","syntax-reftype"],"formal_refs":["tabletype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-tabletype"},{"id":"syntax-datatype","anchors":["syntax-datatype"],"title":"Data Types","level":2,"path":"syntax/types","prose":"Data types classify data segments.\nSince the contents of a data segment requires no further classification, they merely consist of a universal marker OK indicating well-formedness.","crossrefs":["syntax-elem"],"formal_refs":["datatype","OK"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-datatype"},{"id":"syntax-elemtype","anchors":["syntax-elemtype"],"title":"Element Types","level":2,"path":"syntax/types","prose":"Element types classify element segments by the reference type of its elements.","crossrefs":["syntax-elem","syntax-reftype"],"formal_refs":["elemtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-elemtype"},{"id":"syntax-externtype","anchors":["syntax-externtype"],"title":"External Types","level":2,"path":"syntax/types","prose":"External types classify imports and external addresses with their respective types.\n\nFor functions, the type use has to refer to the definition of a function type.\n\n Future versions of WebAssembly may have additional uses for tags, and may allow non-empty result types in the function types of tags.","crossrefs":["syntax-import","syntax-externaddr","syntax-typeuse","syntax-functype"],"formal_refs":["externtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-externtype"},{"id":"syntax/types-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/types","prose":"The following auxiliary notation is defined for sequences of external types.\nIt filters out entries of a specific kind in an order-preserving fashion:","crossrefs":[],"formal_refs":["funcsxt","tablesxt","memsxt","globalsxt","tagsxt"],"url":"https://webassembly.github.io/spec/core/syntax/types.html"},{"id":"syntax-value","anchors":["syntax-value"],"title":"Values","level":1,"path":"syntax/values","prose":"WebAssembly programs operate on primitive numeric values.\nMoreover, in the definition of programs, immutable sequences of values occur to represent more complex data, such as text strings or other vectors.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-value"},{"id":"syntax-byte","anchors":["syntax-byte"],"title":"Bytes","level":2,"path":"syntax/values","prose":"The simplest form of value are raw uninterpreted bytes.\nIn the abstract syntax they are represented as hexadecimal literals.","crossrefs":[],"formal_refs":["byte"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-byte"},{"id":"syntax/values-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/values","prose":"The meta variable b ranges over bytes.\n\n Bytes are sometimes interpreted as natural numbers n`.","crossrefs":[],"formal_refs":["b","n"],"url":"https://webassembly.github.io/spec/core/syntax/values.html"},{"id":"syntax-sint","anchors":["syntax-sint","syntax-uint","syntax-int"],"title":"Integers","level":2,"path":"syntax/values","prose":"Different classes of integers with different value ranges are distinguished by their bit width N and by whether they are unsigned or signed.\n\nThe class iN defines uninterpreted integers, whose signedness interpretation can vary depending on context.\nIn the abstract syntax, they are represented as unsigned values.\nHowever, some operations convert them to signed based on a two's complement interpretation.\n\n The main integer types occurring in this specification are u8, u32, u64, and u128.\n However, other sizes occur as auxiliary constructions, e.g., in the definition of floating-point numbers.\n\nu8 u16 u31 u32 u64 s33 i32 i64 i128","crossrefs":["aux-signed","syntax-float"],"formal_refs":["uN","sN","iN","N","u8","u32","u64","u128","u16","u31","s33","i32","i64","i128"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-sint"},{"id":"syntax/values-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/values","prose":"The meta variables m, n, i, j range over integers.\n\n Numbers may be denoted by simple arithmetics, as in the grammar above.\n In order to distinguish arithmetics like 2^N from sequences like (1)^N, the latter is distinguished with parentheses.","crossrefs":[],"formal_refs":["m","n","i","j","2^N","(1)^N"],"url":"https://webassembly.github.io/spec/core/syntax/values.html"},{"id":"syntax-nan","anchors":["syntax-nan","syntax-payload","syntax-float"],"title":"Floating-Point","level":2,"path":"syntax/values","prose":"Floating-point data represents 32 or 64 bit values that correspond to the respective binary formats of the IEEE754 standard (Section 3.3).\n\nEvery value has a sign and a magnitude.\nMagnitudes can either be expressed as normal numbers of the form m_0`. m_1 m_2`... $(m_M 2^e), where e is the exponent and m is the significand whose most significant bit m_0 is `,\nor as a subnormal number where the exponent is fixed to the smallest possible value and m_0 is ; among the subnormals are positive and negative zero values.\nSince the significands are binary values, normals are represented in the form m2^(-M)) 2^e) in the abstract syntax, where M is the bit width of m; similarly for subnormals.\n\nPossible magnitudes also include the special values infinity` (infinity) and NAN (NaN, not a number).\nNaN values have a payload that describes the mantissa bits in the underlying binary representation.\nNo distinction is made between signalling and quiet NaNs.\n\nexp","crossrefs":["aux-fbits"],"formal_refs":["fN","fNmag","m_0`.","m_1","m_2`...","$(m_M","*2^e)","e","m","m_0","m*2^(-M))","2^e)","M","infinity","NAN","exp"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-nan"},{"id":"aux-signif","anchors":["aux-signif","aux-expon"],"title":null,"level":0,"path":"syntax/values","prose":"where M and E with\n\nf32 f64","crossrefs":[],"formal_refs":["signif","expon","M","E","f32","f64"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#aux-signif"},{"id":"canonical-nan","anchors":["canonical-nan","arithmetic-nan","aux-canon"],"title":null,"level":0,"path":"syntax/values","prose":"A canonical NaN is a floating-point value +-NAN#(($canon_(N))) where $canon_(N) is a payload whose most significant bit is while all others are :\n\nAn arithmetic NaN is a floating-point value +-NAN#((m)) with m $canon_(N), such that the most significant bit is while all others are arbitrary.\n\n In the abstract syntax, subnormals are distinguished by the leading of the significand. The exponent of subnormals has the same value as the smallest possible exponent of a normal number. Only in the binary representation the exponent of a subnormal is encoded differently than the exponent of any normal number.\n\n The notion of canonical NaN defined here is unrelated to the notion of canonical NaN that the IEEE754 standard (Section 3.5.2) defines for decimal interchange formats.","crossrefs":["binary-float"],"formal_refs":["canon_","+-NAN#(($canon_(N)))","$canon_(N)","+-NAN#((m))","m"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#canonical-nan"},{"id":"syntax/values-conventions","anchors":[],"title":"Conventions","level":3,"path":"syntax/values","prose":"The meta variable z ranges over floating-point values where clear from context.\n\n Where clear from context, shorthands like denote floating point values like POS $($(NORM.","crossrefs":[],"formal_refs":["z","POS","$($(NORM"],"url":"https://webassembly.github.io/spec/core/syntax/values.html"},{"id":"syntax-vecnum","anchors":["syntax-vecnum"],"title":"Vectors","level":2,"path":"syntax/values","prose":"Numeric vectors are 128-bit values that are processed by vector instructions (also known as SIMD instructions, single instruction multiple data).\nThey are represented in the abstract syntax using u128. The interpretation of lane types (integer or floating-point numbers) and lane sizes are determined by the specific instruction operating on them.","crossrefs":["syntax-int","syntax-float"],"formal_refs":["u128"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-vecnum"},{"id":"syntax-char","anchors":["syntax-char","syntax-name"],"title":"Names","level":2,"path":"syntax/values","prose":"Names are sequences of characters, which are scalar values as defined by Unicode (Section 2.4).\n\nDue to the limitations of the binary format,\nthe length of a name is bounded by the length of its UTF-8 encoding.","crossrefs":["binary-name","binary-utf8"],"formal_refs":["name","char"],"url":"https://webassembly.github.io/spec/core/syntax/values.html#syntax-char"},{"id":"syntax/values-convention","anchors":[],"title":"Convention","level":3,"path":"syntax/values","prose":"* Characters (Unicode scalar values) are sometimes used interchangeably with natural numbers n.","crossrefs":[],"formal_refs":["n"],"url":"https://webassembly.github.io/spec/core/syntax/values.html"},{"id":"text/conventions-conventions","anchors":[],"title":"Conventions","level":1,"path":"text/conventions","prose":"The textual format for WebAssembly modules is a rendering of their abstract syntax into SExpressions.\n\nLike the binary format, the text format is defined by an attribute grammar.\nA text string is a well-formed description of a module if and only if it is generated by the grammar.\nEach production of this grammar has at most one synthesized attribute: the abstract syntax that the respective character sequence expresses.\nThus, the attribute grammar implicitly defines a parsing function.\nSome productions also take a context as an inherited attribute\nthat records bound identifiers.\n\nExcept for a few exceptions, the core of the text grammar closely mirrors the grammar of the abstract syntax.\nHowever, it also defines a number of abbreviations that are \"syntactic sugar\" over the core syntax.\n\nThe recommended extension for files containing WebAssembly modules in text format is \".wat\".\nFiles with this extension are assumed to be encoded in UTF-8, as per Unicode (Section 2.5).","crossrefs":["module","syntax-module","binary","text-context","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/conventions.html"},{"id":"text-grammar","anchors":["text-grammar"],"title":"Grammar","level":2,"path":"text/conventions","prose":"The following conventions are adopted in defining grammar rules of the text format.\nThey mirror the conventions used for abstract syntax and for the binary format.\nIn order to distinguish symbols of the textual syntax from symbols of the abstract syntax, Ttypewriter font is adopted for the former.\n\n Terminal symbols are either literal strings of characters enclosed in quotes\n or expressed as Unicode scalar values: \"module\", U+0A.\n (All characters written literally are unambiguously drawn from the 7-bit ASCII subset of Unicode.)\n\n Nonterminal symbols are written in typewriter font: Tvaltype, Tinstr.\n\n $(T)^n is a sequence of n>=0 iterations of T.\n\n $(T) is a possibly empty sequence of iterations of T.\n (This is a shorthand for $(T)^n used where n is not relevant.)\n\n $(T)+ is a non-empty sequence of iterations of T.\n (This is a shorthand for $(T)^n where n.)\n\n $(T)? is an optional occurrence of T.\n (This is a shorthand for $(T)^n where n<=1.)\n\n x:$(T) denotes the same language as the nonterminal T, but also binds the variable x to the attribute synthesized for T.\n A pattern may also be used instead of a variable, e.g., 7:$(T).\n\n Productions are written Tsym, where each A_i is the attribute that is synthesized for Tsym in the given case, usually from attribute variables bound in T_i.\n\n Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, Tsymsplit/1, and starting continuations with ellipses, Tsymsplit/2.\n\n Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases.\n\n If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation.","crossrefs":["grammar","binary"],"formal_refs":["Ttypewriter","\"module\"","U+0A","Tvaltype","Tinstr","$(T)^n","n>=0","T","$(T)*","n","$(T)+","$(T)?","n<=1","x:$(T)","x","7:$(T)","Tsym","A_i","T_i","Tsymsplit/1","Tsymsplit/2"],"url":"https://webassembly.github.io/spec/core/text/conventions.html#text-grammar"},{"id":"text-syntactic","anchors":["text-syntactic"],"title":null,"level":0,"path":"text/conventions","prose":"A distinction is made between lexical and syntactic* productions. For the latter, arbitrary white space is allowed in any place where the grammar contains spaces. The productions defining lexical syntax and the syntax of values are considered lexical, all others are syntactic.\n\n For example, the textual grammar for number types is given as follows:\n\n \n\n The textual grammar for limits is defined as follows: \n\n \n\n The variables n and m name the attributes of the respective Tu64 nonterminals, which in this case are the actual unsigned integers those parse into.\n The attribute of the complete production then is the abstract syntax for the limit, expressed in terms of the former values.","crossrefs":["text-space","text-lexical","text-value","text-numtype","syntax-numtype","text-limits","syntax-limits","syntax-uint"],"formal_refs":["Tnumtype","Tlimits","n","m","Tu64"],"url":"https://webassembly.github.io/spec/core/text/conventions.html#text-syntactic"},{"id":"text-abbreviations","anchors":["text-abbreviations"],"title":"Abbreviations","level":2,"path":"text/conventions","prose":"In addition to the core grammar, which corresponds directly to the abstract syntax, the textual syntax also defines a number of abbreviations that can be used for convenience and readability.\n\nAbbreviations are defined by rewrite rules specifying their expansion into the core syntax:\n\nThese expansions are assumed to be applied, recursively and in order of appearance, before applying the core grammar rules to construct the abstract syntax.","crossrefs":["syntax"],"formal_refs":["Tabbrev"],"url":"https://webassembly.github.io/spec/core/text/conventions.html#text-abbreviations"},{"id":"text-context-wf","anchors":["text-context-wf","text-context"],"title":"Contexts","level":2,"path":"text/conventions","prose":"The text format allows the use of symbolic identifiers in place of indices.\nTo resolve these identifiers into concrete indices,\nsome grammar productions are indexed by an identifier context I as a synthesized attribute that records the declared identifiers in each index space.\nIn addition, the context records the types defined in the module, so that parameter indices can be computed for functions.\n\nIt is convenient to define identifier contexts as records I with abstract syntax as follows:\n\nFor each index space, such a context contains the list of names assigned to the defined indices,\nwhich were denoted by the corresponding identifiers.\nUnnamed indices are associated with empty (eps) entries in these lists.\nFields have dependent name spaces, and hence a separate list of field identifiers per type.\n\nIn addition, the field TYPEDEFS records the defined type associated with each type index.\nThey are needed to look up the number of parameters of function types when used in a function definition,\nin order to produce the correct indices for locals.\n\nAn identifier context is well-formed if no index space contains duplicate identifiers.\nFor fields, names need only be unique within a single type.","crossrefs":["text-id","syntax-index","text-param","text-func","notation-record","syntax-name","syntax-deftype","syntax-typeidx","syntax-functype","syntax-local"],"formal_refs":["idctxt","I","eps","TYPEDEFS"],"url":"https://webassembly.github.io/spec/core/text/conventions.html#text-context-wf"},{"id":"text/conventions-conventions","anchors":[],"title":"Conventions","level":3,"path":"text/conventions","prose":"To avoid unnecessary clutter, empty components are omitted when writing out identifier contexts.\nFor example, the record is shorthand for an identifier context whose components are all empty.","crossrefs":["text-context"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/conventions.html"},{"id":"text-list","anchors":["text-list"],"title":"Lists","level":2,"path":"text/conventions","prose":"Lists are written as plain sequences, but with a restriction on the length of these sequence.","crossrefs":["syntax-list"],"formal_refs":["Tlist"],"url":"https://webassembly.github.io/spec/core/text/conventions.html#text-list"},{"id":"text","anchors":["text"],"title":"Text Format","level":1,"path":"text/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/index.html#text"},{"id":"text-instr","anchors":["text-instr","text-instrs"],"title":"Instructions","level":1,"path":"text/instructions","prose":"Instructions are syntactically distinguished into plain and structured instructions.\n\nIn addition, as a syntactic abbreviation, instructions can be written as S-expressions in folded form, to group them visually.","crossrefs":["text-foldedinstr"],"formal_refs":["Tinstr_","Tinstrs_/unfolded"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr"},{"id":"text-label","anchors":["text-label"],"title":"Labels","level":2,"path":"text/instructions","prose":"Structured control instructions can be annotated with a symbolic label identifier.\nThey are the only symbolic identifiers that can be bound locally in an instruction sequence.\nThe following grammar handles the corresponding update to the identifier context by composing the context with an additional label entry.\n\n The new label entry is inserted at the beginning of the label list in the identifier context.\n This effectively shifts all existing labels up by one,\n mirroring the fact that control instructions are indexed relatively not absolutely.\n\n If a label with the same name already exists,\n then it is shadowed and the earlier label becomes inaccessible.","crossrefs":["text-instr-control","text-id","text-index","text-context","notation-compose"],"formal_refs":["Tlabel_"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-label"},{"id":"text-instr-parametric","anchors":["text-instr-parametric"],"title":"Parametric Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-parametric"},{"id":"text-drop","anchors":["text-drop","text-select"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/parametric"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-drop"},{"id":"text-blockinstr","anchors":["text-blockinstr","text-plaininstr","text-instr-control"],"title":"Control Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-blockinstr"},{"id":"text-blocktype","anchors":["text-blocktype","text-block","text-loop","text-if","text-instr-block","text-try_table","text-catch"],"title":null,"level":0,"path":"text/instructions","prose":"Structured control instructions can bind an optional symbolic label identifier.\nThe same label identifier may optionally be repeated after the corresponding \"end\" or \"else\" keywords, to indicate the matching delimiters.\n\nTheir block type is given as a type use, analogous to the type of functions.\nHowever, the special case of a type use that is syntactically empty or consists of only a single result is not regarded as an abbreviation for an inline function type, but is parsed directly into an optional value type.\n\n The side condition stating that the identifier context I' must only contain unnamed entries in the rule for Ttypeuse block types enforces that no identifier can be bound in any Tparam declaration for a block type.","crossrefs":["syntax-instr-control","text-label","syntax-blocktype","text-typeuse","text-func","text-result","text-typeuse-abbrev","syntax-functype","syntax-valtype","text-context"],"formal_refs":["Tblocktype_","Tblockinstr_/plain","Tcatch_","\"end\"","\"else\"","I'","Ttypeuse","Tparam"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-blocktype"},{"id":"text-nop","anchors":["text-nop","text-unreachable","text-br","text-br_if","text-br_table","text-br_on_null","text-br_on_non_null","text-br_on_cast","text-br_on_cast_fail","text-return","text-call","text-call_ref","text-call_indirect","text-return_call","text-return_call_indirect","text-throw","text-throw_ref"],"title":null,"level":0,"path":"text/instructions","prose":"All other control instruction are represented verbatim.\n\n The side condition stating that the identifier context I' must only contain unnamed entries in the rule for CALLINDIRECT enforces that no identifier can be bound in any Tparam declaration appearing in the type annotation.","crossrefs":["text-context"],"formal_refs":["I'"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-nop"},{"id":"text/instructions-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/instructions","prose":"The \"else\" keyword of an \"if\" instruction can be omitted if the following instruction sequence is empty.\n\nAlso, for backwards compatibility, the table index to \"call_indirect\" and \"return_call_indirect\" can be omitted, defaulting to .","crossrefs":[],"formal_refs":["Tblockinstr_/abbrev","Tplaininstr_/func-abbrev","\"else\"","\"if\"","\"call_indirect\"","\"return_call_indirect\""],"url":"https://webassembly.github.io/spec/core/text/instructions.html"},{"id":"text-instr-variable","anchors":["text-instr-variable"],"title":"Variable Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-variable"},{"id":"text-local.get","anchors":["text-local.get","text-local.set","text-local.tee","text-global.get","text-global.set"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/local","Tplaininstr_/global"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-local.get"},{"id":"text-instr-table","anchors":["text-instr-table"],"title":"Table Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-table"},{"id":"text-table.get","anchors":["text-table.get","text-table.set","text-table.size","text-table.grow","text-table.fill","text-table.copy","text-table.init","text-elem.drop"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/table-plain","Tplaininstr_/elem"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-table.get"},{"id":"text/instructions-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/instructions","prose":"For backwards compatibility, all table indices may be omitted from table instructions, defaulting to .","crossrefs":["syntax-tableidx"],"formal_refs":["Tplaininstr_/table-abbrev"],"url":"https://webassembly.github.io/spec/core/text/instructions.html"},{"id":"text-instr-memory","anchors":["text-instr-memory"],"title":"Memory Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-memory"},{"id":"text-memarg","anchors":["text-memarg","text-laneidx","text-load","text-loadn","text-store","text-storen","text-memory.size","text-memory.grow","text-memory.fill","text-memory.copy","text-memory.init","text-data.drop"],"title":null,"level":0,"path":"text/instructions","prose":"The offset and alignment immediates to memory instructions are optional.\nThe offset defaults to , the alignment to the storage size of the respective memory access, which is its natural alignment.\nLexically, an Toffset or Talign_ phrase is considered a single keyword token, so no white space is allowed around the .","crossrefs":["text-keyword","text-space"],"formal_refs":["Tmemarg_","Toffset","Talign_","Tlaneidx","Tplaininstr_/memory-plain","Tplaininstr_/data"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-memarg"},{"id":"text/instructions-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/instructions","prose":"As an abbreviation, the memory index can be omitted in all memory instructions, defaulting to .","crossrefs":[],"formal_refs":["Tplaininstr_/memory-abbrev"],"url":"https://webassembly.github.io/spec/core/text/instructions.html"},{"id":"text-instr-ref","anchors":["text-instr-ref"],"title":"Reference Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-ref"},{"id":"text-ref.null","anchors":["text-ref.null","text-ref.func","text-ref.is_null","text-ref.as_non_null","text-ref.test","text-ref.cast"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/ref"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-ref.null"},{"id":"text-instr-aggr","anchors":["text-instr-aggr"],"title":"Aggregate Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-aggr"},{"id":"text-ref.i31","anchors":["text-ref.i31","text-i31.get_s","text-i31.get_u","text-struct.new","text-struct.new_default","text-struct.get","text-struct.get_s","text-struct.get_u","text-struct.set","text-array.new","text-array.new_default","text-array.new_fixed","text-array.new_elem","text-array.new_data","text-array.get","text-array.get_s","text-array.get_u","text-array.set","text-array.len","text-array.fill","text-array.copy","text-array.init_data","text-array.init_elem","text-any.convert_extern","text-extern.convert_any"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/i31","Tplaininstr_/struct","Tplaininstr_/array","Tplaininstr_/extern"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-ref.i31"},{"id":"text-instr-numeric","anchors":["text-instr-numeric"],"title":"Numeric Instructions","level":2,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-numeric"},{"id":"text-const","anchors":["text-const"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/num-const"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-const"},{"id":"text-testop","anchors":["text-testop","text-relop","text-unop","text-binop"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/num-test-i32","Tplaininstr_/num-rel-i32","Tplaininstr_/num-un-i32","Tplaininstr_/num-bin-i32","Tplaininstr_/num-test-i64","Tplaininstr_/num-rel-i64","Tplaininstr_/num-un-i64","Tplaininstr_/num-bin-i64","Tplaininstr_/num-rel-f32","Tplaininstr_/num-un-f32","Tplaininstr_/num-bin-f32","Tplaininstr_/num-rel-f64","Tplaininstr_/num-un-f64","Tplaininstr_/num-bin-f64"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-testop"},{"id":"text-cvtop","anchors":["text-cvtop"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/num-cvt-i32","Tplaininstr_/num-cvt-i64","Tplaininstr_/num-cvt-f32","Tplaininstr_/num-cvt-f64","Tplaininstr_/num-cvt-reinterpret"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-cvtop"},{"id":"text-instr-vec","anchors":["text-instr-vec"],"title":"Vector Instructions","level":2,"path":"text/instructions","prose":"Vector constant instructions have a mandatory shape descriptor, which determines how the following values are parsed.","crossrefs":["syntax-shape"],"formal_refs":["Tplaininstr_/vec-const","Tplaininstr_/vec-shuffle","Tplaininstr_/vec-splat","Tplaininstr_/vec-lane"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-instr-vec"},{"id":"text-vvunop","anchors":["text-vvunop","text-vvbinop","text-vvternop","text-vitestop","text-virelop","text-vfrelop","text-viunop","text-vfunop","text-vibinop","text-vfbinop","text-vishiftop"],"title":null,"level":0,"path":"text/instructions","prose":"","crossrefs":[],"formal_refs":["Tplaininstr_/vec-test-v128","Tplaininstr_/vec-un-v128","Tplaininstr_/vec-bin-v128","Tplaininstr_/vec-tern-v128","Tplaininstr_/vec-test-i8x16","Tplaininstr_/vec-rel-i8x16","Tplaininstr_/vec-un-i8x16","Tplaininstr_/vec-bin-i8x16","Tplaininstr_/vec-tern-i8x16","Tplaininstr_/vec-shift-i8x16","Tplaininstr_/vec-bitmask-i8x16","Tplaininstr_/vec-narrow-i8x16","Tplaininstr_/vec-test-i16x8","Tplaininstr_/vec-rel-i16x8","Tplaininstr_/vec-un-i16x8","Tplaininstr_/vec-bin-i16x8","Tplaininstr_/vec-tern-i16x8","Tplaininstr_/vec-shift-i16x8","Tplaininstr_/vec-bitmask-i16x8","Tplaininstr_/vec-narrow-i16x8","Tplaininstr_/vec-test-i32x4","Tplaininstr_/vec-rel-i32x4","Tplaininstr_/vec-un-i32x4","Tplaininstr_/vec-bin-i32x4","Tplaininstr_/vec-tern-i32x4","Tplaininstr_/vec-shift-i32x4","Tplaininstr_/vec-bitmask-i32x4","Tplaininstr_/vec-narrow-i32x4","Tplaininstr_/vec-test-i64x2","Tplaininstr_/vec-rel-i64x2","Tplaininstr_/vec-un-i64x2","Tplaininstr_/vec-bin-i64x2","Tplaininstr_/vec-tern-i64x2","Tplaininstr_/vec-shift-i64x2","Tplaininstr_/vec-bitmask-i64x2","Tplaininstr_/vec-rel-f32x4","Tplaininstr_/vec-un-f32x4","Tplaininstr_/vec-bin-f32x4","Tplaininstr_/vec-tern-f32x4","Tplaininstr_/vec-rel-f64x2","Tplaininstr_/vec-un-f64x2","Tplaininstr_/vec-bin-f64x2","Tplaininstr_/vec-tern-f64x2","Tplaininstr_/vec-cvt-i16x8","Tplaininstr_/vec-cvt-i32x4","Tplaininstr_/vec-cvt-i64x2","Tplaininstr_/vec-cvt-f32x4","Tplaininstr_/vec-cvt-f64x2","Tplaininstr_/vec-extun-i16x8","Tplaininstr_/vec-extbin-i16x8","Tplaininstr_/vec-extun-i32x4","Tplaininstr_/vec-extbin-i32x4","Tplaininstr_/vec-exttern-i32x4","Tplaininstr_/vec-extbin-i64x2"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-vvunop"},{"id":"text-foldedinstr","anchors":["text-foldedinstr"],"title":"Folded Instructions","level":2,"path":"text/instructions","prose":"Instructions can be written as S-expressions by grouping them into folded form. In that notation, an instruction is wrapped in parentheses and optionally includes nested folded instructions to indicate its operands.\n\nIn the case of block instructions, the folded form omits the \"end\" delimiter.\nFor IF instructions, both branches have to be wrapped into nested S-expressions, headed by the keywords \"then\" and \"else\".\n\nThe set of all phrases defined by the following abbreviations recursively forms the auxiliary syntactic class Tfoldedinstr.\nSuch a folded instruction can appear anywhere a regular instruction can.\n\n.. MathJax doesn't handle LaTex multicolumns, thus the spacing hack in the following formula.\n\n For example, the instruction sequence\n\n .. math::\n \\mathtt{(local.get~\\$x)~(i32.const~2)~i32.add~(i32.const~3)~i32.mul}\n\n can be folded into\n\n .. math::\n \\mathtt{(i32.mul~(i32.add~(local.get~\\$x)~(i32.const~2))~(i32.const~3))}\n\n Folded instructions are solely syntactic sugar,\n no additional syntactic or type-based checking is implied.","crossrefs":["text-instr-block"],"formal_refs":["Tfoldedinstr_","\"end\"","IF","\"then\"","\"else\"","Tfoldedinstr"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-foldedinstr"},{"id":"text-expr","anchors":["text-expr"],"title":"Expressions","level":2,"path":"text/instructions","prose":"Expressions are written as instruction sequences.","crossrefs":[],"formal_refs":["Texpr_"],"url":"https://webassembly.github.io/spec/core/text/instructions.html#text-expr"},{"id":"text-lexical","anchors":["text-lexical"],"title":"Lexical Format","level":1,"path":"text/lexical","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/lexical.html#text-lexical"},{"id":"source","anchors":["source","text-source","text-char"],"title":"Characters","level":2,"path":"text/lexical","prose":"The text format assigns meaning to source text, which consists of a sequence of characters.\nCharacters are assumed to be represented as valid Unicode (Section 2.4) scalar values.\n\n While source text may contain any Unicode character in comments or string literals,\n the rest of the grammar is formed exclusively from the characters supported by the 7-bit ASCII subset of Unicode.","crossrefs":["text-comment","text-string"],"formal_refs":["Tsource","Tchar"],"url":"https://webassembly.github.io/spec/core/text/lexical.html#source"},{"id":"text-keyword","anchors":["text-keyword","text-reserved","text-token"],"title":"Tokens","level":2,"path":"text/lexical","prose":"The character stream in the source text is divided, from left to right, into a sequence of tokens, as defined by the following grammar.\n\nTokens are formed from the input character stream according to the longest match rule.\nThat is, the next token always consists of the longest possible sequence of characters that is recognized by the above lexical grammar.\nTokens can be separated by white space,\nbut except for strings, they cannot themselves contain whitespace.\n\nKeyword tokens always start with a lower-case letter.\nThe set of keywords is defined implicitly:\nonly those tokens are defined to be keywords that occur as a terminal symbol in literal form, such as \"keyword\", in a syntactic production of this chapter.\n\nAny token that does not fall into any of the other categories is considered reserved, and cannot occur in source text.\n\n The effect of defining the set of reserved tokens is that all tokens must be separated by either parentheses, white space, or comments.\n For example, \"0$x\" is a single reserved token, as is \"\\\"a\\\"\\\"b\\\"\".\n Consequently, they are not recognized as two separate tokens and \"$x\", or \"\\\"a\\\"\" and \"\\\"b\\\"\", respectively, but instead disallowed.\n This property of tokenization is not affected by the fact that the definition of reserved tokens overlaps with other token classes.","crossrefs":["text-space","text-grammar","text-syntactic","text-comment"],"formal_refs":["Ttoken","Tkeyword","Treserved","\"keyword\"","\"0$x\"","\"\\\"a\\\"\\\"b\\\"\"","\"$x\"","\"\\\"a\\\"\"","\"\\\"b\\\"\""],"url":"https://webassembly.github.io/spec/core/text/lexical.html#text-keyword"},{"id":"text-space","anchors":["text-space","text-format","text-newline"],"title":"White Space","level":2,"path":"text/lexical","prose":"White space is any sequence of literal space characters, formatting characters, comments, or annotations.\nThe allowed formatting characters correspond to a subset of the ASCII format effectors, namely, horizontal tabulation (U+09), line feed (U+0A), and carriage return (U+0D).\n\nThe only relevance of white space is to separate tokens. It is otherwise ignored.","crossrefs":["text-comment","text-annot","text-token"],"formal_refs":["Tspace","Tformat","Tnewline","U+09","U+0A","U+0D"],"url":"https://webassembly.github.io/spec/core/text/lexical.html#text-space"},{"id":"text-comment","anchors":["text-comment","text-eof"],"title":"Comments","level":2,"path":"text/lexical","prose":"A comment can either be a line comment, started with a double semicolon and extending to the end of the line,\nor a block comment, enclosed in delimiters .\nBlock comments can be nested.\n\nHere, the pseudo token Teof indicates the end of the input.\nThe look-ahead restrictions on the productions for Tblockchar disambiguate the grammar such that only well-bracketed uses of block comment delimiters are allowed.\n\n Any formatting and control characters are allowed inside comments.","crossrefs":[],"formal_refs":["Tcomment","Tlinecomment","Tlinechar","Tblockcomment","Tblockchar","Teof"],"url":"https://webassembly.github.io/spec/core/text/lexical.html#text-comment"},{"id":"text-annot","anchors":["text-annot"],"title":"Annotations","level":2,"path":"text/lexical","prose":"An annotation is a bracketed token sequence headed by an annotation id of the form \"@id\" or .\nNo space is allowed between the opening parenthesis and this id.\nAnnotations are intended to be used for third-party extensions;\nthey can appear anywhere in a program but are ignored by the WebAssembly semantics itself, which treats them as white space.\n\nAnnotations can contain other parenthesized token sequences (including nested annotations), as long as they are well-nested.\nString literals and comments occurring in an annotation must also be properly nested and closed.\n\n The annotation id is meant to be an identifier categorising the extension, and plays a role similar to the name of a custom section.\n By convention, annotations corresponding to a custom section should use the custom section's name as an id.\n\n Implementations are expected to ignore annotations with ids that they do not recognize.\n On the other hand, they may impose restrictions on annotations that they do recognize, e.g., requiring a specific structure by superimposing a more concrete grammar.\n It is up to an implementation how it deals with errors in such annotations.","crossrefs":["text-space","text-string","text-comment","binary-customsec"],"formal_refs":["Tannot","Tannotid","\"@id\""],"url":"https://webassembly.github.io/spec/core/text/lexical.html#text-annot"},{"id":"text/modules-modules","anchors":[],"title":"Modules","level":1,"path":"text/modules","prose":"Modules consist of a sequence of declarations.\nThe grammar rules for each declaration construct produce a pair,\nconsisting of not just the abstract syntax representing the respective declaration,\nbut also an identifier context recording the new symbolic identifiers bound by the construct,\nfor use in the remainder of the module.","crossrefs":["text-decl","text-context","text-id"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"text-idx","anchors":["text-idx","text-typeidx","text-tagidx","text-globalidx","text-memidx","text-tableidx","text-funcidx","text-dataidx","text-elemidx","text-localidx","text-labelidx","text-fieldidx","text-index"],"title":"Indices","level":2,"path":"text/modules","prose":"Indices can be given either in raw numeric form or as symbolic identifiers when bound by a respective construct.\nSuch identifiers are looked up in the suitable space of the identifier context I.","crossrefs":["syntax-index","text-id","text-context"],"formal_refs":["Tidx_","Ttypeidx_","Ttagidx_","Tglobalidx_","Tmemidx_","Ttableidx_","Tfuncidx_","Tdataidx_","Telemidx_","Tlocalidx_","Tlabelidx_","Tfieldidx__","I"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-idx"},{"id":"text-types","anchors":["text-types"],"title":"Types","level":2,"path":"text/modules","prose":"A type definition consists of a recursive type.\nThe identifier context produced for the local bindings is further extended with the respective sequence of defined types that the recursive type generates.","crossrefs":["text-rectype","text-context","syntax-deftype"],"formal_refs":["Ttype_"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-types"},{"id":"text-tag","anchors":["text-tag"],"title":"Tags","level":2,"path":"text/modules","prose":"A tag definition can bind a symbolic tag identifier.","crossrefs":["text-id"],"formal_refs":["Ttag_"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-tag"},{"id":"text-tag-abbrev","anchors":["text-tag-abbrev"],"title":"Abbreviations","level":3,"path":"text/modules","prose":"Tags can be defined as imports or exports inline:\n\n The latter abbreviation can be applied repeatedly, if \"Texporttagdots_(I)\" contains additional export clauses.\n Consequently, a memory declaration can contain any number of exports, possibly followed by an import.","crossrefs":["text-import","text-export"],"formal_refs":["Timport_/abbrev-tag","Texporttag_","Texporttagdots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-tag-abbrev"},{"id":"text-global","anchors":["text-global"],"title":"Globals","level":2,"path":"text/modules","prose":"Global definitions can bind a symbolic global identifier.","crossrefs":["text-id"],"formal_refs":["Tglobal_"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-global"},{"id":"text-global-abbrev","anchors":["text-global-abbrev"],"title":"Abbreviations","level":3,"path":"text/modules","prose":"Globals can be defined as imports or exports inline:\n\n The latter abbreviation can be applied repeatedly, if \"Texportglobaldots_(I)\" contains additional export clauses.\n Consequently, a global declaration can contain any number of exports, possibly followed by an import.","crossrefs":["text-import","text-export"],"formal_refs":["Timport_/abbrev-global","Texportglobal_","Texportglobaldots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-global-abbrev"},{"id":"text-mem","anchors":["text-mem"],"title":"Memories","level":2,"path":"text/modules","prose":"Memory definitions can bind a symbolic memory identifier.","crossrefs":["text-id"],"formal_refs":["Tmem_"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-mem"},{"id":"text-mem-abbrev","anchors":["text-mem-abbrev"],"title":"Abbreviations","level":3,"path":"text/modules","prose":"A data segment can be given inline with a memory definition, in which case its offset is and the limits of the memory type are inferred from the length of the data, rounded up to page size:\n\nMemories can be defined as imports or exports inline:\n\n The latter abbreviation can be applied repeatedly, if \"Texportmemdots_(I)\" contains additional export clauses.\n Consequently, a memory declaration can contain any number of exports, possibly followed by an import.","crossrefs":["text-data","text-limits","text-memtype","page-size","text-import","text-export"],"formal_refs":["Tdatamem_","Timport_/abbrev-mem","Texportmem_","Texportmemdots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-mem-abbrev"},{"id":"text-table","anchors":["text-table"],"title":"Tables","level":2,"path":"text/modules","prose":"Table definitions can bind a symbolic table identifier.","crossrefs":["text-id"],"formal_refs":["Ttable_/plain"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-table"},{"id":"text-table-abbrev","anchors":["text-table-abbrev"],"title":"Abbreviations","level":3,"path":"text/modules","prose":"A table's initialization expression can be omitted, in which case it defaults to REF.NULL:\n\nAn element segment can be given inline with a table definition, in which case its offset is and the limits of the table type are inferred from the length of the given segment:\n\nTables can be defined as imports or exports inline:\n\n The latter abbreviation can be applied repeatedly, if \"Texporttabledots_(I)\" contains additional export clauses.\n Consequently, a table declaration can contain any number of exports, possibly followed by an import.","crossrefs":["text-expr","text-elem","text-limits","text-tabletype","text-import","text-export"],"formal_refs":["Ttable_/abbrev","Telemtable_","Timport_/abbrev-table","Texporttable_","REF.NULL","Texporttabledots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-table-abbrev"},{"id":"text-local","anchors":["text-local","text-func"],"title":"Functions","level":2,"path":"text/modules","prose":"Function definitions can bind a symbolic function identifier, and local identifiers for its parameters and locals.\n\n The well-formedness condition on I' ensures that parameters and locals do not contain duplicate identifiers.","crossrefs":["text-id","text-typeuse","text-context-wf"],"formal_refs":["Tfunc_","Tlocal_/plain","I'"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-local"},{"id":"text-func-abbrev","anchors":["text-func-abbrev"],"title":"Abbreviations","level":3,"path":"text/modules","prose":"Multiple anonymous locals may be combined into a single declaration:\n\nFunctions can be defined as imports or exports inline:\n\n The latter abbreviation can be applied repeatedly, if \"Texportfuncdots_(I)\" contains additional export clauses.\n Consequently, a function declaration can contain any number of exports, possibly followed by an import.","crossrefs":["text-import","text-export"],"formal_refs":["Tlocal_/abbrev","Timport_/abbrev-func","Texportfunc_","Texportfuncdots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-func-abbrev"},{"id":"text-datastring","anchors":["text-datastring","text-data","text-memuse"],"title":"Data Segments","level":2,"path":"text/modules","prose":"Data segments allow for an optional memory index to identify the memory to initialize.\nThe data is written as a string, which may be split up into a possibly empty sequence of individual string literals.","crossrefs":["text-memidx","text-string"],"formal_refs":["Tdata_","Tdatastring","Tmemuse_/plain","Toffset_/plain"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-datastring"},{"id":"text/modules-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/modules","prose":"As an abbreviation, a single folded instruction may occur in place of the offset of an active segment:\n\nAlso, a memory use can be omitted, defaulting to .\n\nAs another abbreviation, data segments may also be specified inline with memory definitions; see the respective section.","crossrefs":["text-foldedinstr","text-mem"],"formal_refs":["Toffset_/abbrev","Tmemuse_/abbrev"],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"text-elem","anchors":["text-elem","text-elemlist","text-elemexpr","text-tableuse"],"title":"Element Segments","level":2,"path":"text/modules","prose":"Element segments allow for an optional table index to identify the table to initialize.","crossrefs":["text-tableidx"],"formal_refs":["Telem_/plain","Telemlist_/plain","Telemexpr_/plain","Ttableuse_/plain"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-elem"},{"id":"text/modules-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/modules","prose":"As an abbreviation, a single folded instruction may occur in place of the offset of an active element segment or as an element expression:\n\nAlso, the element list may be written as just a sequence of function indices:\n\nA table use can be omitted, defaulting to .\n\nFurthermore, for backwards compatibility with earlier versions of WebAssembly, if the table use is omitted, the \"func\" keyword can be omitted as well.\n\nAs yet another abbreviation, element segments may also be specified inline with table definitions; see the respective section.","crossrefs":["text-foldedinstr","text-funcidx","text-table"],"formal_refs":["Telemexpr_/abbrev","Telemlist_/abbrev","Ttableuse_/abbrev","Telem_/abbrev","\"func\""],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"text-start","anchors":["text-start"],"title":"Start Function","level":2,"path":"text/modules","prose":"A start function is defined in terms of its index.\n\n At most one start function may occur in a module,\n which is ensured by a suitable side condition on the Tmodule grammar.","crossrefs":["syntax-start"],"formal_refs":["Tstart_","Tmodule"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-start"},{"id":"text-import","anchors":["text-import"],"title":"Imports","level":2,"path":"text/modules","prose":"The external type in imports can bind a symbolic tag, global, memory, or function identifier.","crossrefs":["syntax-externtype","text-id"],"formal_refs":["Timport_/plain"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-import"},{"id":"text/modules-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/modules","prose":"As an abbreviation, imports may also be specified inline with\ntag,\nglobal,\nmemory,\ntable, or\nfunction\ndefinitions; see the respective sections.","crossrefs":["text-tag","text-global","text-mem","text-table","text-func"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"text-externidx","anchors":["text-externidx","text-export"],"title":"Exports","level":2,"path":"text/modules","prose":"The syntax for exports mirrors their abstract syntax directly.","crossrefs":["syntax-export"],"formal_refs":["Texport_","Texternidx_"],"url":"https://webassembly.github.io/spec/core/text/modules.html#text-externidx"},{"id":"text/modules-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/modules","prose":"As an abbreviation, exports may also be specified inline with\ntag,\nglobal,\nmemory,\ntable, or\nfunction\ndefinitions; see the respective sections.","crossrefs":["text-tag","text-global","text-mem","text-table","text-func"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"syntax-decl","anchors":["syntax-decl","text-decl","text-module"],"title":"Modules","level":2,"path":"text/modules","prose":"A module consists of a sequence of declarations that can occur in any order.\n\nAll declarations and their respective bound identifiers scope over the entire module, including the text preceding them.\nA module itself may optionally bind an identifier that names the module.\nThe name serves a documentary role only.\n\n Tools may include the module name in the name section of the binary format.\n\nwhere $types(decl), $imports(decl), $tags(decl), etc., extract the sequence of types, imports, tags, etc., contained in decl, respectively.\nThe auxiliary predicate $ordered checks that no imports occur after the first definition of a\ntag,\nglobal,\nmemory,\ntable, or\nfunction\nin a sequence of declarations:","crossrefs":["text-id","binary-namesec","binary","syntax-type","syntax-import","syntax-tag","syntax-global","syntax-mem","syntax-table","syntax-func"],"formal_refs":["decl","Tdecl_","Tmodule/plain","$types(decl*)","$imports(decl*)","$tags(decl*)","decl*","$ordered"],"url":"https://webassembly.github.io/spec/core/text/modules.html#syntax-decl"},{"id":"aux-ordered","anchors":["aux-ordered"],"title":null,"level":0,"path":"text/modules","prose":"","crossrefs":[],"formal_refs":["ordered","typesd","importsd","tagsd","globalsd","memsd","tablesd","funcsd","datasd","elemsd","startsd","exportsd"],"url":"https://webassembly.github.io/spec/core/text/modules.html#aux-ordered"},{"id":"text/modules-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/modules","prose":"In a source file, the toplevel \"module\" Tdecldots_(I) surrounding the module body may be omitted.","crossrefs":[],"formal_refs":["Tmodule/abbrev","\"module\"","Tdecldots_(I)"],"url":"https://webassembly.github.io/spec/core/text/modules.html"},{"id":"text-type","anchors":["text-type"],"title":"Types","level":1,"path":"text/types","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/types.html#text-type"},{"id":"text-numtype","anchors":["text-numtype"],"title":"Number Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tnumtype"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-numtype"},{"id":"text-vectype","anchors":["text-vectype"],"title":"Vector Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tvectype"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-vectype"},{"id":"text-heaptype","anchors":["text-heaptype","text-absheaptype"],"title":"Heap Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tabsheaptype","Theaptype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-heaptype"},{"id":"text-reftype","anchors":["text-reftype","text-null"],"title":"Reference Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tnull","Treftype_/base"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-reftype"},{"id":"text/types-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/types","prose":"There are shorthands for references to abstract heap types.","crossrefs":[],"formal_refs":["Treftype_/abbrev"],"url":"https://webassembly.github.io/spec/core/text/types.html"},{"id":"text-valtype","anchors":["text-valtype"],"title":"Value Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tvaltype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-valtype"},{"id":"text-comptype","anchors":["text-comptype","text-aggrtype","text-structtype","text-arraytype","text-functype","text-param","text-result","text-fieldtype","text-storagetype","text-packtype"],"title":"Composite Types","level":2,"path":"text/types","prose":"Composite types are parsed into their respective abstract representation,\npaired with the local identifier context generated by their bound field or parameter identifiers:\n\n The optional identifier names for parameters in a function type only have documentation purpose.\n They cannot be referenced from anywhere.","crossrefs":["text-context"],"formal_refs":["Tcomptype_","Tfield_/base","Tparam_/base","Tresult_/base","Tfieldtype_","Tstoragetype_","Tpacktype"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-comptype"},{"id":"text/types-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/types","prose":"Multiple anonymous structure fields or parameters or multiple results may be combined into a single declaration:","crossrefs":[],"formal_refs":["Tfield_/abbrev","Tparam_/abbrev","Tresult_/abbrev"],"url":"https://webassembly.github.io/spec/core/text/types.html"},{"id":"text-rectype","anchors":["text-rectype","text-subtype","text-typedef","text-final"],"title":"Recursive Types","level":2,"path":"text/types","prose":"Recursive types are parsed into their respective abstract representation,\npaired with the identifier context generated by their bound identifiers:","crossrefs":["text-context"],"formal_refs":["Tfinal","Tsubtype_/base","Ttypedef_","Trectype_/base"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-rectype"},{"id":"text/types-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/types","prose":"Final sub types with no super-types can omit the \"sub\" keyword and its arguments:\n\nSimilarly, singular recursive types can omit the \"rec\" keyword:","crossrefs":[],"formal_refs":["Tsubtype_/abbrev","Trectype_/abbrev","\"sub\"","\"rec\""],"url":"https://webassembly.github.io/spec/core/text/types.html"},{"id":"text-addrtype","anchors":["text-addrtype"],"title":"Address Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Taddrtype/base"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-addrtype"},{"id":"text/types-abbreviations","anchors":[],"title":"Abbreviations","level":3,"path":"text/types","prose":"The address type can be omitted, in which case it defaults I32:","crossrefs":[],"formal_refs":["Taddrtype/abbrev","I32"],"url":"https://webassembly.github.io/spec/core/text/types.html"},{"id":"text-limits","anchors":["text-limits"],"title":"Limits","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tlimits"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-limits"},{"id":"text-tagtype","anchors":["text-tagtype"],"title":"Tag Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Ttagtype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-tagtype"},{"id":"text-globaltype","anchors":["text-globaltype"],"title":"Global Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tglobaltype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-globaltype"},{"id":"text-memtype","anchors":["text-memtype"],"title":"Memory Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Tmemtype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-memtype"},{"id":"text-tabletype","anchors":["text-tabletype"],"title":"Table Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Ttabletype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-tabletype"},{"id":"text-externtype","anchors":["text-externtype"],"title":"External Types","level":2,"path":"text/types","prose":"","crossrefs":[],"formal_refs":["Texterntype_"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-externtype"},{"id":"text-typeuse","anchors":["text-typeuse"],"title":"Type Uses","level":2,"path":"text/types","prose":"A type use is a reference to a type definition.\nWhere it is required to reference a function type,\nit may optionally be augmented by explicit inlined parameter and result declarations.\nThat allows binding symbolic identifiers to name the local indices of parameters.\nIf inline declarations are given, then their types must match the referenced function type.\n\n If inline declarations are given, their types must be syntactically equal to the types from the indexed definition;\n possible type substitutions from other definitions that might make them equal are not taken into account.\n This is to simplify syntactic pre-processing.\n\nThe synthesized attribute of a Ttypeuse is a pair consisting of both the used type index and the local identifier context containing possible parameter identifiers.\n\n Both productions overlap for the case that the function type is FUNC eps eps.\n However, in that case, they also produce the same results, so that the choice is immaterial.\n\n The well-formedness condition on I' ensures that the parameters do not contain duplicate identifiers.","crossrefs":["text-type","text-functype","text-param","text-result","text-id","text-localidx","notation-subst","syntax-typeidx","text-context","text-context-wf"],"formal_refs":["Ttypeuse_/base","Ttypeuse","FUNC","eps","I'"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-typeuse"},{"id":"text-typeuse-abbrev","anchors":["text-typeuse-abbrev"],"title":"Abbreviations","level":3,"path":"text/types","prose":"A type use may also be replaced entirely by inline parameter and result declarations.\nIn that case, a type index is automatically inserted:\n\nwhere x is the smallest existing type index whose recursive type definition parses into a singular, final function type with the same parameters and results.\nIf no such index exists, then a new recursive type of the same form is inserted at the end of the module.\n\nAbbreviations are expanded in the order they appear, such that previously inserted type definitions are reused by consecutive expansions.","crossrefs":["text-param","text-result","syntax-typeidx","syntax-rectype","syntax-functype","text-rectype"],"formal_refs":["Ttypeuse_/abbrev","x"],"url":"https://webassembly.github.io/spec/core/text/types.html#text-typeuse-abbrev"},{"id":"text-value","anchors":["text-value"],"title":"Values","level":1,"path":"text/values","prose":"The grammar productions in this section define lexical syntax,\nhence no white space is allowed.","crossrefs":["text-space"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/values.html#text-value"},{"id":"text-sign","anchors":["text-sign","text-digit","text-hexdigit","text-num","text-hexnum","text-sint","text-uint","text-int"],"title":"Integers","level":2,"path":"text/values","prose":"All integers can be written in either decimal or hexadecimal notation.\nIn both cases, digits can optionally be separated by underscores.\n\nThe allowed syntax for integer literals depends on size and signedness.\nMoreover, their value must lie within the range of the respective type.\n\nUninterpreted integers can be written as either signed or unsigned, and are normalized to unsigned in the abstract syntax.","crossrefs":["syntax-int"],"formal_refs":["Tsign","Tdigit","Thexdigit","Tnum","Thexnum","TuN","TsN","TiN"],"url":"https://webassembly.github.io/spec/core/text/values.html#text-sign"},{"id":"text-frac","anchors":["text-frac","text-hexfrac","text-mant","text-hexmant","text-float","text-hexfloat"],"title":"Floating-Point","level":2,"path":"text/values","prose":"Floating-point values can be represented in either decimal or hexadecimal notation.\n\nThe value of a literal must not lie outside the representable range of the corresponding IEEE754 type\n(that is, a numeric value must not overflow to +-infinity),\nbut it may be rounded to the nearest representable value.\n\n Rounding can be prevented by using hexadecimal notation with no more significant bits than supported by the required type.\n\nFloating-point values may also be written as constants for infinity or canonical NaN (not a number).\nFurthermore, arbitrary NaN values may be expressed by providing an explicit payload value.","crossrefs":["syntax-float","aux-ieee"],"formal_refs":["Tfrac","Thexfrac","Tmant","Thexmant","Tfloat","Thexfloat","TfN","TfNmag","+-infinity"],"url":"https://webassembly.github.io/spec/core/text/values.html#text-frac"},{"id":"text-byte","anchors":["text-byte","text-string"],"title":"Strings","level":2,"path":"text/values","prose":"Strings denote sequences of bytes that can represent both textual and binary data.\nThey are enclosed in quotation marks\nand may contain any character other than ASCII control characters, quotation marks (), or backslash (),\nexcept when expressed with an escape sequence.\n\nEach character in a string literal represents the byte sequence corresponding to its UTF-8 Unicode (Section 2.5) encoding,\nexcept for hexadecimal escape sequences \"\\\\hh\", which represent raw bytes of the respective value.","crossrefs":[],"formal_refs":["Tstring","Tstringelem","Tstringchar","\"\\\\hh\""],"url":"https://webassembly.github.io/spec/core/text/values.html#text-byte"},{"id":"text-name","anchors":["text-name"],"title":"Names","level":2,"path":"text/values","prose":"Names are strings denoting a literal character sequence. \nA name string must form a valid UTF-8 encoding as defined by Unicode (Section 2.5) and is interpreted as a string of Unicode scalar values.\n\n Presuming the source text is itself encoded correctly,\n strings that do not contain any uses of hexadecimal byte escapes are always valid names.","crossrefs":["syntax-name"],"formal_refs":["Tname"],"url":"https://webassembly.github.io/spec/core/text/values.html#text-name"},{"id":"text-idchar","anchors":["text-idchar","text-id"],"title":"Identifiers","level":2,"path":"text/values","prose":"Indices can be given in both numeric and symbolic form.\nSymbolic identifiers that stand in lieu of indices start with , followed by either a sequence of printable ASCII characters that does not contain a space, quotation mark, comma, semicolon, or bracket, or by a quoted name.\n\n The value of an identifier character is the Unicode codepoint denoting it.","crossrefs":["syntax-index","text-name"],"formal_refs":["Tid","Tidchar"],"url":"https://webassembly.github.io/spec/core/text/values.html#text-idchar"},{"id":"text-id-fresh","anchors":["text-id-fresh"],"title":"Conventions","level":3,"path":"text/values","prose":"The expansion rules of some abbreviations require insertion of a fresh identifier.\nThat may be any syntactically valid identifier that does not already occur in the given source text.","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/text/values.html#text-id-fresh"},{"id":"type-system","anchors":["type-system"],"title":"Conventions","level":1,"path":"valid/conventions","prose":"Validation checks that a WebAssembly module is well-formed.\nOnly valid modules can be instantiated.\n\nValidity is defined by a type system over the abstract syntax of a module and its contents.\nFor each piece of abstract syntax, there is a typing rule that specifies the constraints that apply to it.\nAll rules are given in two equivalent forms:\n\n1. In prose, describing the meaning in intuitive form.\n2. In formal notation, describing the rule in mathematical form. [#cite-pldi2017]_\n\n The prose and formal rules are equivalent,\n so that understanding of the formal notation is not required to read this specification.\n The formalism offers a more concise description in notation that is used widely in programming languages semantics and is readily amenable to mathematical proof.\n\nIn both cases, the rules are formulated in a declarative manner.\nThat is, they only formulate the constraints, they do not define an algorithm.\nThe skeleton of a sound and complete algorithm for type-checking instruction sequences according to this specification is provided in the appendix.","crossrefs":["exec-instantiation","syntax","syntax-module","algo-valid"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#type-system"},{"id":"syntax-rectypeidx","anchors":["syntax-rectypeidx","syntax-valtype-ext","syntax-heaptype-ext","syntax-subtype-ext","syntax-typeuse-ext","type-ext","type-closed"],"title":"Types","level":2,"path":"valid/conventions","prose":"To define the semantics, the definition of some sorts of types is extended to include additional forms.\nBy virtue of not being representable in either the binary format or the text format,\nthese forms cannot be used in a program;\nthey only occur during validation or execution.\n\nThe unique value type BOT is a bottom type that matches all value types.\nSimilarly, BOT is also used as a bottom type of all heap types.\n\n No validation rule uses bottom types explicitly,\n but various rules can pick any value or heap type, including bottom.\n This ensures the existence of principal types,\n and thus a validation algorithm without back tracking.\n\nA type use can consist directly of a defined type.\nThis occurs as the result of substituting a type index with its definition.\n\nA type use may also be a recursive type index.\nSuch an index refers to the i-th component of a surrounding recursive type.\nIt occurs as the result of rolling up the definition of a recursive type.\n\nBoth extensions affect occurrences of type uses in concrete heap types, in sub types and in instructions.\n\nA type of any form is closed when it does not contain a heap type that is a type index or a recursive type index without a surrounding recursive type,\ni.e., all type indices have been substituted with their defined type and all free recursive type indices have been unrolled.\n\n It is an invariant of the semantics that sub types occur only in one of two forms:\n either as \"syntactic\" types as in a source module, where all supertypes are type indices,\n or as \"semantic\" types, where all supertypes are resolved to either defined types or recursive type indices.\n\n Recursive type indices are local to a recursive type.\n They are distinguished from regular type indices and represented such that two closed types are syntactically equal if and only if they have the same recursive structure.","crossrefs":["binary-valtype","text-valtype","valid","exec","syntax-valtype","match-valtype","syntax-heaptype","principality","algo-valid","syntax-typeuse","syntax-deftype","notation-subst","syntax-typeidx","syntax-rectype","aux-roll-rectype","syntax-subtype","syntax-instr","syntax-reftype","aux-unroll-rectype"],"formal_refs":["valtype/sem","absheaptype/sem","typeuse/sem","BOT","i"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#syntax-rectypeidx"},{"id":"aux-reftypediff","anchors":["aux-reftypediff"],"title":"Convention","level":3,"path":"valid/conventions","prose":"The difference* $diffrt(rt_1 rt_2) between two reference types is defined as follows:\n\n \n\n This definition computes an approximation of the reference type that is inhabited by all values from rt_1 except those from rt_2.\n Since the type system does not have general union types,\n the definition only affects the presence of null and cannot express the absence of other values.","crossrefs":["syntax-reftype"],"formal_refs":["diffrt","$diffrt(rt_1","rt_2)","rt_1","rt_2"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#aux-reftypediff"},{"id":"syntax-deftype","anchors":["syntax-deftype"],"title":"Defined Types","level":2,"path":"valid/conventions","prose":"Defined types denote the individual types defined in a module.\nEach such type is represented as a projection from the recursive type group it originates from, indexed by its position in that group.\n\nDefined types do not occur in the binary or text format,\nbut are formed by rolling up the recursive types defined in a module.\n\n It is an invariant of the semantics that all recursive types occurring in defined types are rolled up.","crossrefs":["syntax-module","syntax-rectype","binary","text","aux-roll-deftype","syntax-reftype","aux-roll-rectype"],"formal_refs":["deftype"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#syntax-deftype"},{"id":"type-subst","anchors":["type-subst","notation-subst"],"title":"Conventions","level":3,"path":"valid/conventions","prose":"$subst_valtype(t x dt) denotes the parallel substitution of type indices x with corresponding defined types dt in type t, provided |x| |dt|.\n\n $subst_valtype(t (REC i) dt) denotes the parallel substitution of recursive type indices (REC i) with defined types dt in type t, provided |(REC i)| |dt|.\n This substitution does not proceed under recursive types,\n since they are considered local binders for all recursive type indices.\n\n $subst_all_valtype(t dt) is shorthand for the substitution $subst_valtype(t x dt), where x $((|dt|.\n\n All recursive types formed by the semantics are closed with respect to recursive type indices that occur inside them.\n Hence, substitution of recursive type indices never needs to modify the bodies of recursive types.\n In addition, all types used for substitution are closed with respect to recursive type indices,\n such that name capture of recursive type indices cannot occur.","crossrefs":["syntax-typeidx","syntax-deftype","syntax-rectypeidx","syntax-rectype"],"formal_refs":["$subst_valtype(t","x*","dt*)","dt*","t","|x*|","|dt*|","(REC","i)*","|(REC","i)*|","$subst_all_valtype(t","$((|dt*|"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#type-subst"},{"id":"aux-roll-rectype","anchors":["aux-roll-rectype","aux-unroll-rectype","aux-roll-deftype","aux-unroll-deftype","aux-expand-deftype","aux-expand-typeuse"],"title":"Rolling and Unrolling","level":2,"path":"valid/conventions","prose":"In order to allow comparing recursive types for equivalence, their representation is changed such that all type indices internal to the same recursive type are replaced by recursive type indices.\n\n This representation is independent of the type index space,\n so that it is meaningful across module boundaries.\n Moreover, this representation ensures that types with equivalent recursive structure are also syntactically equal,\n hence allowing a simple equality check on (closed) types.\n It gives rise to an iso-recursive interpretation of types.\n\nThe representation change is performed by two auxiliary operations on the syntax of recursive types:\n\n Rolling up a recursive type substitutes its internal type indices with corresponding recursive type indices.\n\n Unrolling a recursive type substitutes its recursive type indices with the corresponding defined types.\n\nThese operations are extended to defined types and defined as follows:\n\nIn addition, the following auxiliary relation denotes the expansion of a defined type or type use:","crossrefs":["syntax-rectype","match-deftype","syntax-typeidx","syntax-rectypeidx","notation-subst","syntax-deftype","syntax-typeuse"],"formal_refs":["rollrt","unrollrt","rolldt","unrolldt","Expand","Expand_use/*","Expand_use"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#aux-roll-rectype"},{"id":"syntax-instrtype","anchors":["syntax-instrtype"],"title":"Instruction Types","level":2,"path":"valid/conventions","prose":"Instruction types classify the behaviour of instructions or instruction sequences, by describing how they manipulate the operand stack and the initialization status of locals:\n\nAn instruction type t_1 ->_(x) t_2 describes the required input stack with argument values of types t_1 that an instruction pops off\nand the provided output stack with result values of types t_2 that it pushes back.\nMoreover, it enumerates the indices x of locals that have been set by the instruction or sequence.\n\n Instruction types are only used for validation,\n they do not occur in programs.","crossrefs":["syntax-instr","stack","syntax-local","syntax-localidx","valid"],"formal_refs":["instrtype","t_1*","->_(x*)","t_2*","x*"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#syntax-instrtype"},{"id":"syntax-init","anchors":["syntax-init","syntax-localtype"],"title":"Local Types","level":2,"path":"valid/conventions","prose":"Local types classify locals, by describing their value type as well as their initialization status:\n\n Local types are only used for validation,\n they do not occur in programs.","crossrefs":["syntax-local","syntax-valtype","valid"],"formal_refs":["localtype","init"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#syntax-init"},{"id":"context","anchors":["context"],"title":"Contexts","level":2,"path":"valid/conventions","prose":"Validity of an individual definition is specified relative to a context,\nwhich collects relevant information about the surrounding module and the definitions in scope:\n\n Types: the list of types defined in the current module.\n Functions: the list of functions declared in the current module, represented by a defined type that expands to their function type.\n Tables: the list of tables declared in the current module, represented by their table type.\n Memories: the list of memories declared in the current module, represented by their memory type.\n Globals: the list of globals declared in the current module, represented by their global type.\n Tags: the list of tags declared in the current module, represented by their tag type.\n Element Segments: the list of element segments declared in the current module, represented by the elements' reference type.\n Data Segments: the list of data segments declared in the current module, each represented by an OK entry.\n Locals: the list of locals declared in the current function (including parameters), represented by their local type.\n Labels: the stack of labels accessible from the current position, represented by their result type.\n Return: the return type of the current function, represented as an optional result type that is absent when no return is allowed, as in free-standing expressions.\n References: the list of function indices that occur in the module outside functions and can hence be used to form references inside them.\n\nIn other words, a context contains a sequence of suitable types for each index space,\ndescribing each defined entry in that space.\nLocals, labels and return type are only used for validating instructions in function bodies, and are left empty elsewhere.\nThe label stack is the only part of the context that changes as validation of an instruction sequence proceeds.\n\nMore concretely, contexts are defined as records C with abstract syntax:\n\n The definition of contexts needs to be extended with additional fields for the purpose of proving type soundness.","crossrefs":["syntax-module","syntax-type","syntax-func","syntax-deftype","aux-expand-deftype","syntax-functype","syntax-table","syntax-tabletype","syntax-mem","syntax-memtype","syntax-global","syntax-globaltype","syntax-tagtype","syntax-elem","syntax-reftype","syntax-data","syntax-local","syntax-localtype","syntax-label","syntax-resulttype","syntax-funcidx","syntax-index","syntax-instr","notation-record","context-ext","soundness"],"formal_refs":["context/syn","OK","C"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#context"},{"id":"type-closure","anchors":["type-closure","aux-clostype"],"title":"Convention","level":3,"path":"valid/conventions","prose":"A type of any shape can be closed to bring it into closed form relative to a context it is valid in, by substituting each type index x occurring in it with its own corresponding defined type C.TYPES[x], after first closing the types in C.TYPES themselves.\n\n Free type indices referring to types within the same recursive type are handled separately by rolling up recursive types before closing them.","crossrefs":["type-closed","context","valid-type","notation-subst","syntax-typeidx","syntax-deftype","syntax-rectype","aux-roll-rectype"],"formal_refs":["clos_valtype","clos_deftypes","x","C.TYPES[x]","C.TYPES"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#type-closure"},{"id":"valid-notation-textual","anchors":["valid-notation-textual"],"title":"Prose Notation","level":2,"path":"valid/conventions","prose":"Validation is specified by stylised rules for each relevant part of the abstract syntax.\nThe rules not only state constraints defining when a phrase is valid,\nthey also classify it with a type.\nThe following conventions are adopted in stating these rules.\n\n A phrase A is said to be \"valid with type T\"\n if and only if all constraints expressed by the respective rules are met.\n The form of T depends on the syntactic class of A.\n\n .. note::\n For example, if A is a function,\n then T is a defined function type;\n for an A that is a global,\n T is a global type;\n and so on.\n\n The rules implicitly assume a given context C.\n\n In some places, this context is locally extended to a context C' with additional entries.\n The formulation \"Under context C', ... statement* ...\" is adopted to express that the following statement must apply under the assumptions embodied in the extended context.","crossrefs":["syntax","syntax-func","syntax-deftype","syntax-global","syntax-globaltype","context"],"formal_refs":["A","T","C","C'"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#valid-notation-textual"},{"id":"valid-notation","anchors":["valid-notation"],"title":"Formal Notation","level":2,"path":"valid/conventions","prose":"This section gives a brief explanation of the notation for specifying typing rules formally.\n For the interested reader, a more thorough introduction can be found in respective text books. [#cite-tapl]_\n\nThe proposition that a phrase A has a respective type T is written A T.\nIn general, however, typing is dependent on a context C.\nTo express this explicitly, the complete form is a judgement C A T,\nwhich says that A T holds under the assumptions encoded in C.\n\nThe formal typing rules use a standard approach for specifying type systems, rendering them into deduction rules.\nEvery rule has the following general form:\n\nSuch a rule is read as a big implication: if all premises hold, then the conclusion holds.\nSome rules have no premises; they are axioms whose conclusion holds unconditionally.\nThe conclusion always is a judgment C A T,\nand there usually is one respective rule for each relevant construct A of the abstract syntax.\n\n For example, the typing rule for the BINOP I32 ADD instruction can be given as an axiom:\n\n \n\n The instruction is always valid with type I32 I32 I32\n (saying that it consumes two I32 values and produces one),\n independent of any side conditions.\n\n An instruction like GLOBAL.GET can be typed as follows:\n\n \n\n Here, the premise enforces that the immediate global index x exists in the context.\n The instruction produces a value of its respective type t\n (and does not consume any values).\n If C.GLOBALS[x] does not exist then the premise does not hold,\n and the instruction is ill-typed.\n\n Finally, a structured instruction requires\n a recursive rule, where the premise is itself a typing judgement:\n\n \n\n A BLOCK instruction is only valid when the instruction sequence in its body is.\n Moreover, the result type must match the block's annotation blocktype.\n If so, then the BLOCK instruction has the same type as the body.\n Inside the body an additional label of the corresponding result type is available,\n which is expressed by extending the context C with the additional label information for the premise.\n\n.. [#cite-pldi2017]\n The semantics is derived from the following article:\n Andreas Haas, Andreas Rossberg, Derek Schuff, Ben Titzer, Dan Gohman, Luke Wagner, Alon Zakai, JF Bastien, Michael Holman. PLDI2017. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM 2017.\n\n.. [#cite-tapl]\n For example: Benjamin Pierce. TAPL. The MIT Press 2002","crossrefs":["syntax-globalidx","syntax-instr-control"],"formal_refs":["NotationTypingScheme","NotationTypingInstrScheme/i32.add","NotationTypingInstrScheme/global.get","NotationTypingInstrScheme/block","NotationTypingInstrScheme","A","T","C","BINOP","I32","ADD","GLOBAL.GET","x","t","C.GLOBALS[x]","BLOCK","blocktype"],"url":"https://webassembly.github.io/spec/core/valid/conventions.html#valid-notation"},{"id":"valid","anchors":["valid"],"title":"Validation","level":1,"path":"valid/index","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/index.html#valid"},{"id":"valid-instr","anchors":["valid-instr"],"title":"Instructions","level":1,"path":"valid/instructions","prose":"Instructions are classified by instruction types that describe how they manipulate the operand stack and initialize locals:\nA type t_1 ->_(x) t_2 describes the required input stack with argument values of types t_1` that an instruction pops off\nand the provided output stack with result values of types t_2 that it pushes back.\nMoreover, it enumerates the indices x of locals that have been set by the instruction.\nIn most cases, this is empty.\n\n For example, the instruction $($(BINOP I32 ADD)) has type I32 I32 I32,\n consuming two I32 values and producing one.\n The instruction (LOCAL.SET x) has type t ->_(x) eps, provided t is the type declared for the local x.\n\nTyping extends to instruction sequences instr.\nSuch a sequence has an instruction type t_1 ->_(x) t_2 if the accumulative effect of executing the instructions is consuming values of types t_1 off the operand stack, pushing new values of types t_2, and setting all locals x*.","crossrefs":["syntax-instr","syntax-instrtype","stack","syntax-local","syntax-localidx","valid-instrs"],"formal_refs":["t_1*","->_(x*)","t_2*","x*","$($(BINOP","I32","ADD))","(LOCAL.SET","x)","t","->_(x)","eps","x","instr*"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr"},{"id":"polymorphism","anchors":["polymorphism"],"title":null,"level":0,"path":"valid/instructions","prose":"For some instructions, the typing rules do not fully constrain the type,\nand therefore allow for multiple types.\nSuch instructions are called polymorphic.\nTwo degrees of polymorphism can be distinguished:\n\n value-polymorphic:\n the value type t of one or several individual operands is unconstrained.\n That is the case for all parametric instructions like DROP and SELECT.\n\n stack-polymorphic:\n the entire (or most of the) instruction type t_1 t_2 of the instruction is unconstrained.\n That is the case for all control instructions that perform an unconditional control transfer, such as UNREACHABLE, BR, or RETURN.\n\nIn both cases, the unconstrained types or type sequences can be chosen arbitrarily, as long as they are valid in the current context and meet the constraints imposed for the surrounding parts of the program.\n\n For example, the SELECT instruction is valid with type t t I32 t, for any possible number type t.\n Consequently, both instruction sequences\n\n \n\n and\n\n \n\n are valid, with t in the typing of SELECT being instantiated to I32 or F64, respectively.\n\n The UNREACHABLE instruction is stack-polymorphic,\n and hence valid with type t_1 t_2 for any possible sequences of value types t_1 and t_2.\n Consequently,\n\n \n\n is valid by assuming type eps I32 for the UNREACHABLE instruction.\n In contrast,\n\n \n\n is invalid, because there is no possible type to pick for the UNREACHABLE instruction that would make the sequence well-typed.\n\nThe Appendix describes a type checking algorithm that efficiently implements validation of instruction sequences as prescribed by the rules given here.","crossrefs":["syntax-valtype","valid-instr-parametric","syntax-instrtype","valid-instr-control","context","syntax-numtype","algo-valid"],"formal_refs":["(CONST","I32","(SELECT)","F64","$fnat(64","(UNREACHABLE)","(BINOP","ADD)","I64","t","DROP","SELECT","t_1*","t_2*","UNREACHABLE","BR","RETURN","eps"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#polymorphism"},{"id":"valid-instr-parametric","anchors":["valid-instr-parametric"],"title":"Parametric Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-parametric"},{"id":"valid-nop","anchors":["valid-nop"],"title":":math:`\\NOP`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/nop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-nop"},{"id":"valid-unreachable","anchors":["valid-unreachable"],"title":":math:`\\UNREACHABLE`","level":3,"path":"valid/instructions","prose":"The UNREACHABLE instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/unreachable","UNREACHABLE"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unreachable"},{"id":"valid-drop","anchors":["valid-drop"],"title":":math:`\\DROP`","level":3,"path":"valid/instructions","prose":"Both DROP and SELECT without annotation are value-polymorphic instructions.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/drop","DROP","SELECT"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-drop"},{"id":"valid-select","anchors":["valid-select"],"title":":math:`\\SELECT~(t^\\ast)^?`","level":3,"path":"valid/instructions","prose":"In future versions of WebAssembly, SELECT may allow more than one value per choice.","crossrefs":[],"formal_refs":["Instr_ok/select","Instr_ok/select-*","SELECT"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-select"},{"id":"valid-label","anchors":["valid-label","valid-instr-control"],"title":"Control Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-label"},{"id":"valid-block","anchors":["valid-block"],"title":":math:`\\BLOCK~\\blocktype~\\instr^\\ast`","level":3,"path":"valid/instructions","prose":"The notation LABELS (t*) C inserts the new label type at index , shifting all others.\n The same applies to all other block instructions.","crossrefs":["notation-concat"],"formal_refs":["Instr_ok/block","LABELS","(t*)","C"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-block"},{"id":"valid-loop","anchors":["valid-loop"],"title":":math:`\\LOOP~\\blocktype~\\instr^\\ast`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/loop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-loop"},{"id":"valid-if","anchors":["valid-if"],"title":":math:`\\IF~\\blocktype~\\instr_1^\\ast~\\ELSE~\\instr_2^\\ast`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/if"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-if"},{"id":"valid-br","anchors":["valid-br"],"title":":math:`\\BR~l`","level":3,"path":"valid/instructions","prose":"The label index space in the context C contains the most recent label first, so that C.LABELS[l] performs a relative lookup as expected.\n This applies to other branch instructions as well.\n\n The BR instruction is stack-polymorphic.","crossrefs":["syntax-labelidx","context","polymorphism"],"formal_refs":["Instr_ok/br","C","C.LABELS[l]","BR"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br"},{"id":"valid-br_if","anchors":["valid-br_if"],"title":":math:`\\BRIF~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/br_if"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_if"},{"id":"valid-br_table","anchors":["valid-br_table"],"title":":math:`\\BRTABLE~l^\\ast~l_N`","level":3,"path":"valid/instructions","prose":"The BR_TABLE instruction is stack-polymorphic.\n\n Furthermore, the result type t is also chosen non-deterministically in this rule.\n Although it may seem necessary to compute t as the greatest lower bound of all label types in practice,\n a simple sequential algorithm does not require this.","crossrefs":["polymorphism","syntax-resulttype","algo-valid"],"formal_refs":["Instr_ok/br_table","BR_TABLE","t*"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_table"},{"id":"valid-br_on_null","anchors":["valid-br_on_null"],"title":":math:`\\BRONNULL~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/br_on_null"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_null"},{"id":"valid-br_on_non_null","anchors":["valid-br_on_non_null"],"title":":math:`\\BRONNONNULL~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/br_on_non_null"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_non_null"},{"id":"valid-br_on_cast","anchors":["valid-br_on_cast"],"title":":math:`\\BRONCAST~l~\\X{rt}_1~\\X{rt}_2`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/br_on_cast"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_cast"},{"id":"valid-br_on_cast_fail","anchors":["valid-br_on_cast_fail"],"title":":math:`\\BRONCASTFAIL~l~\\X{rt}_1~\\X{rt}_2`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/br_on_cast_fail"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-br_on_cast_fail"},{"id":"valid-call","anchors":["valid-call"],"title":":math:`\\CALL~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/call"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call"},{"id":"valid-call_ref","anchors":["valid-call_ref"],"title":":math:`\\CALLREF~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/call_ref"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call_ref"},{"id":"valid-call_indirect","anchors":["valid-call_indirect"],"title":":math:`\\CALLINDIRECT~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/call_indirect"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-call_indirect"},{"id":"valid-return","anchors":["valid-return"],"title":":math:`\\RETURN`","level":3,"path":"valid/instructions","prose":"The RETURN instruction is stack-polymorphic.\n\n C.RETURN is absent (set to eps) when validating an expression that is not a function body.\n This differs from it being set to the empty result type [eps],\n which is the case for functions not returning anything.","crossrefs":["polymorphism","valid-expr"],"formal_refs":["Instr_ok/return","RETURN","C.RETURN","eps","[eps]"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return"},{"id":"valid-return_call","anchors":["valid-return_call"],"title":":math:`\\RETURNCALL~x`","level":3,"path":"valid/instructions","prose":"The RETURN_CALL instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/return_call","RETURN_CALL"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call"},{"id":"valid-return_call_ref","anchors":["valid-return_call_ref"],"title":":math:`\\RETURNCALLREF~x`","level":3,"path":"valid/instructions","prose":"The RETURN_CALL_REF instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/return_call_ref","RETURN_CALL_REF"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call_ref"},{"id":"valid-return_call_indirect","anchors":["valid-return_call_indirect"],"title":":math:`\\RETURNCALLINDIRECT~x~y`","level":3,"path":"valid/instructions","prose":"The RETURN_CALL_INDIRECT instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/return_call_indirect","RETURN_CALL_INDIRECT"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-return_call_indirect"},{"id":"valid-throw","anchors":["valid-throw"],"title":":math:`\\THROW~x`","level":3,"path":"valid/instructions","prose":"The THROW instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/throw","THROW"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-throw"},{"id":"valid-throw_ref","anchors":["valid-throw_ref"],"title":":math:`\\THROWREF`","level":3,"path":"valid/instructions","prose":"The THROW_REF instruction is stack-polymorphic.","crossrefs":["polymorphism"],"formal_refs":["Instr_ok/throw_ref","THROW_REF"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-throw_ref"},{"id":"valid-try_table","anchors":["valid-try_table"],"title":":math:`\\TRYTABLE~\\blocktype~\\catch^\\ast~\\instr^\\ast`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/try_table"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-try_table"},{"id":"valid-catch","anchors":["valid-catch"],"title":":math:`\\CATCH~x~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Catch_ok/catch"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-catch"},{"id":"valid/instructions-math-catchref-x-l","anchors":[],"title":":math:`\\CATCHREF~x~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Catch_ok/catch_ref"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid/instructions-math-catchall-l","anchors":[],"title":":math:`\\CATCHALL~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Catch_ok/catch_all"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid/instructions-math-catchallref-l","anchors":[],"title":":math:`\\CATCHALLREF~l`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Catch_ok/catch_all_ref"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid-instr-variable","anchors":["valid-instr-variable"],"title":"Variable Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-variable"},{"id":"valid-local.get","anchors":["valid-local.get"],"title":":math:`\\LOCALGET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/local.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.get"},{"id":"valid-local.set","anchors":["valid-local.set"],"title":":math:`\\LOCALSET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/local.set"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.set"},{"id":"valid-local.tee","anchors":["valid-local.tee"],"title":":math:`\\LOCALTEE~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/local.tee"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-local.tee"},{"id":"valid-global.get","anchors":["valid-global.get"],"title":":math:`\\GLOBALGET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/global.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-global.get"},{"id":"valid-global.set","anchors":["valid-global.set"],"title":":math:`\\GLOBALSET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/global.set"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-global.set"},{"id":"valid-instr-table","anchors":["valid-instr-table"],"title":"Table Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-table"},{"id":"valid-table.get","anchors":["valid-table.get"],"title":":math:`\\TABLEGET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.get"},{"id":"valid-table.set","anchors":["valid-table.set"],"title":":math:`\\TABLESET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.set"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.set"},{"id":"valid-table.size","anchors":["valid-table.size"],"title":":math:`\\TABLESIZE~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.size"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.size"},{"id":"valid-table.grow","anchors":["valid-table.grow"],"title":":math:`\\TABLEGROW~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.grow"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.grow"},{"id":"valid-table.fill","anchors":["valid-table.fill"],"title":":math:`\\TABLEFILL~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.fill"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.fill"},{"id":"valid-table.copy","anchors":["valid-table.copy"],"title":":math:`\\TABLECOPY~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.copy"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.copy"},{"id":"valid-table.init","anchors":["valid-table.init"],"title":":math:`\\TABLEINIT~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/table.init"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-table.init"},{"id":"valid-elem.drop","anchors":["valid-elem.drop"],"title":":math:`\\ELEMDROP~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/elem.drop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-elem.drop"},{"id":"valid-memarg","anchors":["valid-memarg","valid-instr-memory"],"title":"Memory Instructions","level":2,"path":"valid/instructions","prose":"Memory instructions use memory arguments,\nwhich are classified by the address type and the\nand bit width of the access they are suitable for.","crossrefs":["syntax-memarg","syntax-addrtype","bitwidth-valtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memarg"},{"id":"valid/instructions-math-memarg","anchors":[],"title":":math:`\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Memarg_ok"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid-load-val","anchors":["valid-load-val"],"title":":math:`t\\K{.}\\LOAD~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/load-val"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-val"},{"id":"valid-load-pack","anchors":["valid-load-pack"],"title":":math:`t\\K{.}\\LOAD{N}\\K{\\_}\\sx~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/load-pack"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-load-pack"},{"id":"valid-store-val","anchors":["valid-store-val"],"title":":math:`t\\K{.}\\STORE~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/store-val"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-val"},{"id":"valid-store-pack","anchors":["valid-store-pack"],"title":":math:`t\\K{.}\\STORE{N}~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/store-pack"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-store-pack"},{"id":"valid-vload-val","anchors":["valid-vload-val"],"title":":math:`\\K{v128.}\\LOAD~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vload-val"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-val"},{"id":"valid-vload-pack","anchors":["valid-vload-pack"],"title":":math:`\\K{v128.}\\LOAD{N}\\K{x}M\\_\\sx~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vload-pack"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-pack"},{"id":"valid-vload-splat","anchors":["valid-vload-splat"],"title":":math:`\\K{v128.}\\LOAD{N}\\K{\\_splat}~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vload-splat"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-splat"},{"id":"valid-vload-zero","anchors":["valid-vload-zero"],"title":":math:`\\K{v128.}\\LOAD{N}\\K{\\_zero}~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vload-zero"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload-zero"},{"id":"valid-vload_lane","anchors":["valid-vload_lane"],"title":":math:`\\K{v128.}\\LOAD{N}\\K{\\_lane}~x~\\memarg~\\laneidx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vload_lane"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vload_lane"},{"id":"valid-vstore","anchors":["valid-vstore"],"title":":math:`\\K{v128.}\\STORE~x~\\memarg`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vstore"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore"},{"id":"valid-vstore_lane","anchors":["valid-vstore_lane"],"title":":math:`\\K{v128.}\\STORE{N}\\K{\\_lane}~x~\\memarg~\\laneidx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vstore_lane"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vstore_lane"},{"id":"valid-memory.size","anchors":["valid-memory.size"],"title":":math:`\\MEMORYSIZE~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/memory.size"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.size"},{"id":"valid-memory.grow","anchors":["valid-memory.grow"],"title":":math:`\\MEMORYGROW~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/memory.grow"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.grow"},{"id":"valid-memory.fill","anchors":["valid-memory.fill"],"title":":math:`\\MEMORYFILL~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/memory.fill"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.fill"},{"id":"valid-memory.copy","anchors":["valid-memory.copy"],"title":":math:`\\MEMORYCOPY~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/memory.copy"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.copy"},{"id":"valid-memory.init","anchors":["valid-memory.init"],"title":":math:`\\MEMORYINIT~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/memory.init"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-memory.init"},{"id":"valid-data.drop","anchors":["valid-data.drop"],"title":":math:`\\DATADROP~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/data.drop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-data.drop"},{"id":"valid-instr-ref","anchors":["valid-instr-ref"],"title":"Reference Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-ref"},{"id":"valid-ref.null","anchors":["valid-ref.null"],"title":":math:`\\REFNULL~\\X{ht}`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.null"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.null"},{"id":"valid-ref.func","anchors":["valid-ref.func"],"title":":math:`\\REFFUNC~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.func"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.func"},{"id":"valid-ref.is_null","anchors":["valid-ref.is_null"],"title":":math:`\\REFISNULL`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.is_null"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.is_null"},{"id":"valid-ref.as_non_null","anchors":["valid-ref.as_non_null"],"title":":math:`\\REFASNONNULL`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.as_non_null"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.as_non_null"},{"id":"valid-ref.eq","anchors":["valid-ref.eq"],"title":":math:`\\REFEQ`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.eq"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.eq"},{"id":"valid-ref.test","anchors":["valid-ref.test"],"title":":math:`\\REFTEST~\\X{rt}`","level":3,"path":"valid/instructions","prose":"The liberty to pick a supertype rt' allows typing the instruction with the least precise super type of rt as input, that is, the top type in the corresponding heap subtyping hierarchy.","crossrefs":[],"formal_refs":["Instr_ok/ref.test","rt'","rt"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.test"},{"id":"valid-ref.cast","anchors":["valid-ref.cast"],"title":":math:`\\REFCAST~\\X{rt}`","level":3,"path":"valid/instructions","prose":"The liberty to pick a supertype rt' allows typing the instruction with the least precise super type of rt as input, that is, the top type in the corresponding heap subtyping hierarchy.","crossrefs":[],"formal_refs":["Instr_ok/ref.cast","rt'","rt"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.cast"},{"id":"valid/instructions-aggregate-reference-instructions","anchors":[],"title":"Aggregate Reference Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid-struct.new","anchors":["valid-struct.new"],"title":":math:`\\STRUCTNEW~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/struct.new"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.new"},{"id":"valid-struct.new_default","anchors":["valid-struct.new_default"],"title":":math:`\\STRUCTNEWDEFAULT~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/struct.new_default"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.new_default"},{"id":"valid-struct.get","anchors":["valid-struct.get","valid-struct.get_u","valid-struct.get_s"],"title":":math:`\\STRUCTGET\\K{\\_}\\sx^?~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/struct.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.get"},{"id":"valid-struct.set","anchors":["valid-struct.set"],"title":":math:`\\STRUCTSET~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/struct.set"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-struct.set"},{"id":"valid-array.new","anchors":["valid-array.new"],"title":":math:`\\ARRAYNEW~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.new"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new"},{"id":"valid-array.new_default","anchors":["valid-array.new_default"],"title":":math:`\\ARRAYNEWDEFAULT~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.new_default"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_default"},{"id":"valid-array.new_fixed","anchors":["valid-array.new_fixed"],"title":":math:`\\ARRAYNEWFIXED~x~n`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.new_fixed"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_fixed"},{"id":"valid-array.new_elem","anchors":["valid-array.new_elem"],"title":":math:`\\ARRAYNEWELEM~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.new_elem"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_elem"},{"id":"valid-array.new_data","anchors":["valid-array.new_data"],"title":":math:`\\ARRAYNEWDATA~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.new_data"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.new_data"},{"id":"valid-array.get","anchors":["valid-array.get","valid-array.get_u","valid-array.get_s"],"title":":math:`\\ARRAYGET\\K{\\_}\\sx^?~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.get"},{"id":"valid-array.set","anchors":["valid-array.set"],"title":":math:`\\ARRAYSET~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.set"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.set"},{"id":"valid-array.len","anchors":["valid-array.len"],"title":":math:`\\ARRAYLEN`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.len"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.len"},{"id":"valid-array.fill","anchors":["valid-array.fill"],"title":":math:`\\ARRAYFILL~x`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.fill"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.fill"},{"id":"valid-array.copy","anchors":["valid-array.copy"],"title":":math:`\\ARRAYCOPY~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.copy"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.copy"},{"id":"valid-array.init_elem","anchors":["valid-array.init_elem"],"title":":math:`\\ARRAYINITELEM~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.init_elem"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.init_elem"},{"id":"valid-array.init_data","anchors":["valid-array.init_data"],"title":":math:`\\ARRAYINITDATA~x~y`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/array.init_data"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-array.init_data"},{"id":"valid/instructions-scalar-reference-instructions","anchors":[],"title":"Scalar Reference Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid-ref.i31","anchors":["valid-ref.i31"],"title":":math:`\\REFI31`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/ref.i31"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-ref.i31"},{"id":"valid-i31.get","anchors":["valid-i31.get"],"title":":math:`\\I31GET\\K{\\_}\\sx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/i31.get"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-i31.get"},{"id":"valid/instructions-external-reference-instructions","anchors":[],"title":"External Reference Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html"},{"id":"valid-any.convert_extern","anchors":["valid-any.convert_extern"],"title":":math:`\\ANYCONVERTEXTERN`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/any.convert_extern"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-any.convert_extern"},{"id":"valid-extern.convert_any","anchors":["valid-extern.convert_any"],"title":":math:`\\EXTERNCONVERTANY`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/extern.convert_any"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-extern.convert_any"},{"id":"valid-instr-numeric","anchors":["valid-instr-numeric"],"title":"Numeric Instructions","level":2,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-numeric"},{"id":"valid-const","anchors":["valid-const"],"title":":math:`t\\K{.}\\CONST~c`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/const"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-const"},{"id":"valid-unop","anchors":["valid-unop"],"title":":math:`t\\K{.}\\unop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/unop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-unop"},{"id":"valid-binop","anchors":["valid-binop"],"title":":math:`t\\K{.}\\binop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/binop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-binop"},{"id":"valid-testop","anchors":["valid-testop"],"title":":math:`t\\K{.}\\testop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/testop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-testop"},{"id":"valid-relop","anchors":["valid-relop"],"title":":math:`t\\K{.}\\relop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/relop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-relop"},{"id":"valid-cvtop","anchors":["valid-cvtop"],"title":":math:`t_1\\K{.}\\cvtop\\K{\\_}t_2\\K{\\_}\\sx^?`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/cvtop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-cvtop"},{"id":"valid-instr-vec","anchors":["valid-instr-vec","aux-unpackshape"],"title":"Vector Instructions","level":2,"path":"valid/instructions","prose":"Vector instructions can have a prefix to describe the shape of the operand. Packed numeric types, I8 and I16, are not value types. An auxiliary function maps such packed type shapes to value types:","crossrefs":["syntax-shape","syntax-valtype"],"formal_refs":["unpackshape","I8","I16"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instr-vec"},{"id":"valid-vconst","anchors":["valid-vconst"],"title":":math:`\\V128\\K{.}\\VCONST~c`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vconst"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vconst"},{"id":"valid-vvunop","anchors":["valid-vvunop"],"title":":math:`\\V128\\K{.}\\vvunop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vvunop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvunop"},{"id":"valid-vvbinop","anchors":["valid-vvbinop"],"title":":math:`\\V128\\K{.}\\vvbinop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vvbinop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvbinop"},{"id":"valid-vvternop","anchors":["valid-vvternop"],"title":":math:`\\V128\\K{.}\\vvternop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vvternop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvternop"},{"id":"valid-vvtestop","anchors":["valid-vvtestop"],"title":":math:`\\V128\\K{.}\\vvtestop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vvtestop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vvtestop"},{"id":"valid-vunop","anchors":["valid-vunop"],"title":":math:`\\shape\\K{.}\\vunop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vunop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vunop"},{"id":"valid-vbinop","anchors":["valid-vbinop"],"title":":math:`\\shape\\K{.}\\vbinop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vbinop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbinop"},{"id":"valid-vternop","anchors":["valid-vternop"],"title":":math:`\\shape\\K{.}\\vternop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vternop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vternop"},{"id":"valid-vtestop","anchors":["valid-vtestop"],"title":":math:`\\shape\\K{.}\\vtestop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vtestop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vtestop"},{"id":"valid-vrelop","anchors":["valid-vrelop"],"title":":math:`\\shape\\K{.}\\vrelop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vrelop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vrelop"},{"id":"valid-vshiftop","anchors":["valid-vshiftop"],"title":":math:`\\ishape\\K{.}\\vishiftop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vshiftop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshiftop"},{"id":"valid-vbitmask","anchors":["valid-vbitmask"],"title":":math:`\\ishape\\K{.}\\VBITMASK`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vbitmask"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vbitmask"},{"id":"valid-vswizzlop","anchors":["valid-vswizzlop"],"title":":math:`\\K{i8x16.}\\vswizzlop`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vswizzlop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vswizzlop"},{"id":"valid-vshuffle","anchors":["valid-vshuffle"],"title":":math:`\\K{i8x16.}\\VSHUFFLE~\\laneidx^{16}`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vshuffle"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vshuffle"},{"id":"valid-vsplat","anchors":["valid-vsplat"],"title":":math:`\\shape\\K{.}\\VSPLAT`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vsplat"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vsplat"},{"id":"valid-vextract_lane","anchors":["valid-vextract_lane"],"title":":math:`\\shape\\K{.}\\VEXTRACTLANE\\K{\\_}\\sx^?~\\laneidx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vextract_lane"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextract_lane"},{"id":"valid-vreplace_lane","anchors":["valid-vreplace_lane"],"title":":math:`\\shape\\K{.}\\VREPLACELANE~\\laneidx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vreplace_lane"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vreplace_lane"},{"id":"valid-vextunop","anchors":["valid-vextunop"],"title":":math:`\\ishape_1\\K{.}\\vextunop\\K{\\_}\\ishape_2`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vextunop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextunop"},{"id":"valid-vextbinop","anchors":["valid-vextbinop"],"title":":math:`\\ishape_1\\K{.}\\vextbinop\\K{\\_}\\ishape_2`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vextbinop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextbinop"},{"id":"valid-vextternop","anchors":["valid-vextternop"],"title":":math:`\\ishape_1\\K{.}\\vextternop\\K{\\_}\\ishape_2`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vextternop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vextternop"},{"id":"valid-vnarrow","anchors":["valid-vnarrow"],"title":":math:`\\ishape_1\\K{.}\\VNARROW\\K{\\_}\\ishape_2\\K{\\_}\\sx`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vnarrow"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vnarrow"},{"id":"valid-vcvtop","anchors":["valid-vcvtop"],"title":":math:`\\shape\\K{.}\\vcvtop\\K{\\_}\\half^?\\K{\\_}\\shape\\K{\\_}\\sx^?\\K{\\_zero}^?`","level":3,"path":"valid/instructions","prose":"","crossrefs":[],"formal_refs":["Instr_ok/vcvtop"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-vcvtop"},{"id":"valid-instrs","anchors":["valid-instrs"],"title":"Instruction Sequences","level":2,"path":"valid/instructions","prose":"Typing of instruction sequences is defined recursively.\n\n In combination with the previous rule,\n subsumption allows to compose instructions whose types would not directly fit otherwise.\n For example, consider the instruction sequence\n\n \n\n To type this sequence, its subsequence (CONST I32 (BINOP I32 ADD) needs to be valid with an intermediate type.\n But the direct type of (CONST I32 is eps I32, not matching the two inputs expected by $($(BINOP I32 ADD)).\n The subsumption rule allows to weaken the type of (CONST I32 to the supertype I32 I32 I32, such that it can be composed with $($(BINOP I32 ADD)) and yields the intermediate type I32 I32 I32 for the subsequence. That can in turn be composed with the first constant.\n\n Furthermore, subsumption allows to drop init variables x* from the instruction type in a context where they are not needed, for example, at the end of the body of a block.","crossrefs":["valid-block"],"formal_refs":["Instrs_ok","Instrs_ok/empty","Instrs_ok/seq","Instrs_ok/sub","Instrs_ok/frame","(CONST","I32","(BINOP","ADD)","eps","$($(BINOP","ADD))","x*"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-instrs"},{"id":"valid-expr","anchors":["valid-expr"],"title":"Expressions","level":2,"path":"valid/instructions","prose":"Expressions expr are classified by result types t*.","crossrefs":["syntax-resulttype"],"formal_refs":["Expr_ok","expr","t*"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-expr"},{"id":"valid-constant","anchors":["valid-constant"],"title":"Constant Expressions","level":3,"path":"valid/instructions","prose":"In a constant expression, all instructions must be constant.\n\n Currently, constant expressions occurring in globals are further constrained in that contained GLOBAL.GET instructions are only allowed to refer to imported or previously defined globals. Constant expressions occurring in tables may only have GLOBAL.GET instructions that refer to imported globals.\n This is enforced in the validation rule for modules by constraining the context C accordingly.\n\n The definition of constant expression may be extended in future versions of WebAssembly.","crossrefs":["syntax-global","syntax-table","valid-module"],"formal_refs":["Expr_const","Instr_const","Instr_const/const","Instr_const/vconst","Instr_const/binop","Instr_const/ref.null","Instr_const/ref.i31","Instr_const/ref.func","Instr_const/struct.new","Instr_const/struct.new_default","Instr_const/array.new","Instr_const/array.new_default","Instr_const/array.new_fixed","Instr_const/any.convert_extern","Instr_const/extern.convert_any","Instr_const/global.get","GLOBAL.GET","C"],"url":"https://webassembly.github.io/spec/core/valid/instructions.html#valid-constant"},{"id":"subtyping","anchors":["subtyping","match"],"title":"Matching","level":1,"path":"valid/matching","prose":"On most types, a notion of subtyping is defined that is applicable in validation rules, during module instantiation when checking the types of imports, or during execution, when performing casts.","crossrefs":["valid","exec-instantiation","exec"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/matching.html#subtyping"},{"id":"match-numtype","anchors":["match-numtype"],"title":"Number Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Numtype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-numtype"},{"id":"match-vectype","anchors":["match-vectype"],"title":"Vector Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Vectype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-vectype"},{"id":"match-heaptype","anchors":["match-heaptype"],"title":"Heap Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Heaptype_sub","Heaptype_sub/refl","Heaptype_sub/trans","Heaptype_sub/eq-any","Heaptype_sub/i31-eq","Heaptype_sub/struct-eq","Heaptype_sub/array-eq","Heaptype_sub/struct","Heaptype_sub/array","Heaptype_sub/func","Heaptype_sub/typeidx-l","Heaptype_sub/typeidx-r","Heaptype_sub/none","Heaptype_sub/nofunc","Heaptype_sub/noexn","Heaptype_sub/noextern","Heaptype_sub/bot","Heaptype_sub/def"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-heaptype"},{"id":"match-reftype","anchors":["match-reftype"],"title":"Reference Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Reftype_sub","Reftype_sub/*"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-reftype"},{"id":"match-valtype","anchors":["match-valtype"],"title":"Value Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Valtype_sub","Valtype_sub/bot","Valtype_sub/num","Valtype_sub/vec","Valtype_sub/ref"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-valtype"},{"id":"match-resulttype","anchors":["match-resulttype"],"title":"Result Types","level":2,"path":"valid/matching","prose":"Subtyping is lifted to result types in a pointwise manner.","crossrefs":["syntax-resulttype"],"formal_refs":["Resulttype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-resulttype"},{"id":"match-instrtype","anchors":["match-instrtype"],"title":"Instruction Types","level":2,"path":"valid/matching","prose":"Subtyping is further lifted to instruction types.\n\n Instruction types are contravariant in their input and covariant in their output.\n Moreover, the supertype may ignore variables from the init set x_1.\n It may also add* variables to the init set, provided these are already set in the context, i.e., are vacuously initialized.\n\n.. scratch\n Subtyping also incorporates a sort of \"frame\" condition, which allows adding arbitrary invariant stack elements on both sides in the super type.","crossrefs":["syntax-instrtype"],"formal_refs":["Instrtype_sub","x_1*"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-instrtype"},{"id":"match-comptype","anchors":["match-comptype","match-structtype","match-arraytype","match-functype"],"title":"Composite Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Comptype_sub","Comptype_sub/*"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-comptype"},{"id":"match-fieldtype","anchors":["match-fieldtype","match-storagetype","match-packtype"],"title":"Field Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Fieldtype_sub","Fieldtype_sub/*","Storagetype_sub","Packtype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-fieldtype"},{"id":"match-deftype","anchors":["match-deftype"],"title":"Defined Types","level":2,"path":"valid/matching","prose":"Note that there is no explicit definition of type equivalence,\n since it coincides with syntactic equality,\n as used in the premise of the former rule above.","crossrefs":[],"formal_refs":["Deftype_sub","Deftype_sub/refl","Deftype_sub/super"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-deftype"},{"id":"match-limits","anchors":["match-limits"],"title":"Limits","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Limits_sub","Limits_sub/*"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-limits"},{"id":"match-tagtype","anchors":["match-tagtype"],"title":"Tag Types","level":2,"path":"valid/matching","prose":"Although the conclusion of this rule looks identical to its premise,\n they in fact describe different relations:\n the premise invokes subtyping on defined types,\n while the conclusion defines it on tag types that happen to be expressed as defined types.","crossrefs":[],"formal_refs":["Tagtype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-tagtype"},{"id":"match-globaltype","anchors":["match-globaltype"],"title":"Global Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Globaltype_sub","Globaltype_sub/*"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-globaltype"},{"id":"match-memtype","anchors":["match-memtype"],"title":"Memory Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Memtype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-memtype"},{"id":"match-tabletype","anchors":["match-tabletype"],"title":"Table Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Tabletype_sub"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-tabletype"},{"id":"match-externtype","anchors":["match-externtype"],"title":"External Types","level":2,"path":"valid/matching","prose":"","crossrefs":[],"formal_refs":["Externtype_sub/tag","Externtype_sub/global","Externtype_sub/mem","Externtype_sub/table","Externtype_sub/func"],"url":"https://webassembly.github.io/spec/core/valid/matching.html#match-externtype"},{"id":"valid/modules-modules","anchors":[],"title":"Modules","level":1,"path":"valid/modules","prose":"Modules are valid when all the components they contain are valid.\nTo verify this, most definitions are themselves classified with a suitable type.","crossrefs":["syntax-module"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid-type","anchors":["valid-type","valid-types"],"title":"Types","level":2,"path":"valid/modules","prose":"The sequence of types defined in a module is validated incrementally, yielding a sequence of defined types representing them individually.","crossrefs":["syntax-type","syntax-deftype"],"formal_refs":["Type_ok","Types_ok","Types_ok/*"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-type"},{"id":"valid-tag","anchors":["valid-tag"],"title":"Tags","level":2,"path":"valid/modules","prose":"Tags \\tag are classified by their tag types,\nwhich are defined types expanding to function types.","crossrefs":["syntax-tagtype","syntax-deftype","syntax-functype"],"formal_refs":["Tag_ok"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-tag"},{"id":"valid-global","anchors":["valid-global","valid-globalseq"],"title":"Globals","level":2,"path":"valid/modules","prose":"Globals global are classified by global types.\n\nSequences of globals are handled incrementally, such that each definition has access to previous definitions.","crossrefs":["syntax-globaltype"],"formal_refs":["Global_ok","Globals_ok","Globals_ok/*","global"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-global"},{"id":"valid-mem","anchors":["valid-mem"],"title":"Memories","level":2,"path":"valid/modules","prose":"Memories mem are classified by memory types.","crossrefs":["syntax-memtype"],"formal_refs":["Mem_ok","mem"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-mem"},{"id":"valid-table","anchors":["valid-table"],"title":"Tables","level":2,"path":"valid/modules","prose":"Tables table are classified by table types.","crossrefs":["syntax-tabletype"],"formal_refs":["Table_ok","table"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-table"},{"id":"valid-func","anchors":["valid-func"],"title":"Functions","level":2,"path":"valid/modules","prose":"Functions func are classified by defined types that expand to function types of the form FUNC t_1 t_2.","crossrefs":["syntax-deftype","aux-expand-deftype","syntax-functype"],"formal_refs":["Func_ok","func","FUNC","t_1*","t_2*"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-func"},{"id":"valid-local","anchors":["valid-local"],"title":"Locals","level":2,"path":"valid/modules","prose":"Locals local are classified with local types.\n\n For cases where both rules are applicable, the former yields the more permissable type.","crossrefs":["syntax-localtype"],"formal_refs":["Local_ok","Local_ok/*","local"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-local"},{"id":"valid-data","anchors":["valid-data"],"title":"Data Segments","level":2,"path":"valid/modules","prose":"Data segments data are classified by the singleton data type, which merely expresses well-formedness.","crossrefs":["syntax-datatype"],"formal_refs":["Data_ok","data"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-data"},{"id":"valid-datamode","anchors":["valid-datamode"],"title":null,"level":0,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Datamode_ok","Datamode_ok/*"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-datamode"},{"id":"valid-elem","anchors":["valid-elem"],"title":"Element Segments","level":2,"path":"valid/modules","prose":"Element segments elem are classified by their element type.","crossrefs":["syntax-elemtype"],"formal_refs":["Elem_ok","elem"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-elem"},{"id":"valid-elemmode","anchors":["valid-elemmode"],"title":null,"level":0,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Elemmode_ok","Elemmode_ok/passive","Elemmode_ok/declare","Elemmode_ok/active"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-elemmode"},{"id":"valid-start","anchors":["valid-start"],"title":"Start Function","level":2,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Start_ok"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-start"},{"id":"valid-importdesc","anchors":["valid-importdesc","valid-import"],"title":"Imports","level":2,"path":"valid/modules","prose":"Imports import are classified by external types.","crossrefs":["syntax-externtype"],"formal_refs":["Import_ok","import"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-importdesc"},{"id":"valid-exportdesc","anchors":["valid-exportdesc","valid-export","valid-externidx"],"title":"Exports","level":2,"path":"valid/modules","prose":"Exports export are classified by their external type.","crossrefs":["syntax-externtype"],"formal_refs":["Export_ok","export"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-exportdesc"},{"id":"valid/modules-math-xxtag-x","anchors":[],"title":":math:`\\XXTAG~x`","level":3,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Externidx_ok/tag"],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid/modules-math-xxglobal-x","anchors":[],"title":":math:`\\XXGLOBAL~x`","level":3,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Externidx_ok/global"],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid/modules-math-xxmem-x","anchors":[],"title":":math:`\\XXMEM~x`","level":3,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Externidx_ok/mem"],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid/modules-math-xxtable-x","anchors":[],"title":":math:`\\XXTABLE~x`","level":3,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Externidx_ok/table"],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid/modules-math-xxfunc-x","anchors":[],"title":":math:`\\XXFUNC~x`","level":3,"path":"valid/modules","prose":"","crossrefs":[],"formal_refs":["Externidx_ok/func"],"url":"https://webassembly.github.io/spec/core/valid/modules.html"},{"id":"valid-module","anchors":["valid-module","syntax-moduletype"],"title":"Modules","level":2,"path":"valid/modules","prose":"Modules are classified by their mapping from the external types of their imports to those of their exports.\n\nA module is entirely closed,\nthat is, its components can only refer to definitions that appear in the module itself.\nConsequently, no initial context is required.\nInstead, the context C for validation of the module's content is constructed from the definitions in the module.\n\n All functions in a module are mutually recursive.\n Consequently, the definition of the context C in this rule is recursive:\n it depends on the outcome of validation of the function, table, memory, and global definitions contained in the module,\n which itself depends on C.\n However, this recursion is just a specification device.\n All types needed to construct C can easily be determined from a simple pre-pass over the module that does not perform any actual validation.\n\n Globals, however, are not recursive but evaluated sequentially, such that each constant expressions only has access to imported or previously defined globals.","crossrefs":["syntax-externtype","syntax-import","syntax-export","context","valid-constant"],"formal_refs":["Module_ok","C"],"url":"https://webassembly.github.io/spec/core/valid/modules.html#valid-module"},{"id":"valid/types-types","anchors":[],"title":"Types","level":1,"path":"valid/types","prose":"Simple types, such as number types are universally valid.\nHowever, restrictions apply to most other types, such as reference types, function types, as well as the limits of table types and memory types, which must be checked during validation.\n\nMoreover, block types are converted to instruction types for ease of processing.","crossrefs":["syntax-type","syntax-numtype","syntax-reftype","syntax-functype","syntax-limits","syntax-tabletype","syntax-memtype","syntax-blocktype","syntax-instrtype"],"formal_refs":[],"url":"https://webassembly.github.io/spec/core/valid/types.html"},{"id":"valid-numtype","anchors":["valid-numtype"],"title":"Number Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Numtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-numtype"},{"id":"valid-vectype","anchors":["valid-vectype"],"title":"Vector Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Vectype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-vectype"},{"id":"valid-typeuse","anchors":["valid-typeuse"],"title":"Type Uses","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Typeuse_ok/typeidx"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-typeuse"},{"id":"valid-heaptype","anchors":["valid-heaptype"],"title":"Heap Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Heaptype_ok/abs"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-heaptype"},{"id":"valid-reftype","anchors":["valid-reftype"],"title":"Reference Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Reftype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-reftype"},{"id":"valid-valtype","anchors":["valid-valtype"],"title":"Value Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Valtype_ok","Valtype_ok/bot"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-valtype"},{"id":"valid-resulttype","anchors":["valid-resulttype"],"title":"Result Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Resulttype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-resulttype"},{"id":"valid-blocktype","anchors":["valid-blocktype"],"title":"Block Types","level":2,"path":"valid/types","prose":"Block types may be expressed in one of two forms, both of which are converted to instruction types by the following rules.","crossrefs":["syntax-blocktype","syntax-instrtype"],"formal_refs":["Blocktype_ok/typeidx","Blocktype_ok/valtype"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-blocktype"},{"id":"valid-instrtype","anchors":["valid-instrtype"],"title":"Instruction Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Instrtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-instrtype"},{"id":"valid-comptype","anchors":["valid-comptype","valid-aggrtype","valid-structtype","valid-arraytype","valid-functype","valid-fieldtype","valid-storagetype","valid-packtype"],"title":"Composite Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Comptype_ok/struct","Comptype_ok/array","Comptype_ok/func","Fieldtype_ok","Packtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-comptype"},{"id":"valid-rectype","anchors":["valid-rectype","valid-subtype"],"title":"Recursive Types","level":2,"path":"valid/types","prose":"Recursive types are validated with respect to the first type index defined by the recursive group.\n\n The side condition on the index ensures that a declared supertype is a previously defined types,\n preventing cyclic subtype hierarchies.\n\n Future versions of WebAssembly may allow more than one supertype.","crossrefs":["syntax-rectype","syntax-typeidx"],"formal_refs":["Rectype_ok","Rectype_ok/empty","Rectype_ok/cons","Subtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-rectype"},{"id":"valid-limits","anchors":["valid-limits"],"title":"Limits","level":2,"path":"valid/types","prose":"Limits must have meaningful bounds that are within a given range.","crossrefs":["syntax-limits"],"formal_refs":["Limits_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-limits"},{"id":"valid-tagtype","anchors":["valid-tagtype"],"title":"Tag Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Tagtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-tagtype"},{"id":"valid-globaltype","anchors":["valid-globaltype"],"title":"Global Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Globaltype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-globaltype"},{"id":"valid-memtype","anchors":["valid-memtype"],"title":"Memory Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Memtype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-memtype"},{"id":"valid-tabletype","anchors":["valid-tabletype"],"title":"Table Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Tabletype_ok"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-tabletype"},{"id":"valid-externtype","anchors":["valid-externtype"],"title":"External Types","level":2,"path":"valid/types","prose":"","crossrefs":[],"formal_refs":["Externtype_ok/tag","Externtype_ok/global","Externtype_ok/mem","Externtype_ok/table","Externtype_ok/func"],"url":"https://webassembly.github.io/spec/core/valid/types.html#valid-externtype"}],"types":[{"name":"absheaptype","kind":"form","anchor":"syntax-absheaptype","members":[],"title":"Heap Types","prose":"Heap types classify objects in the runtime store.\nThere are three disjoint hierarchies of heap types:\n\n- function types classify functions,\n- aggregate types classify dynamically allocated managed data, such as structures, arrays, or unboxed scalars,\n- external types classify external references possibly owned by the embedder.\n\nThe values from the latter two hierarchies are interconvertible by ways of the EXTERN.CONVERT_ANY and ANY.CONVERT_EXTERN instructions.\nThat is, both type hierarchies are inhabited by an isomorphic set of values, but may have different, incompatible representations in practice.\n\nA heap type is either abstract or concrete.\nA concrete heap type consists of a type use that classifies an object of the respective type defined in a module.\nAbstract types are denoted by individual keywords.\n\nThe type FUNC denotes the common supertype of all function types, regardless of their concrete definition.\nDually, the type NOFUNC denotes the common subtype of all function types, regardless of their concrete definition.\nThis type has no values.\n\nThe type EXN denotes the common supertype of all exception references.\nThis type has no concrete subtypes.\nDually, the type NOEXN denotes the common subtype of all forms of exception references.\nThis type has no values.\n\nThe type EXTERN denotes the common supertype of all external references received through the embedder.\nThis type has no concrete subtypes.\nDually, the type NOEXTERN denotes the common subtype of all forms of external references.\nThis type has no values.\n\nThe type ANY denotes the common supertype of all aggregate types, as well as possibly abstract values produced by internalizing an external reference of type EXTERN.\nDually, the type NONE denotes the common subtype of all forms of aggregate types.\nThis type has no values.\n\nThe type EQ is a subtype of ANY that includes all types for which references can be compared, i.e., aggregate values and I31.\n\nThe types STRUCT and ARRAY denote the common supertypes of all structure and array aggregates, respectively.\n\nThe type I31 denotes unboxed scalars, that is, integers injected into references.\nTheir observable value range is limited to 31 bits.\n\n Values of type I31 are not actually allocated in the store,\n but represented in a way that allows them to be mixed with actual references into the store without ambiguity.\n Engines need to perform some form of pointer tagging to achieve this,\n which is why one bit is reserved.\n Since this type is to be reliably unboxed on all hardware platforms supported by WebAssembly,\n it cannot be wider than 32 bits minus the tag bit.\n\n Although the types NONE, NOFUNC, NOEXN, and NOEXTERN are not inhabited by any values,\n they can be used to form the types of all null references in their respective hierarchy.\n For example, (REF NULL NOFUNC) is the generic type of a null reference compatible with all function reference types.\n\nThe syntax of abstract heap types is extended with additional forms for the purpose of specifying validation and execution.","formal_refs":["absheaptype/syn","heaptype","EXTERN.CONVERT_ANY","ANY.CONVERT_EXTERN","FUNC","NOFUNC","EXN","NOEXN","EXTERN","NOEXTERN","ANY","NONE","EQ","I31","STRUCT","ARRAY","(REF","NULL","NOFUNC)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#type-abstract"},{"name":"addrtype","kind":"form","anchor":"syntax-addrtype","members":[],"title":"Address Types","prose":"Address types are a subset of number types that classify the values that can be used as offsets into\nmemories and tables.","formal_refs":["addrtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-addrtype"},{"name":"aggrtype","kind":"form","anchor":"syntax-aggrtype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"anyref","kind":"reference","anchor":"syntax-reftype","members":["arrayref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"arrayref","kind":"reference","anchor":"syntax-reftype","members":["anyref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"arraytype","kind":"form","anchor":"syntax-arraytype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"blocktype","kind":"form","anchor":"syntax-blocktype","members":[],"title":"Block Types","prose":"Block types classify the input and output of structured control instructions delimiting blocks of instructions.\n\nThey are given either as a type index that refers to a suitable function type reinterpreted as an instruction type,\nor as an optional value type inline,\nwhich is a shorthand for the instruction type eps valtype?.","formal_refs":["blocktype","eps","valtype?"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-blocktype"},{"name":"comptype","kind":"form","anchor":"syntax-comptype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"consttype","kind":"form","anchor":"syntax-consttype","members":[],"title":"Value Types","prose":"Value types classify the individual values that WebAssembly code can compute with and the values that a variable accepts.\nThey are either number types, vector types, or reference types.\n\nThe syntax of value types is extended with additional forms for the purpose of specifying validation.","formal_refs":["consttype","valtype/syn"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-valtype"},{"name":"datatype","kind":"form","anchor":"syntax-datatype","members":[],"title":"Data Types","prose":"Data types classify data segments.\nSince the contents of a data segment requires no further classification, they merely consist of a universal marker OK indicating well-formedness.","formal_refs":["datatype","OK"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-datatype"},{"name":"elemtype","kind":"form","anchor":"syntax-elemtype","members":[],"title":"Element Types","prose":"Element types classify element segments by the reference type of its elements.","formal_refs":["elemtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-elemtype"},{"name":"eqref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"exnref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"externref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"externtype","kind":"form","anchor":"syntax-externtype","members":[],"title":"External Types","prose":"External types classify imports and external addresses with their respective types.\n\nFor functions, the type use has to refer to the definition of a function type.\n\n Future versions of WebAssembly may have additional uses for tags, and may allow non-empty result types in the function types of tags.","formal_refs":["externtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-externtype"},{"name":"f32","kind":"number","anchor":"syntax-numtype","members":["f64","i32","i64"],"title":"Number Types","prose":"Number types classify numeric values.\n\nThe types I32 and I64 classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types F32 and F64 classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as single and double precision, as defined by the IEEE754 standard (Section 3.3).\n\nNumber types are transparent, meaning that their bit patterns can be observed.\nValues of number type can be stored in memories.","formal_refs":["numtype","I32","I64","F32","F64"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype"},{"name":"f64","kind":"number","anchor":"syntax-numtype","members":["f32","i32","i64"],"title":"Number Types","prose":"Number types classify numeric values.\n\nThe types I32 and I64 classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types F32 and F64 classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as single and double precision, as defined by the IEEE754 standard (Section 3.3).\n\nNumber types are transparent, meaning that their bit patterns can be observed.\nValues of number type can be stored in memories.","formal_refs":["numtype","I32","I64","F32","F64"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype"},{"name":"fieldtype","kind":"form","anchor":"syntax-fieldtype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"final","kind":"form","anchor":"syntax-final","members":[],"title":"Recursive Types","prose":"Recursive types denote a group of mutually recursive composite types, each of which can optionally declare a list of type uses of supertypes that it matches.\nEach type can also be declared final, preventing further subtyping.\n\nIn a module, each member of a recursive type is assigned a separate type index.\n\n.. _index:: ! address type, number type, bit width\n pair: abstract syntax; address type\n single: memory; address type\n single: table; address type","formal_refs":["rectype","subtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-rectype"},{"name":"funcref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","i31ref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"functype","kind":"form","anchor":"syntax-functype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"globaltype","kind":"form","anchor":"syntax-globaltype","members":[],"title":"Global Types","prose":"Global types classify global variables, which hold a value and can either be mutable or immutable.","formal_refs":["globaltype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-mut"},{"name":"heaptype","kind":"form","anchor":"syntax-heaptype","members":[],"title":"Heap Types","prose":"Heap types classify objects in the runtime store.\nThere are three disjoint hierarchies of heap types:\n\n- function types classify functions,\n- aggregate types classify dynamically allocated managed data, such as structures, arrays, or unboxed scalars,\n- external types classify external references possibly owned by the embedder.\n\nThe values from the latter two hierarchies are interconvertible by ways of the EXTERN.CONVERT_ANY and ANY.CONVERT_EXTERN instructions.\nThat is, both type hierarchies are inhabited by an isomorphic set of values, but may have different, incompatible representations in practice.\n\nA heap type is either abstract or concrete.\nA concrete heap type consists of a type use that classifies an object of the respective type defined in a module.\nAbstract types are denoted by individual keywords.\n\nThe type FUNC denotes the common supertype of all function types, regardless of their concrete definition.\nDually, the type NOFUNC denotes the common subtype of all function types, regardless of their concrete definition.\nThis type has no values.\n\nThe type EXN denotes the common supertype of all exception references.\nThis type has no concrete subtypes.\nDually, the type NOEXN denotes the common subtype of all forms of exception references.\nThis type has no values.\n\nThe type EXTERN denotes the common supertype of all external references received through the embedder.\nThis type has no concrete subtypes.\nDually, the type NOEXTERN denotes the common subtype of all forms of external references.\nThis type has no values.\n\nThe type ANY denotes the common supertype of all aggregate types, as well as possibly abstract values produced by internalizing an external reference of type EXTERN.\nDually, the type NONE denotes the common subtype of all forms of aggregate types.\nThis type has no values.\n\nThe type EQ is a subtype of ANY that includes all types for which references can be compared, i.e., aggregate values and I31.\n\nThe types STRUCT and ARRAY denote the common supertypes of all structure and array aggregates, respectively.\n\nThe type I31 denotes unboxed scalars, that is, integers injected into references.\nTheir observable value range is limited to 31 bits.\n\n Values of type I31 are not actually allocated in the store,\n but represented in a way that allows them to be mixed with actual references into the store without ambiguity.\n Engines need to perform some form of pointer tagging to achieve this,\n which is why one bit is reserved.\n Since this type is to be reliably unboxed on all hardware platforms supported by WebAssembly,\n it cannot be wider than 32 bits minus the tag bit.\n\n Although the types NONE, NOFUNC, NOEXN, and NOEXTERN are not inhabited by any values,\n they can be used to form the types of all null references in their respective hierarchy.\n For example, (REF NULL NOFUNC) is the generic type of a null reference compatible with all function reference types.\n\nThe syntax of abstract heap types is extended with additional forms for the purpose of specifying validation and execution.","formal_refs":["absheaptype/syn","heaptype","EXTERN.CONVERT_ANY","ANY.CONVERT_EXTERN","FUNC","NOFUNC","EXN","NOEXN","EXTERN","NOEXTERN","ANY","NONE","EQ","I31","STRUCT","ARRAY","(REF","NULL","NOFUNC)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#type-abstract"},{"name":"i31","kind":"form","anchor":"syntax-i31","members":[],"title":"Heap Types","prose":"Heap types classify objects in the runtime store.\nThere are three disjoint hierarchies of heap types:\n\n- function types classify functions,\n- aggregate types classify dynamically allocated managed data, such as structures, arrays, or unboxed scalars,\n- external types classify external references possibly owned by the embedder.\n\nThe values from the latter two hierarchies are interconvertible by ways of the EXTERN.CONVERT_ANY and ANY.CONVERT_EXTERN instructions.\nThat is, both type hierarchies are inhabited by an isomorphic set of values, but may have different, incompatible representations in practice.\n\nA heap type is either abstract or concrete.\nA concrete heap type consists of a type use that classifies an object of the respective type defined in a module.\nAbstract types are denoted by individual keywords.\n\nThe type FUNC denotes the common supertype of all function types, regardless of their concrete definition.\nDually, the type NOFUNC denotes the common subtype of all function types, regardless of their concrete definition.\nThis type has no values.\n\nThe type EXN denotes the common supertype of all exception references.\nThis type has no concrete subtypes.\nDually, the type NOEXN denotes the common subtype of all forms of exception references.\nThis type has no values.\n\nThe type EXTERN denotes the common supertype of all external references received through the embedder.\nThis type has no concrete subtypes.\nDually, the type NOEXTERN denotes the common subtype of all forms of external references.\nThis type has no values.\n\nThe type ANY denotes the common supertype of all aggregate types, as well as possibly abstract values produced by internalizing an external reference of type EXTERN.\nDually, the type NONE denotes the common subtype of all forms of aggregate types.\nThis type has no values.\n\nThe type EQ is a subtype of ANY that includes all types for which references can be compared, i.e., aggregate values and I31.\n\nThe types STRUCT and ARRAY denote the common supertypes of all structure and array aggregates, respectively.\n\nThe type I31 denotes unboxed scalars, that is, integers injected into references.\nTheir observable value range is limited to 31 bits.\n\n Values of type I31 are not actually allocated in the store,\n but represented in a way that allows them to be mixed with actual references into the store without ambiguity.\n Engines need to perform some form of pointer tagging to achieve this,\n which is why one bit is reserved.\n Since this type is to be reliably unboxed on all hardware platforms supported by WebAssembly,\n it cannot be wider than 32 bits minus the tag bit.\n\n Although the types NONE, NOFUNC, NOEXN, and NOEXTERN are not inhabited by any values,\n they can be used to form the types of all null references in their respective hierarchy.\n For example, (REF NULL NOFUNC) is the generic type of a null reference compatible with all function reference types.\n\nThe syntax of abstract heap types is extended with additional forms for the purpose of specifying validation and execution.","formal_refs":["absheaptype/syn","heaptype","EXTERN.CONVERT_ANY","ANY.CONVERT_EXTERN","FUNC","NOFUNC","EXN","NOEXN","EXTERN","NOEXTERN","ANY","NONE","EQ","I31","STRUCT","ARRAY","(REF","NULL","NOFUNC)"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#type-abstract"},{"name":"i31ref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","nullexnref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"i32","kind":"number","anchor":"syntax-numtype","members":["f32","f64","i64"],"title":"Number Types","prose":"Number types classify numeric values.\n\nThe types I32 and I64 classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types F32 and F64 classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as single and double precision, as defined by the IEEE754 standard (Section 3.3).\n\nNumber types are transparent, meaning that their bit patterns can be observed.\nValues of number type can be stored in memories.","formal_refs":["numtype","I32","I64","F32","F64"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype"},{"name":"i64","kind":"number","anchor":"syntax-numtype","members":["f32","f64","i32"],"title":"Number Types","prose":"Number types classify numeric values.\n\nThe types I32 and I64 classify 32 and 64 bit integers, respectively.\nIntegers are not inherently signed or unsigned, their interpretation is determined by individual operations.\n\nThe types F32 and F64 classify 32 and 64 bit floating-point data, respectively.\nThey correspond to the respective binary floating-point representations, also known as single and double precision, as defined by the IEEE754 standard (Section 3.3).\n\nNumber types are transparent, meaning that their bit patterns can be observed.\nValues of number type can be stored in memories.","formal_refs":["numtype","I32","I64","F32","F64"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype"},{"name":"limits","kind":"form","anchor":"syntax-limits","members":[],"title":"Limits","prose":"Limits classify the size range of resizeable storage associated with memory types and table types.\n\nIf no maximum is present,\nthen the respective storage can grow to any valid size.","formal_refs":["limits"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-limits"},{"name":"memtype","kind":"form","anchor":"syntax-memtype","members":[],"title":"Memory Types","prose":"Memory types classify linear memories and their size range.\n\nThe limits constrain the minimum and optionally the maximum size of a memory.\nThe limits are given in units of page size.","formal_refs":["memtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-memtype"},{"name":"mut","kind":"form","anchor":"syntax-mut","members":[],"title":"Global Types","prose":"Global types classify global variables, which hold a value and can either be mutable or immutable.","formal_refs":["globaltype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-mut"},{"name":"null","kind":"form","anchor":"syntax-null","members":[],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"nullexnref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","i31ref","nullexternref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"nullexternref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullfuncref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"nullfuncref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"nullref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","structref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"packtype","kind":"form","anchor":"syntax-packtype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"rectype","kind":"form","anchor":"syntax-rectype","members":[],"title":"Recursive Types","prose":"Recursive types denote a group of mutually recursive composite types, each of which can optionally declare a list of type uses of supertypes that it matches.\nEach type can also be declared final, preventing further subtyping.\n\nIn a module, each member of a recursive type is assigned a separate type index.\n\n.. _index:: ! address type, number type, bit width\n pair: abstract syntax; address type\n single: memory; address type\n single: table; address type","formal_refs":["rectype","subtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-rectype"},{"name":"resulttype","kind":"form","anchor":"syntax-resulttype","members":[],"title":"Result Types","prose":"Result types classify the result of executing instructions or functions,\nwhich is a sequence of values, written with brackets.","formal_refs":["resulttype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-resulttype"},{"name":"storagetype","kind":"form","anchor":"syntax-storagetype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"structref","kind":"reference","anchor":"syntax-reftype","members":["anyref","arrayref","eqref","exnref","externref","funcref","i31ref","nullexnref","nullexternref","nullfuncref","nullref"],"title":"Reference Types","prose":"Reference types classify values that are first-class references to objects in the runtime store.\n\nA reference type is characterised by the heap type it points to.\n\nIn addition, a reference type of the form REF NULL ht is nullable, meaning that it can either be a proper reference to ht or null.\nOther references are non-null.\n\nReference types are opaque, meaning that neither their size nor their bit pattern can be observed.\nValues of reference type can be stored in tables but not in memories.","formal_refs":["reftype","REF","NULL","ht"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-reftype"},{"name":"structtype","kind":"form","anchor":"syntax-structtype","members":[],"title":"Composite Types","prose":"Composite types are all types composed from simpler types,\nincluding function types, structure types and array types.\n\nFunction types classify the signature of functions,\nmapping a list of parameters to a list of results.\nThey are also used to classify the inputs and outputs of instructions.\n\nAggregate types like structure or array types consist of a list of possibly mutable, possibly packed field types describing their components.\nStructures are heterogeneous, but require static indexing, while arrays need to be homogeneous, but allow dynamic indexing.","formal_refs":["comptype","fieldtype","storagetype","packtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-comptype"},{"name":"subtype","kind":"form","anchor":"syntax-subtype","members":[],"title":"Recursive Types","prose":"Recursive types denote a group of mutually recursive composite types, each of which can optionally declare a list of type uses of supertypes that it matches.\nEach type can also be declared final, preventing further subtyping.\n\nIn a module, each member of a recursive type is assigned a separate type index.\n\n.. _index:: ! address type, number type, bit width\n pair: abstract syntax; address type\n single: memory; address type\n single: table; address type","formal_refs":["rectype","subtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-rectype"},{"name":"tabletype","kind":"form","anchor":"syntax-tabletype","members":[],"title":"Table Types","prose":"Table types classify tables over elements of reference type within a size range.\n\nLike memories, tables are constrained by limits for their minimum and optionally maximum size.\nThe limits are given in numbers of entries.","formal_refs":["tabletype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-tabletype"},{"name":"tagtype","kind":"form","anchor":"syntax-tagtype","members":[],"title":"Tag Types","prose":"Tag types classify the signature tags\nwith a type use referring to the definition of a function type that declares the types of parameter and result values associated with the tag.\nThe result type is empty for exception tags.","formal_refs":["tagtype"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-tagtype"},{"name":"typeuse","kind":"form","anchor":"syntax-typeuse","members":[],"title":"Type Uses","prose":"A type use is the use site of a type index referencing a composite type defined in a module.\nIt classifies objects of the respective type.\n\nThe syntax of type uses is extended with additional forms for the purpose of specifying validation and execution.","formal_refs":["typeuse/syn"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-typeuse"},{"name":"v128","kind":"vector","anchor":"syntax-vectype","members":[],"title":"Vector Types","prose":"Vector types classify vectors of numeric values processed by vector instructions (also known as SIMD instructions, single instruction multiple data).\n\nThe type V128 corresponds to a 128 bit vector of packed integer or floating-point data. The packed data\ncan be interpreted as signed or unsigned integers, single or double precision floating-point\nvalues, or a single 128 bit type. The interpretation is determined by individual operations.\n\nVector types, like number types are transparent, meaning that their bit patterns can be observed.\nValues of vector type can be stored in memories.","formal_refs":["vectype","V128"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-vectype"},{"name":"valtype","kind":"form","anchor":"syntax-valtype","members":[],"title":"Value Types","prose":"Value types classify the individual values that WebAssembly code can compute with and the values that a variable accepts.\nThey are either number types, vector types, or reference types.\n\nThe syntax of value types is extended with additional forms for the purpose of specifying validation.","formal_refs":["consttype","valtype/syn"],"url":"https://webassembly.github.io/spec/core/syntax/types.html#syntax-valtype"}],"report":{"instructions":497,"reserved":81,"structural":2,"missing_macro":0,"missing_category":0,"incomplete":0,"sections":972,"types":47}}
|