From 0aa9dbaee32de702fd80ffb452ea9e889ea0e76c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 6 Jul 2026 20:33:22 -0700 Subject: [PATCH 01/24] Syntax and validation for struct.new_desc And struct.new_default_desc. Also update the valiation for struct.new and struct.new_default to require empty descriptors. Add an explanation of expansion to desctype to the validation conventions section and teach SpecTec about the new ExpandDesc relation to avoid errors during rendering. --- document/core/syntax/instructions.rst | 5 ++++- document/core/util/macros.def | 4 ++++ document/core/valid/conventions.rst | 5 +++++ document/core/valid/instructions.rst | 20 +++++++++++++++++++ .../wasm-latest/1.2-syntax.types.spectec | 2 +- .../1.3-syntax.instructions.spectec | 2 ++ .../wasm-latest/2.1-validation.types.spectec | 5 +++++ .../2.3-validation.instructions.spectec | 13 ++++++++++-- spectec/src/backend-prose/gen.ml | 2 +- 9 files changed, 53 insertions(+), 5 deletions(-) diff --git a/document/core/syntax/instructions.rst b/document/core/syntax/instructions.rst index 74bbcc634..7a93f1d59 100644 --- a/document/core/syntax/instructions.rst +++ b/document/core/syntax/instructions.rst @@ -265,6 +265,8 @@ while the latter performs a downcast and :ref:`traps ` if the operand's ty .. _syntax-struct.new: .. _syntax-struct.new_default: +.. _syntax-struct.new_desc: +.. _syntax-struct.new_default_desc: .. _syntax-struct.get: .. _syntax-struct.get_s: .. _syntax-struct.get_u: @@ -301,7 +303,8 @@ Instructions in this group are concerned with creating and accessing :ref:`refer $${syntax: {instr/struct instr/array instr/i31 instr/extern}} -The instructions ${:STRUCT.NEW} and ${:STRUCT.NEW_DEFAULT} allocate a new :ref:`structure `, initializing them either with operands or with default values. +The instructions ${:STRUCT.NEW}, ${:STRUCT.NEW_DEFAULT} allocate a new :ref:`structure `, initializing them either with operands or with default values. +The instructions ${:STRUCT.NEW_DESC} and ${:STRUCT.NEW_DEFAULT_DESC} do the same, but additionally take the :ref:`descriptor ` operand necessary to allocate types with descriptors. The remaining instructions on structs access individual fields, allowing for different sign extension modes in the case of :ref:`packed ` storage types. diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 1a81d68af..35413fb95 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -342,8 +342,10 @@ .. |rolldt| mathdef:: \xref{valid/conventions}{aux-roll-deftype}{\F{roll}} .. |unrolldt| mathdef:: \xref{valid/conventions}{aux-unroll-deftype}{\F{unroll}} .. |expanddt| mathdef:: \xref{valid/conventions}{aux-expand-deftype}{\F{expand}} +.. |expanddttodesctype| mathdef:: \xref{valid/conventions}{aux-expand-deftype-to-desctype}{\F{expand}} .. |approxexpanddt| mathdef:: \mathrel{\xref{valid/conventions}{aux-expand-deftype}{\approx}} .. |approxexpandyy| mathdef:: \mathrel{\xref{valid/conventions}{aux-expand-typeuse}{\approx}} +.. |approxexpanddttodesctype| mathdef:: \mathrel{\xref{valid/conventions}{aux-expand-deftype-to-desctype}{\approx}} .. |unrollht| mathdef:: \xref{appendix/properties}{aux-unroll-heaptype}{\F{unroll}} .. |unpack| mathdef:: \xref{syntax/types}{aux-unpack}{\F{unpack}} @@ -551,6 +553,8 @@ .. |STRUCTNEW| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new}} .. |STRUCTNEWDEFAULT| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new\_default}} +.. |STRUCTNEWDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new\_desc}} +.. |STRUCTNEWDEFAULTDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new\_default\_desc}} .. |STRUCTGET| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}get}} .. |STRUCTGETS| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}get\_s}} .. |STRUCTGETU| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}get\_u}} diff --git a/document/core/valid/conventions.rst b/document/core/valid/conventions.rst index 7164062ed..8ec31b468 100644 --- a/document/core/valid/conventions.rst +++ b/document/core/valid/conventions.rst @@ -138,6 +138,7 @@ Conventions .. _aux-roll-deftype: .. _aux-unroll-deftype: .. _aux-expand-deftype: +.. _aux-expand-deftype-to-desctype: .. _aux-expand-typeuse: Rolling and Unrolling @@ -169,6 +170,10 @@ $${rule: Expand {Expand_use/*}} $${relation-ignore: Expand Expand_use} $${definition-ignore: expanddt} +We use the same notation to denote the expansion of a :ref:`defined type ` or :ref:`type use ` to a :ref:`desctype ` as well. + +$${rule: ExpandDesc} + .. index:: ! instruction type, value type, result type, instruction, local, local index pair: abstract syntax; instruction type diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index 6013d4de2..8ddb6465a 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -854,6 +854,26 @@ $${rule-prose: Instr_ok/struct.new_default} $${rule: Instr_ok/struct.new_default} +.. _valid-struct.new_desc: + +:math:`\STRUCTNEWDESC~x` +........................ + +$${rule-prose: Instr_ok/struct.new_desc} + +$${rule: Instr_ok/struct.new_desc} + + +.. _valid-struct.new_default_desc: + +:math:`\STRUCTNEWDEFAULTDESC~x` +............................... + +$${rule-prose: Instr_ok/struct.new_default_desc} + +$${rule: Instr_ok/struct.new_default_desc} + + .. _valid-struct.get: .. _valid-struct.get_u: .. _valid-struct.get_s: diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index a4b2249e7..25990998e 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -474,7 +474,7 @@ def $rollrt(typeidx, rectype) : rectype hint(show $roll_(%, %)) hint(macro "r def $unrollrt(rectype) : rectype hint(show $unroll(%)) hint(macro "unrollrt") def $rolldt(typeidx, rectype) : deftype* hint(show $roll_(%)*#((%))) hint(macro "rolldt") def $unrolldt(deftype) : subtype hint(show $unroll(%)) hint(macro "unrolldt") -def $expanddt_to_desctype(deftype) : desctype hint(show $expand_desc(%)) +def $expanddt_to_desctype(deftype) : desctype hint(show $expand_desc(%)) hint(macro "expanddttodesctype") def $expanddt(deftype) : comptype hint(show $expand(%)) hint(macro "expanddt") def $rollrt(x, rectype) = REC ($subst_subtype(subtype, ((_IDX $(x + i)))^(i` of %1 is %2") ;; TODO(3, ?): avoid hardcoding reST + +rule ExpandDesc: deftype ~~ desctype -- if $expanddt_to_desctype(deftype) = desctype + ;; Type definitions diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index aa012b18f..99829b6ae 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -251,11 +251,20 @@ rule Instr_ok/i31.get: rule Instr_ok/struct.new: C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_IDX x)) - -- Expand: C.TYPES[x] ~~ STRUCT (mut? zt)* + -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* rule Instr_ok/struct.new_default: C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_IDX x)) - -- Expand: C.TYPES[x] ~~ STRUCT (mut? zt)* + -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* + -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* + +rule Instr_ok/struct.new_desc: + C |- STRUCT.NEW_DESC x : $unpack(zt)* (REF NULL (EXACT (_IDX y))) -> (REF (EXACT (_IDX x))) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) + +rule Instr_ok/struct.new_default_desc: + C |- STRUCT.NEW_DEFAULT_DESC x : (REF NULL (EXACT (_IDX y))) -> (REF (EXACT (_IDX x))) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* def $is_packtype(storagetype) : bool hint(show %1 = $unpack(%1)) hint(prose "%1 is a packed type") diff --git a/spectec/src/backend-prose/gen.ml b/spectec/src/backend-prose/gen.ml index 4c88ce6b0..9b966ce22 100644 --- a/spectec/src/backend-prose/gen.ml +++ b/spectec/src/backend-prose/gen.ml @@ -32,7 +32,7 @@ let flatten_rec def = let is_validation_helper_relation def = match def.it with - | Ast.RelD (id, _, _, _) -> id.it = "Expand" || id.it = "Expand_use" + | Ast.RelD (id, _, _, _) -> id.it = "Expand" || id.it = "Expand_use" || id.it = "ExpandDesc" | _ -> false (* NOTE: Assume validation relation is `|-` *) let is_validation_relation def = From 47b07b73918d2c2e023c89c94824b895ed432cc5 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 7 Jul 2026 10:10:57 -0700 Subject: [PATCH 02/24] const expr --- document/core/valid/instructions.rst | 1 + .../wasm-latest/2.3-validation.instructions.spectec | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index 8ddb6465a..c49fc727a 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -1441,6 +1441,7 @@ $${rule: {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/struct.new_desc Instr_const/struct.new_default_desc} {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} diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 99829b6ae..2e042e76f 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -682,6 +682,12 @@ rule Instr_const/struct.new: rule Instr_const/struct.new_default: C |- (STRUCT.NEW_DEFAULT x) CONST +rule Instr_const/struct.new_desc: + C |- (STRUCT.NEW_DESC x) CONST + +rule Instr_const/struct.new_default_desc: + C |- (STRUCT.NEW_DEFAULT_DESC x) CONST + rule Instr_const/array.new: C |- (ARRAY.NEW x) CONST From 2ca8cdd96bcd3db89f33ca8ca86ae4ca7625988a Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 7 Jul 2026 18:35:22 -0700 Subject: [PATCH 03/24] Exact func externtypes types Update the syntax of func externtypes and func types in the typing context to include exactness. This allows specifying exact function imports and properly typing ref.func as exact for exact imports and defined functions and otherwise as inexact. --- document/core/util/macros.def | 3 +++ .../wasm-latest/1.2-syntax.types.spectec | 22 ++++++++++++++----- .../2.0-validation.contexts.spectec | 2 +- .../wasm-latest/2.1-validation.types.spectec | 2 +- .../2.2-validation.subtyping.spectec | 4 ++-- .../2.3-validation.instructions.spectec | 16 ++++++++++---- .../2.4-validation.modules.spectec | 12 +++++----- .../wasm-latest/4.1-execution.values.spectec | 2 +- .../wasm-latest/5.2-binary.types.spectec | 3 ++- .../wasm-latest/6.2-text.types.spectec | 3 ++- 10 files changed, 48 insertions(+), 21 deletions(-) diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 35413fb95..8676c91fe 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -239,6 +239,7 @@ .. |NULL| mathdef:: \xref{syntax/types}{syntax-reftype}{\K{null}} .. |EXACT| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{exact}} +.. |INEXACT| mathdef:: {} .. |ANY| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{any}} .. |EQT| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{eq}} .. |I31| mathdef:: \xref{syntax/types}{syntax-heaptype}{\K{i\scriptstyle31}} @@ -309,6 +310,7 @@ .. |subtype| mathdef:: \xref{syntax/types}{syntax-subtype}{\X{subtype}} .. |rectype| mathdef:: \xref{syntax/types}{syntax-rectype}{\X{rectype}} .. |deftype| mathdef:: \xref{valid/conventions}{syntax-deftype}{\X{deftype}} +.. |exact| mathdef:: \X{exact} .. |globaltype| mathdef:: \xref{syntax/types}{syntax-globaltype}{\X{globaltype}} .. |tabletype| mathdef:: \xref{syntax/types}{syntax-tabletype}{\X{tabletype}} @@ -349,6 +351,7 @@ .. |unrollht| mathdef:: \xref{appendix/properties}{aux-unroll-heaptype}{\F{unroll}} .. |unpack| mathdef:: \xref{syntax/types}{aux-unpack}{\F{unpack}} +.. |exactheaptype| mathdef:: \F{exactheaptype} .. |funcsxt| mathdef:: \xref{syntax/types}{syntax-externtype}{\F{funcs}} .. |tablesxt| mathdef:: \xref{syntax/types}{syntax-externtype}{\F{tables}} diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index 25990998e..0502851e4 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -7,6 +7,9 @@ ;; TODO(3, rossberg): add ability to do this inline syntax null hint(show NULL) hint(macro "%" "%") = NULL +syntax exact hint(desc "exactness") = + | EXACT | INEXACT + syntax addrtype hint(desc "address type") = | I32 | I64 @@ -32,6 +35,8 @@ syntax rectype hint(desc "recursive type") ;; forward decl syntax deftype hint(desc "defined type") = | _DEF rectype n hint(show %.%) +syntax exactdeftype hint(show (exact deftype)) = exact deftype + syntax typeuse/syn hint(desc "type use") = | _IDX typeidx | ... syntax typeuse/sem = @@ -85,6 +90,12 @@ def $NULLEXNREF = (REF NULL NOEXN) def $NULLEXTERNREF = (REF NULL NOEXTERN) +def $exactheaptype(exact, typeuse) : heaptype + +def $exactheaptype(EXACT, typeuse) = EXACT typeuse +def $exactheaptype(INEXACT, typeuse) = typeuse + + ;; Packed types syntax packtype hint(desc "packed type") = I8 | I16 @@ -141,7 +152,7 @@ syntax datatype hint(desc "data type") = OK hint(macro "%data") syntax elemtype hint(desc "element type") = reftype syntax externtype hint(desc "external type") hint(macro "%" "XT%") = - | TAG tagtype | GLOBAL globaltype | MEM memtype | TABLE tabletype | FUNC typeuse + | TAG tagtype | GLOBAL globaltype | MEM memtype | TABLE tabletype | FUNC exact typeuse syntax moduletype hint(desc "module type") = externtype* -> externtype* hint(macro "toM") @@ -156,6 +167,7 @@ var at : addrtype ;; var bt : blocktype ;; defined below var ct : comptype var dt : deftype +var edt : exactdeftype var et : elemtype var ft : fieldtype var gt : globaltype @@ -315,7 +327,7 @@ def $tagsxt(externtype*) : tagtype* hint(show $tags(%)) hint(macro "ta def $globalsxt(externtype*) : globaltype* hint(show $globals(%)) hint(macro "globalsxt") def $memsxt(externtype*) : memtype* hint(show $mems(%)) hint(macro "memsxt") def $tablesxt(externtype*) : tabletype* hint(show $tables(%)) hint(macro "tablesxt") -def $funcsxt(externtype*) : deftype* hint(show $funcs(%)) hint(macro "funcsxt") +def $funcsxt(externtype*) : exactdeftype* hint(show $funcs(%)) hint(macro "funcsxt") def $tagsxt(eps) = eps def $tagsxt((TAG jt) xt*) = jt $tagsxt(xt*) @@ -334,7 +346,7 @@ def $tablesxt((TABLE tt) xt*) = tt $tablesxt(xt*) def $tablesxt(externtype xt*) = $tablesxt(xt*) -- otherwise def $funcsxt(eps) = eps -def $funcsxt((FUNC dt) xt*) = dt $funcsxt(xt*) +def $funcsxt((FUNC exact dt) xt*) = (exact dt) $funcsxt(xt*) def $funcsxt(externtype xt*) = $funcsxt(xt*) -- otherwise @@ -436,7 +448,7 @@ def $subst_externtype((TAG jt), tv*, tu*) = TAG $subst_tagtype(jt, tv*, tu*) def $subst_externtype((GLOBAL gt), tv*, tu*) = GLOBAL $subst_globaltype(gt, tv*, tu*) def $subst_externtype((TABLE tt), tv*, tu*) = TABLE $subst_tabletype(tt, tv*, tu*) def $subst_externtype((MEM mt), tv*, tu*) = MEM $subst_memtype(mt, tv*, tu*) -def $subst_externtype((FUNC dt), tv*, tu*) = FUNC $subst_deftype(dt, tv*, tu*) +def $subst_externtype((FUNC exact dt), tv*, tu*) = FUNC exact $subst_deftype(dt, tv*, tu*) def $subst_moduletype(xt_1* -> xt_2*, tv*, tu*) = $subst_externtype(xt_1, tv*, tu*)* -> $subst_externtype(xt_2, tv*, tu*)* @@ -598,7 +610,7 @@ def $free_externtype(TAG tagtype) = $free_tagtype(tagtype) def $free_externtype(GLOBAL globaltype) = $free_globaltype(globaltype) def $free_externtype(MEM memtype) = $free_memtype(memtype) def $free_externtype(TABLE tabletype) = $free_tabletype(tabletype) -def $free_externtype(FUNC typeuse) = $free_typeuse(typeuse) +def $free_externtype(FUNC exact typeuse) = $free_typeuse(typeuse) def $free_moduletype(externtype_1* -> externtype_2*) = $free_list($free_externtype(externtype_1)*) ++ diff --git a/specification/wasm-latest/2.0-validation.contexts.spectec b/specification/wasm-latest/2.0-validation.contexts.spectec index e9205fa2b..a48d50338 100644 --- a/specification/wasm-latest/2.0-validation.contexts.spectec +++ b/specification/wasm-latest/2.0-validation.contexts.spectec @@ -28,7 +28,7 @@ syntax context hint(desc "context") hint(macro "%" "C%") = GLOBALS globaltype* hint(desc "global"), MEMS memtype* hint(desc "memory"), TABLES tabletype* hint(desc "table"), - FUNCS deftype* hint(desc "function"), + FUNCS exactdeftype* hint(desc "function"), DATAS datatype* hint(desc "data segment"), ELEMS elemtype* hint(desc "element segment"), LOCALS localtype* hint(desc "local"), diff --git a/specification/wasm-latest/2.1-validation.types.spectec b/specification/wasm-latest/2.1-validation.types.spectec index ddb81eb2f..c1089a135 100644 --- a/specification/wasm-latest/2.1-validation.types.spectec +++ b/specification/wasm-latest/2.1-validation.types.spectec @@ -265,6 +265,6 @@ rule Externtype_ok/table: -- Tabletype_ok: C |- tabletype : OK rule Externtype_ok/func: - C |- FUNC typeuse : OK + C |- FUNC exact typeuse : OK -- Typeuse_ok: C |- typeuse : OK -- Expand_use: typeuse ~~_C $($(FUNC t_1* -> t_2*)) diff --git a/specification/wasm-latest/2.2-validation.subtyping.spectec b/specification/wasm-latest/2.2-validation.subtyping.spectec index 9bd60602f..3c7fd4bf2 100644 --- a/specification/wasm-latest/2.2-validation.subtyping.spectec +++ b/specification/wasm-latest/2.2-validation.subtyping.spectec @@ -260,5 +260,5 @@ rule Externtype_sub/table: -- Tabletype_sub: C |- tabletype_1 <: tabletype_2 rule Externtype_sub/func: - C |- FUNC deftype_1 <: FUNC deftype_2 - -- Deftype_sub: C |- deftype_1 <: deftype_2 + C |- FUNC exact_1 deftype_1 <: FUNC exact_2 deftype_2 + -- Heaptype_sub: C |- $exactheaptype(exact_1, deftype_1) <: $exactheaptype(exact_2, deftype_2) diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 2e042e76f..0da536a45 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -120,7 +120,8 @@ rule Instr_ok/br_on_cast_fail: rule Instr_ok/call: C |- CALL x : t_1* -> t_2* - -- Expand: C.FUNCS[x] ~~ FUNC t_1* -> t_2* + -- if C.FUNCS[x] = exact dt + -- Expand: dt ~~ FUNC t_1* -> t_2* rule Instr_ok/call_ref: C |- CALL_REF (_IDX x) : t_1* (REF NULL (_IDX x)) -> t_2* @@ -140,7 +141,8 @@ rule Instr_ok/return: ;; TODO(3, rossberg): enable t_2* <: C.RETURN rule Instr_ok/return_call: C |- RETURN_CALL x : t_3* t_1* -> t_4* - -- Expand: C.FUNCS[x] ~~ FUNC t_1* -> t_2* + -- if C.FUNCS[x] = exact dt + -- Expand: dt ~~ FUNC t_1* -> t_2* -- if C.RETURN = (t'_2*) -- Resulttype_sub: C |- t_2* <: t'_2* -- Instrtype_ok: C |- t_3* -> t_4* : OK @@ -210,8 +212,14 @@ rule Instr_ok/ref.null: -- Heaptype_ok: C |- ht : OK rule Instr_ok/ref.func: - C |- REF.FUNC x : eps -> (REF dt) - -- if C.FUNCS[x] = dt + C |- REF.FUNC x : eps -> (REF ht) + -- if C.FUNCS[x] = exact dt + -- if ht = $exactheaptype(exact, dt) + -- if x <- C.REFS + +rule Instr_ok/ref.func-exact: + C |- REF.FUNC x : eps -> (REF (EXACT dt)) + -- if C.FUNCS[x] = EXACT dt -- if x <- C.REFS rule Instr_ok/ref.i31: diff --git a/specification/wasm-latest/2.4-validation.modules.spectec b/specification/wasm-latest/2.4-validation.modules.spectec index a78814662..2d021afe2 100644 --- a/specification/wasm-latest/2.4-validation.modules.spectec +++ b/specification/wasm-latest/2.4-validation.modules.spectec @@ -90,7 +90,8 @@ rule Elemmode_ok/active: rule Start_ok: C |- START x : OK - -- Expand: C.FUNCS[x] ~~ FUNC eps -> eps + -- if C.FUNCS[x] = exact dt + -- Expand: dt ~~ FUNC eps -> eps ;; Im/exports @@ -125,8 +126,8 @@ rule Externidx_ok/table: -- if C.TABLES[x] = tt rule Externidx_ok/func: - C |- FUNC x : FUNC dt - -- if C.FUNCS[x] = dt + C |- FUNC x : FUNC exact dt + -- if C.FUNCS[x] = exact dt ;; Modules @@ -159,14 +160,15 @@ rule Module_ok: ---- -- if C = C' ++ {TAGS jt_I* jt*, GLOBALS gt*, MEMS mt_I* mt*, TABLES tt_I* tt*, DATAS ok*, ELEMS rt*} ---- - -- if C' = {TYPES dt'*, GLOBALS gt_I*, FUNCS dt_I* dt*, REFS x*} + -- if C' = {TYPES dt'*, GLOBALS gt_I*, FUNCS edt_I* edt*, REFS x*} + -- if edt* = (EXACT dt)* -- if x* = $funcidx_nonfuncs(global* mem* table* elem*) ---- -- if jt_I* = $tagsxt(xt_I*) -- if gt_I* = $globalsxt(xt_I*) -- if mt_I* = $memsxt(xt_I*) -- if tt_I* = $tablesxt(xt_I*) - -- if dt_I* = $funcsxt(xt_I*) + -- if edt_I* = $funcsxt(xt_I*) rule Types_ok/empty: diff --git a/specification/wasm-latest/4.1-execution.values.spectec b/specification/wasm-latest/4.1-execution.values.spectec index 1b38a0623..03cef8d5a 100644 --- a/specification/wasm-latest/4.1-execution.values.spectec +++ b/specification/wasm-latest/4.1-execution.values.spectec @@ -102,7 +102,7 @@ rule Externaddr_ok/table: -- if s.TABLES[a] = tableinst rule Externaddr_ok/func: - s |- FUNC a : FUNC funcinst.TYPE + s |- FUNC a : FUNC EXACT funcinst.TYPE -- if s.FUNCS[a] = funcinst rule Externaddr_ok/sub: diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index 743ff8785..c44cdb5b6 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -100,7 +100,8 @@ grammar Btabletype : tabletype = grammar Bexterntype : externtype = - | 0x00 x:Btypeidx => FUNC (_IDX x) + | 0x00 x:Btypeidx => FUNC INEXACT (_IDX x) + | 0x20 x:Btypeidx => FUNC EXACT (_IDX x) | 0x01 tt:Btabletype => TABLE tt | 0x02 mt:Bmemtype => MEM mt | 0x03 gt:Bglobaltype => GLOBAL gt diff --git a/specification/wasm-latest/6.2-text.types.spectec b/specification/wasm-latest/6.2-text.types.spectec index 2afedafc9..ee285b8fa 100644 --- a/specification/wasm-latest/6.2-text.types.spectec +++ b/specification/wasm-latest/6.2-text.types.spectec @@ -152,7 +152,8 @@ grammar Texterntype_(I) : (externtype, idctxt) = | "(" "global" id?:Tid? gt:Tglobaltype_(I) ")" => (GLOBAL gt, {GLOBALS (id?)}) | "(" "memory" id?:Tid? mt:Tmemtype_(I) ")" => (MEM mt, {MEMS (id?)}) | "(" "table" id?:Tid? tt:Ttabletype_(I) ")" => (TABLE tt, {TABLES (id?)}) - | "(" "func" id?:Tid? (x,I'):Ttypeuse_(I) ")" => (FUNC $($(_IDX x)), {FUNCS (id?)}) + | "(" "func" id?:Tid? (x,I'):Ttypeuse_(I) ")" => (FUNC INEXACT $($(_IDX x)), {FUNCS (id?)}) + | "(" "func" id?:Tid? "(" "exact" (x,I'):Ttypeuse_(I) ")" ")" => (FUNC EXACT $($(_IDX x)), {FUNCS (id?)}) ;; Type uses From ca049ee91d58f8eb202fb51b51169f0288390cef Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 8 Jul 2026 19:07:55 -0700 Subject: [PATCH 04/24] cleanup old Instr_ok/ref.func-exact --- .../wasm-latest/2.3-validation.instructions.spectec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 0da536a45..a41160bf6 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -217,11 +217,6 @@ rule Instr_ok/ref.func: -- if ht = $exactheaptype(exact, dt) -- if x <- C.REFS -rule Instr_ok/ref.func-exact: - C |- REF.FUNC x : eps -> (REF (EXACT dt)) - -- if C.FUNCS[x] = EXACT dt - -- if x <- C.REFS - rule Instr_ok/ref.i31: C |- REF.I31 : I32 -> (REF I31) From edfe5a2550ce1ca0020ef6349a79346cdfa2a57e Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 8 Jul 2026 19:15:14 -0700 Subject: [PATCH 05/24] Make allocation instructions exact --- .../2.3-validation.instructions.spectec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index a41160bf6..d9692abf0 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -253,11 +253,11 @@ rule Instr_ok/i31.get: ;; Structure instructions rule Instr_ok/struct.new: - C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_IDX x)) + C |- STRUCT.NEW x : $unpack(zt)* -> (REF (EXACT (_IDX x))) -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* rule Instr_ok/struct.new_default: - C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_IDX x)) + C |- STRUCT.NEW_DEFAULT x : eps -> (REF (EXACT (_IDX x))) -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* @@ -288,25 +288,25 @@ rule Instr_ok/struct.set: ;; Array instructions rule Instr_ok/array.new: - C |- ARRAY.NEW x : $unpack(zt) I32 -> (REF (_IDX x)) + C |- ARRAY.NEW x : $unpack(zt) I32 -> (REF (EXACT (_IDX x))) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) rule Instr_ok/array.new_default: - C |- ARRAY.NEW_DEFAULT x : I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_DEFAULT x : I32 -> (REF (EXACT (_IDX x))) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) -- Defaultable: |- $unpack(zt) DEFAULTABLE rule Instr_ok/array.new_fixed: - C |- ARRAY.NEW_FIXED x n : $unpack(zt)^n -> (REF (_IDX x)) + C |- ARRAY.NEW_FIXED x n : $unpack(zt)^n -> (REF (EXACT (_IDX x))) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) rule Instr_ok/array.new_elem: - C |- ARRAY.NEW_ELEM x y : I32 I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_ELEM x y : I32 I32 -> (REF (EXACT (_IDX x))) -- Expand: C.TYPES[x] ~~ ARRAY (mut? rt) -- Reftype_sub: C |- C.ELEMS[y] <: rt rule Instr_ok/array.new_data: - C |- ARRAY.NEW_DATA x y : I32 I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_DATA x y : I32 I32 -> (REF (EXACT (_IDX x))) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) -- if $unpack(zt) = numtype \/ $unpack(zt) = vectype -- if C.DATAS[y] = OK From ff4650a940d1c656983e50740982137397968599 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 8 Jul 2026 20:18:39 -0700 Subject: [PATCH 06/24] Syntax and validation for ref.get_desc --- document/core/syntax/instructions.rst | 5 ++++- document/core/util/macros.def | 1 + document/core/valid/instructions.rst | 10 ++++++++++ .../wasm-latest/1.3-syntax.instructions.spectec | 1 + .../wasm-latest/2.3-validation.instructions.spectec | 8 ++++++++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/document/core/syntax/instructions.rst b/document/core/syntax/instructions.rst index 7a93f1d59..516e02a67 100644 --- a/document/core/syntax/instructions.rst +++ b/document/core/syntax/instructions.rst @@ -231,6 +231,7 @@ The ${:DATA.DROP} instruction prevents further use of a passive data segment. Th .. _syntax-ref.is_null: .. _syntax-ref.as_non_null: .. _syntax-ref.eq: +.. _syntax-ref.get_desc: .. _syntax-ref.test: .. _syntax-ref.cast: .. _syntax-instr-ref: @@ -247,7 +248,9 @@ The ${:REF.NULL} and ${:REF.FUNC} instructions produce a :ref:`null ` to a non-null one, and :ref:`traps ` if it encounters null. -The ${:REF.EQ} compares two references. +The instruction ${:REF.EQ} compares two references. + +The instruction ${:REF.GET_DESC} gets the :ref:`descriptor ` of an allocated value. The instructions ${:REF.TEST} and ${:REF.CAST} test the :ref:`dynamic type ` of a reference operand. The former merely returns the result of the test, diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 8676c91fe..36e6965dc 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -551,6 +551,7 @@ .. |REFISNULL| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}is\_null}} .. |REFASNONNULL| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}as\_non\_null}} .. |REFEQ| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}eq}} +.. |REFGETDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref.get\_desc}} .. |REFTEST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}test}} .. |REFCAST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}cast}} diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index c49fc727a..1da2143a7 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -803,6 +803,16 @@ $${rule-prose: Instr_ok/ref.eq} $${rule: Instr_ok/ref.eq} +.. _valid-ref.get_desc: + +:math:`\REFGETDESC~x` +..................... + +$${rule-prose: Instr_ok/ref.get_desc} + +$${rule: Instr_ok/ref.get_desc Instr_ok/ref.get_desc-exact} + + .. _valid-ref.test: :math:`\REFTEST~\X{rt}` diff --git a/specification/wasm-latest/1.3-syntax.instructions.spectec b/specification/wasm-latest/1.3-syntax.instructions.spectec index 6228dce91..3a586db75 100644 --- a/specification/wasm-latest/1.3-syntax.instructions.spectec +++ b/specification/wasm-latest/1.3-syntax.instructions.spectec @@ -306,6 +306,7 @@ syntax instr/ref hint(desc "reference instruction") = ... | REF.IS_NULL | REF.AS_NON_NULL | REF.EQ + | REF.GET_DESC typeidx | REF.TEST reftype | REF.CAST reftype | ... diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index d9692abf0..da7d20e5f 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -231,6 +231,14 @@ rule Instr_ok/ref.as_non_null: rule Instr_ok/ref.eq: C |- REF.EQ : (REF NULL EQ) (REF NULL EQ) -> I32 +rule Instr_ok/ref.get_desc: + C |- REF.GET_DESC x : (REF NULL (_IDX x)) -> (REF (_IDX y)) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + +rule Instr_ok/ref.get_desc-exact: + C |- REF.GET_DESC x : (REF NULL (EXACT (_IDX x))) -> (REF (EXACT (_IDX y))) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + rule Instr_ok/ref.test: C |- REF.TEST rt : rt' -> I32 -- Reftype_ok: C |- rt : OK From f174f3ea94accc570a6e62393843d6b3d05bab12 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 13 Jul 2026 01:39:43 -0700 Subject: [PATCH 07/24] Syntax and validation for descriptor casts --- document/core/syntax/instructions.rst | 8 ++- document/core/util/macros.def | 3 + document/core/valid/instructions.rst | 36 ++++++++++++ .../1.3-syntax.instructions.spectec | 8 +++ .../2.3-validation.instructions.spectec | 58 +++++++++++++++++++ 5 files changed, 112 insertions(+), 1 deletion(-) diff --git a/document/core/syntax/instructions.rst b/document/core/syntax/instructions.rst index 516e02a67..b850737e1 100644 --- a/document/core/syntax/instructions.rst +++ b/document/core/syntax/instructions.rst @@ -61,6 +61,8 @@ If missing, the operands must be of :ref:`numeric ` or :ref:`vec .. _syntax-br_on_non_null: .. _syntax-br_on_cast: .. _syntax-br_on_cast_fail: +.. _syntax-br_on_cast_desc_eq: +.. _syntax-br_on_cast_desc_eq_fail: .. _syntax-call: .. _syntax-call_ref: .. _syntax-call_indirect: @@ -113,6 +115,7 @@ ${:BR_IF} performs a conditional branch, and ${: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. The ${:BR_ON_NULL} and ${:BR_ON_NON_NULL} instructions check whether a reference operand is :ref:`null ` and branch if that is the case or not the case, respectively. Similarly, ${:BR_ON_CAST} and ${:BR_ON_CAST_FAIL} attempt a downcast on a reference operand and branch if that succeeds, or fails, respectively. +The ${:BR_ON_CAST_DESC_EQ} and ${:BR_ON_CAST_DESC_EQ_FAIL} instructions perform a similar cast check but compare the operand's descriptor against a given descriptor value. The ${:RETURN} instruction is a shortcut for an unconditional branch to the outermost block, which implicitly is the body of the current function. Taking a branch *unwinds* the operand stack up to the height where the targeted structured control instruction was entered. @@ -234,6 +237,7 @@ The ${:DATA.DROP} instruction prevents further use of a passive data segment. Th .. _syntax-ref.get_desc: .. _syntax-ref.test: .. _syntax-ref.cast: +.. _syntax-ref.cast_desc_eq: .. _syntax-instr-ref: Reference Instructions @@ -255,10 +259,12 @@ The instruction ${:REF.GET_DESC} gets the :ref:`descriptor ` of The instructions ${:REF.TEST} and ${:REF.CAST} test the :ref:`dynamic type ` of a reference operand. The former merely returns the result of the test, while the latter performs a downcast and :ref:`traps ` if the operand's type does not match. +The instruction ${:REF.CAST_DESC_EQ} performs a similar downcast but checks the operand's descriptor against a given descriptor value instead of checking its dynamic type. .. note:: 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. - 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. + 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, + and ${:BR_ON_CAST_DESC_EQ} and ${:BR_ON_CAST_DESC_EQ_FAIL} provide branching versions of ${:REF.CAST_DESC_EQ}. An additional instruction operating on function references is the :ref:`control instruction ` ${:CALL_REF}. diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 36e6965dc..394fb609d 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -495,6 +495,8 @@ .. |BRONNONNULL| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{br\_on\_non\_null}} .. |BRONCAST| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{br\_on\_cast}} .. |BRONCASTFAIL| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{br\_on\_cast\_fail}} +.. |BRONCASTDESCEQ| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{br\_on\_cast\_desc\_eq}} +.. |BRONCASTDESCEQFAIL| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{br\_on\_cast\_desc\_eq\_fail}} .. |RETURN| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{return}} .. |CALL| mathdef:: \xref{syntax/instructions}{syntax-instr-control}{\K{call}} @@ -554,6 +556,7 @@ .. |REFGETDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref.get\_desc}} .. |REFTEST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}test}} .. |REFCAST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}cast}} +.. |REFCASTDESCEQ| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}cast\_desc\_eq}} .. |STRUCTNEW| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new}} .. |STRUCTNEWDEFAULT| mathdef:: \xref{syntax/instructions}{syntax-instr-struct}{\K{struct{.}new\_default}} diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index 1da2143a7..4b9d3cbd5 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -252,6 +252,32 @@ $${rule: Instr_ok/br_on_cast_fail} The existence of a common supertype ${:rt_3} means that ${:rt_1} and ${:rt_2} must be in the same heap subtyping hierarchy. +.. _valid-br_on_cast_desc_eq: + +:math:`\BRONCASTDESCEQ~l~\X{rt}_1~\X{rt}_2` +........................................... + +$${rule-prose: Instr_ok/br_on_cast_desc_eq} + +$${rule: Instr_ok/br_on_cast_desc_eq Instr_ok/br_on_cast_desc_eq-exact} + +.. note:: + The existence of a common supertype ${:rt_3} means that ${:rt_1} and ${:rt_2} must be in the same heap subtyping hierarchy. + + +.. _valid-br_on_cast_desc_eq_fail: + +:math:`\BRONCASTDESCEQFAIL~l~\X{rt}_1~\X{rt}_2` +................................................ + +$${rule-prose: Instr_ok/br_on_cast_desc_eq_fail} + +$${rule: Instr_ok/br_on_cast_desc_eq_fail Instr_ok/br_on_cast_desc_eq_fail-exact} + +.. note:: + The existence of a common supertype ${:rt_3} means that ${:rt_1} and ${:rt_2} must be in the same heap subtyping hierarchy. + + .. _valid-call: :math:`\CALL~x` @@ -839,6 +865,16 @@ $${rule: Instr_ok/ref.cast} 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. +.. _valid-ref.cast_desc_eq: + +:math:`\REFCASTDESCEQ~\X{rt}` +............................. + +$${rule-prose: Instr_ok/ref.cast_desc_eq} + +$${rule: Instr_ok/ref.cast_desc_eq Instr_ok/ref.cast_desc_eq-exact} + + .. index:: aggregate reference Aggregate Reference Instructions diff --git a/specification/wasm-latest/1.3-syntax.instructions.spectec b/specification/wasm-latest/1.3-syntax.instructions.spectec index 3a586db75..add01ba2f 100644 --- a/specification/wasm-latest/1.3-syntax.instructions.spectec +++ b/specification/wasm-latest/1.3-syntax.instructions.spectec @@ -234,6 +234,8 @@ syntax instr/br hint(desc "branch instruction") = ... | BR_ON_NON_NULL labelidx | BR_ON_CAST labelidx reftype reftype | BR_ON_CAST_FAIL labelidx reftype reftype + | BR_ON_CAST_DESC_EQ labelidx reftype reftype + | BR_ON_CAST_DESC_EQ_FAIL labelidx reftype reftype | ... syntax instr/call hint(desc "function instruction") = ... @@ -309,6 +311,7 @@ syntax instr/ref hint(desc "reference instruction") = ... | REF.GET_DESC typeidx | REF.TEST reftype | REF.CAST reftype + | REF.CAST_DESC_EQ reftype | ... syntax instr/func hint(desc "function reference instruction") = ... @@ -448,6 +451,10 @@ def $free_instr(BR_ON_CAST labelidx reftype_1 reftype_2) = $free_labelidx(labelidx) ++ $free_reftype(reftype_1) ++ $free_reftype(reftype_2) def $free_instr(BR_ON_CAST_FAIL labelidx reftype_1 reftype_2) = $free_labelidx(labelidx) ++ $free_reftype(reftype_1) ++ $free_reftype(reftype_2) +def $free_instr(BR_ON_CAST_DESC_EQ labelidx reftype_1 reftype_2) = + $free_labelidx(labelidx) ++ $free_reftype(reftype_1) ++ $free_reftype(reftype_2) +def $free_instr(BR_ON_CAST_DESC_EQ_FAIL labelidx reftype_1 reftype_2) = + $free_labelidx(labelidx) ++ $free_reftype(reftype_1) ++ $free_reftype(reftype_2) def $free_instr(CALL funcidx) = $free_funcidx(funcidx) def $free_instr(CALL_REF typeuse) = $free_typeuse(typeuse) @@ -501,6 +508,7 @@ def $free_instr(REF.AS_NON_NULL) = {} def $free_instr(REF.EQ) = {} def $free_instr(REF.TEST reftype) = $free_reftype(reftype) def $free_instr(REF.CAST reftype) = $free_reftype(reftype) +def $free_instr(REF.CAST_DESC_EQ reftype) = $free_reftype(reftype) def $free_instr(REF.FUNC funcidx) = $free_funcidx(funcidx) def $free_instr(REF.I31) = {} diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index da7d20e5f..9dbb9b71c 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -115,6 +115,54 @@ rule Instr_ok/br_on_cast_fail: -- Reftype_sub: C |- rt_2 <: rt_3 -- Reftype_sub: C |- $diffrt(rt_1, rt_2) <: rt +rule Instr_ok/br_on_cast_desc_eq: + C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null_2 (_IDX x)) : t* rt_1 (REF NULL (_IDX y)) -> t* ($diffrt(rt_1, (REF null_2 (_IDX x)))) + -- if C.LABELS[l] = t* rt + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Reftype_ok: C |- rt_1 : OK + -- Reftype_ok: C |- (REF null_2 (_IDX x)) : OK + -- Reftype_ok: C |- rt_3 : OK + ---- + -- Reftype_sub: C |- rt_1 <: rt_3 + -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt_3 + -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt + +rule Instr_ok/br_on_cast_desc_eq-exact: + C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null_2 (EXACT (_IDX x))) : t* rt_1 (REF NULL (EXACT (_IDX y))) -> t* ($diffrt(rt_1, (REF null_2 (EXACT (_IDX x))))) + -- if C.LABELS[l] = t* rt + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Reftype_ok: C |- rt_1 : OK + -- Reftype_ok: C |- (REF null_2 (EXACT (_IDX x))) : OK + -- Reftype_ok: C |- rt_3 : OK + ---- + -- Reftype_sub: C |- rt_1 <: rt_3 + -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt_3 + -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt + +rule Instr_ok/br_on_cast_desc_eq_fail: + C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null_2 (_IDX x)) : t* rt_1 (REF NULL (_IDX y)) -> t* (REF null_2 (_IDX x)) + -- if C.LABELS[l] = t* rt + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Reftype_ok: C |- rt_1 : OK + -- Reftype_ok: C |- (REF null_2 (_IDX x)) : OK + -- Reftype_ok: C |- rt_3 : OK + ---- + -- Reftype_sub: C |- rt_1 <: rt_3 + -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt_3 + -- Reftype_sub: C |- $diffrt(rt_1, (REF null_2 (_IDX x))) <: rt + +rule Instr_ok/br_on_cast_desc_eq_fail-exact: + C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null_2 (EXACT (_IDX x))) : t* rt_1 (REF NULL (EXACT (_IDX y))) -> t* (REF null_2 (EXACT (_IDX x))) + -- if C.LABELS[l] = t* rt + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Reftype_ok: C |- rt_1 : OK + -- Reftype_ok: C |- (REF null_2 (EXACT (_IDX x))) : OK + -- Reftype_ok: C |- rt_3 : OK + ---- + -- Reftype_sub: C |- rt_1 <: rt_3 + -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt_3 + -- Reftype_sub: C |- $diffrt(rt_1, (REF null_2 (EXACT (_IDX x)))) <: rt + ;; Function instructions @@ -251,6 +299,16 @@ rule Instr_ok/ref.cast: -- Reftype_ok: C |- rt' : OK -- Reftype_sub: C |- rt <: rt' +rule Instr_ok/ref.cast_desc_eq: + C |- REF.CAST_DESC_EQ (REF null_1 (_IDX x)) : (REF NULL ht) (REF NULL (_IDX y)) -> (REF null_1 (_IDX x)) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Heaptype_sub: C |- (_IDX x) <: ht + +rule Instr_ok/ref.cast_desc_eq-exact: + C |- REF.CAST_DESC_EQ (REF null_1 (EXACT (_IDX x))) : (REF NULL ht) (REF NULL (EXACT (_IDX y))) -> (REF null_1 (EXACT (_IDX x))) + -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Heaptype_sub: C |- (_IDX x) <: ht + ;; Scalar reference instructions From 3b16166dd7ef318d1d07fec65593815c1f894e07 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 13 Jul 2026 03:27:10 -0700 Subject: [PATCH 08/24] Make exact and non-exact heap types the same case Previously the definition of `heaptype` was `... | EXACT typeuse | typeuse`, but this made it impossible to treat the exactness as a variable. Refactor the definition to `... | _HT exact? typeuse` instead. This is similar to how nullability is treated in reference types, except that the `_HT` tag will not be displayed in the rendered spec. --- document/core/syntax/types.rst | 1 + document/core/util/macros.def | 1 + document/core/valid/types.rst | 4 +-- .../wasm-latest/1.2-syntax.types.spectec | 10 +++--- .../wasm-latest/2.1-validation.types.spectec | 14 +++----- .../2.2-validation.subtyping.spectec | 28 +++++++-------- .../2.3-validation.instructions.spectec | 36 +++++++++---------- .../wasm-latest/4.1-execution.values.spectec | 6 ++-- .../4.3-execution.instructions.spectec | 6 ++-- .../wasm-latest/5.2-binary.types.spectec | 2 +- .../wasm-latest/6.2-text.types.spectec | 2 +- 11 files changed, 55 insertions(+), 55 deletions(-) diff --git a/document/core/syntax/types.rst b/document/core/syntax/types.rst index 43b06d776..fec815899 100644 --- a/document/core/syntax/types.rst +++ b/document/core/syntax/types.rst @@ -92,6 +92,7 @@ The syntax of type uses is :ref:`extended ` with additional .. _syntax-i31: .. _syntax-heaptype: .. _syntax-absheaptype: +.. _syntax-exact: Heap Types ~~~~~~~~~~ diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 1a81d68af..35f85ec4b 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -321,6 +321,7 @@ .. |limits| mathdef:: \xref{syntax/types}{syntax-limits}{\X{limits}} .. |null| mathdef:: \xref{syntax/types}{syntax-null}{\X{null}} +.. |exact| mathdef:: \xref{syntax/types}{syntax-exact}{\X{exact}} .. |mut| mathdef:: \xref{syntax/types}{syntax-mut}{\X{mut}} .. |final| mathdef:: \xref{syntax/types}{syntax-final}{\X{final}} .. |init| mathdef:: \xref{valid/conventions}{syntax-init}{\X{init}} diff --git a/document/core/valid/types.rst b/document/core/valid/types.rst index 3c36dba8e..a20422a57 100644 --- a/document/core/valid/types.rst +++ b/document/core/valid/types.rst @@ -58,9 +58,9 @@ $${rule-prose: Heaptype_ok/abs} $${rule: Heaptype_ok/abs} -$${rule-prose: Heaptype_ok/exact} +$${rule-prose: Heaptype_ok/typeuse} -$${rule: Heaptype_ok/exact} +$${rule: Heaptype_ok/typeuse} .. index:: reference type, heap type diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index a4b2249e7..c0e9f8a9d 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -7,6 +7,8 @@ ;; TODO(3, rossberg): add ability to do this inline syntax null hint(show NULL) hint(macro "%" "%") = NULL +syntax exact hint(desc "exactness") = EXACT + syntax addrtype hint(desc "address type") = | I32 | I64 @@ -41,7 +43,7 @@ syntax typevar hint(desc "type variable") = | _IDX typeidx | REC n hint(show REC.%) syntax heaptype hint(desc "heap type") = - | absheaptype | typeuse | EXACT typeuse + | absheaptype | _HT exact? typeuse syntax reftype hint(desc "reference type") = | REF null? heaptype @@ -382,8 +384,8 @@ def $subst_addrtype(at, tv*, tu*) = at def $subst_numtype(nt, tv*, tu*) = nt def $subst_vectype(vt, tv*, tu*) = vt -def $subst_heaptype(tv', tv*, tu*) = $subst_typevar(tv', tv*, tu*) -def $subst_heaptype(dt, tv*, tu*) = $subst_deftype(dt, tv*, tu*) +def $subst_heaptype(_HT exact? tv', tv*, tu*) = _HT exact? $subst_typevar(tv', tv*, tu*) +def $subst_heaptype(_HT exact? dt, tv*, tu*) = _HT exact? $subst_deftype(dt, tv*, tu*) def $subst_heaptype(ht, tv*, tu*) = ht -- otherwise def $subst_reftype((REF null? ht), tv*, tu*) = REF null? $subst_heaptype(ht, tv*, tu*) @@ -550,7 +552,7 @@ def $free_typeuse(typevar) = $free_typevar(typevar) def $free_typeuse(deftype) = $free_deftype(deftype) def $free_heaptype(absheaptype) = $free_absheaptype(absheaptype) -def $free_heaptype(typeuse) = $free_typeuse(typeuse) +def $free_heaptype(_HT exact? typeuse) = $free_typeuse(typeuse) def $free_reftype(REF null? heaptype) = $free_heaptype(heaptype) diff --git a/specification/wasm-latest/2.1-validation.types.spectec b/specification/wasm-latest/2.1-validation.types.spectec index cb788a75f..60ae2a819 100644 --- a/specification/wasm-latest/2.1-validation.types.spectec +++ b/specification/wasm-latest/2.1-validation.types.spectec @@ -21,11 +21,7 @@ rule Heaptype_ok/abs: C |- absheaptype : OK rule Heaptype_ok/typeuse: - C |- typeuse : OK - -- Typeuse_ok: C |- typeuse : OK - -rule Heaptype_ok/exact: - C |- EXACT typeuse : OK + C |- _HT exact? typeuse : OK -- Typeuse_ok: C |- typeuse : OK rule Reftype_ok: @@ -167,15 +163,15 @@ def $before(_IDX typeidx, x, i) = typeidx < x def $before(REC j, x, i) = j < i def $unrollht(context, heaptype) : subtype hint(show $unroll_(%,%)) -def $unrollht(C, deftype) = $unrolldt(deftype) -def $unrollht(C, _IDX typeidx) = $unrolldt(C.TYPES[typeidx]) -def $unrollht(C, REC i) = C.RECS[i] +def $unrollht(C, _HT exact? deftype) = $unrolldt(deftype) +def $unrollht(C, _HT exact? _IDX typeidx) = $unrolldt(C.TYPES[typeidx]) +def $unrollht(C, _HT exact? REC i) = C.RECS[i] rule Subtype_ok2: C |- SUB FINAL? typeuse* desctype : OK x i -- if |typeuse*| <= 1 -- (if $before(typeuse, x, i))* - -- (if $unrollht(C, typeuse) = SUB typeuse'* desctype')* + -- (if $unrollht(C, _HT typeuse) = SUB typeuse'* desctype')* ---- -- Desctype_ok: C |- desctype : OK -- (Desctype_sub: C |- desctype <: desctype')* diff --git a/specification/wasm-latest/2.2-validation.subtyping.spectec b/specification/wasm-latest/2.2-validation.subtyping.spectec index 9bd60602f..53277147b 100644 --- a/specification/wasm-latest/2.2-validation.subtyping.spectec +++ b/specification/wasm-latest/2.2-validation.subtyping.spectec @@ -21,8 +21,8 @@ rule Heaptype_sub/refl: C |- heaptype <: heaptype rule Heaptype_sub/exact-l: - C |- EXACT typeuse <: heaptype - -- Heaptype_sub: C |- typeuse <: heaptype + C |- _HT exact typeuse <: heaptype + -- Heaptype_sub: C |- _HT typeuse <: heaptype rule Heaptype_sub/trans: C |- heaptype_1 <: heaptype_2 @@ -43,31 +43,31 @@ rule Heaptype_sub/array-eq: C |- ARRAY <: EQ rule Heaptype_sub/struct: - C |- deftype <: STRUCT + C |- _HT deftype <: STRUCT -- Expand: deftype ~~ STRUCT fieldtype* rule Heaptype_sub/array: - C |- deftype <: ARRAY + C |- _HT deftype <: ARRAY -- Expand: deftype ~~ ARRAY fieldtype rule Heaptype_sub/func: - C |- deftype <: FUNC + C |- _HT deftype <: FUNC -- Expand: deftype ~~ FUNC t_1* -> t_2* rule Heaptype_sub/def: - C |- deftype_1 <: deftype_2 + C |- _HT deftype_1 <: _HT deftype_2 -- Deftype_sub: C |- deftype_1 <: deftype_2 rule Heaptype_sub/typeidx-l: - C |- _IDX typeidx <: heaptype - -- Heaptype_sub: C |- C.TYPES[typeidx] <: heaptype + C |- _HT _IDX typeidx <: heaptype + -- Heaptype_sub: C |- _HT C.TYPES[typeidx] <: heaptype rule Heaptype_sub/typeidx-r: - C |- heaptype <: _IDX typeidx - -- Heaptype_sub: C |- heaptype <: C.TYPES[typeidx] + C |- heaptype <: _HT _IDX typeidx + -- Heaptype_sub: C |- heaptype <: _HT C.TYPES[typeidx] rule Heaptype_sub/rec: - C |- REC i <: typeuse*[j] + C |- _HT REC i <: _HT typeuse*[j] -- if C.RECS[i] = SUB final? typeuse* desctype rule Heaptype_sub/none: @@ -183,8 +183,8 @@ rule Comptype_sub/func: ;; TODO: Check descriptor square rules rule Desctype_sub: C |- (DESCRIBES tu_11) (DESCRIPTOR tu_12) ct_1 <: (DESCRIBES tu_21) (DESCRIPTOR tu_22) ct_2 - -- Heaptype_sub: C |- tu_11 <: tu_21 - -- Heaptype_sub: C |- tu_12 <: tu_22 + -- Heaptype_sub: C |- _HT tu_11 <: _HT tu_21 + -- Heaptype_sub: C |- _HT tu_12 <: _HT tu_22 -- Comptype_sub: C |- ct_1 <: ct_2 @@ -195,7 +195,7 @@ rule Deftype_sub/refl: rule Deftype_sub/super: C |- deftype_1 <: deftype_2 -- if $unrolldt(deftype_1) = SUB final? typeuse* desctype - -- Heaptype_sub: C |- typeuse*[i] <: deftype_2 + -- Heaptype_sub: C |- _HT typeuse*[i] <: _HT deftype_2 ;; External types diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index aa012b18f..6a2337166 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -123,7 +123,7 @@ rule Instr_ok/call: -- Expand: C.FUNCS[x] ~~ FUNC t_1* -> t_2* rule Instr_ok/call_ref: - C |- CALL_REF (_IDX x) : t_1* (REF NULL (_IDX x)) -> t_2* + C |- CALL_REF (_IDX x) : t_1* (REF NULL (_HT _IDX x)) -> t_2* -- Expand: C.TYPES[x] ~~ FUNC t_1* -> t_2* rule Instr_ok/call_indirect: @@ -147,7 +147,7 @@ rule Instr_ok/return_call: ;; TODO(3, rossberg): enable t_2* <: C.RETURN rule Instr_ok/return_call_ref: - C |- RETURN_CALL_REF (_IDX x) : t_3* t_1* (REF NULL (_IDX x)) -> t_4* + C |- RETURN_CALL_REF (_IDX x) : t_3* t_1* (REF NULL (_HT _IDX x)) -> t_4* -- Expand: C.TYPES[x] ~~ FUNC t_1* -> t_2* -- if C.RETURN = (t'_2*) -- Resulttype_sub: C |- t_2* <: t'_2* @@ -210,7 +210,7 @@ rule Instr_ok/ref.null: -- Heaptype_ok: C |- ht : OK rule Instr_ok/ref.func: - C |- REF.FUNC x : eps -> (REF dt) + C |- REF.FUNC x : eps -> (REF (_HT dt)) -- if C.FUNCS[x] = dt -- if x <- C.REFS @@ -250,11 +250,11 @@ rule Instr_ok/i31.get: ;; Structure instructions rule Instr_ok/struct.new: - C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_IDX x)) + C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ STRUCT (mut? zt)* rule Instr_ok/struct.new_default: - C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_IDX x)) + C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ STRUCT (mut? zt)* -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* @@ -262,13 +262,13 @@ def $is_packtype(storagetype) : bool hint(show %1 = $unpack(%1)) hin def $is_packtype(zt) = zt =/= $unpack(zt) rule Instr_ok/struct.get: - C |- STRUCT.GET sx? x i : (REF NULL (_IDX x)) -> $unpack(zt) + C |- STRUCT.GET sx? x i : (REF NULL (_HT _IDX x)) -> $unpack(zt) -- Expand: C.TYPES[x] ~~ STRUCT ft* -- if ft*[i] = mut? zt -- if sx? =/= eps <=> $is_packtype(zt) rule Instr_ok/struct.set: - C |- STRUCT.SET x i : (REF NULL (_IDX x)) $unpack(zt) -> eps + C |- STRUCT.SET x i : (REF NULL (_HT _IDX x)) $unpack(zt) -> eps -- Expand: C.TYPES[x] ~~ STRUCT ft* -- if ft*[i] = MUT zt @@ -276,58 +276,58 @@ rule Instr_ok/struct.set: ;; Array instructions rule Instr_ok/array.new: - C |- ARRAY.NEW x : $unpack(zt) I32 -> (REF (_IDX x)) + C |- ARRAY.NEW x : $unpack(zt) I32 -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) rule Instr_ok/array.new_default: - C |- ARRAY.NEW_DEFAULT x : I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_DEFAULT x : I32 -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) -- Defaultable: |- $unpack(zt) DEFAULTABLE rule Instr_ok/array.new_fixed: - C |- ARRAY.NEW_FIXED x n : $unpack(zt)^n -> (REF (_IDX x)) + C |- ARRAY.NEW_FIXED x n : $unpack(zt)^n -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) rule Instr_ok/array.new_elem: - C |- ARRAY.NEW_ELEM x y : I32 I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_ELEM x y : I32 I32 -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ ARRAY (mut? rt) -- Reftype_sub: C |- C.ELEMS[y] <: rt rule Instr_ok/array.new_data: - C |- ARRAY.NEW_DATA x y : I32 I32 -> (REF (_IDX x)) + C |- ARRAY.NEW_DATA x y : I32 I32 -> (REF (_HT _IDX x)) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) -- if $unpack(zt) = numtype \/ $unpack(zt) = vectype -- if C.DATAS[y] = OK rule Instr_ok/array.get: - C |- ARRAY.GET sx? x : (REF NULL (_IDX x)) I32 -> $unpack(zt) + C |- ARRAY.GET sx? x : (REF NULL (_HT _IDX x)) I32 -> $unpack(zt) -- Expand: C.TYPES[x] ~~ ARRAY (mut? zt) -- if sx? = eps <=> $is_packtype(zt) rule Instr_ok/array.set: - C |- ARRAY.SET x : (REF NULL (_IDX x)) I32 $unpack(zt) -> eps + C |- ARRAY.SET x : (REF NULL (_HT _IDX x)) I32 $unpack(zt) -> eps -- Expand: C.TYPES[x] ~~ ARRAY (MUT zt) rule Instr_ok/array.len: C |- ARRAY.LEN : (REF NULL ARRAY) -> I32 rule Instr_ok/array.fill: - C |- ARRAY.FILL x : (REF NULL (_IDX x)) I32 $unpack(zt) I32 -> eps + C |- ARRAY.FILL x : (REF NULL (_HT _IDX x)) I32 $unpack(zt) I32 -> eps -- Expand: C.TYPES[x] ~~ ARRAY (MUT zt) rule Instr_ok/array.copy: - C |- ARRAY.COPY x_1 x_2 : (REF NULL (_IDX x_1)) I32 (REF NULL (_IDX x_2)) I32 I32 -> eps + C |- ARRAY.COPY x_1 x_2 : (REF NULL (_HT _IDX x_1)) I32 (REF NULL (_HT _IDX x_2)) I32 I32 -> eps -- Expand: C.TYPES[x_1] ~~ ARRAY (MUT zt_1) -- Expand: C.TYPES[x_2] ~~ ARRAY (mut? zt_2) -- Storagetype_sub: C |- zt_2 <: zt_1 rule Instr_ok/array.init_elem: - C |- ARRAY.INIT_ELEM x y : (REF NULL (_IDX x)) I32 I32 I32 -> eps + C |- ARRAY.INIT_ELEM x y : (REF NULL (_HT _IDX x)) I32 I32 I32 -> eps -- Expand: C.TYPES[x] ~~ ARRAY (MUT zt) -- Storagetype_sub: C |- C.ELEMS[y] <: zt rule Instr_ok/array.init_data: - C |- ARRAY.INIT_DATA x y : (REF NULL (_IDX x)) I32 I32 I32 -> eps + C |- ARRAY.INIT_DATA x y : (REF NULL (_HT _IDX x)) I32 I32 I32 -> eps -- Expand: C.TYPES[x] ~~ ARRAY (MUT zt) -- if $unpack(zt) = numtype \/ $unpack(zt) = vectype -- if C.DATAS[y] = OK diff --git a/specification/wasm-latest/4.1-execution.values.spectec b/specification/wasm-latest/4.1-execution.values.spectec index 1b38a0623..31df2deeb 100644 --- a/specification/wasm-latest/4.1-execution.values.spectec +++ b/specification/wasm-latest/4.1-execution.values.spectec @@ -40,15 +40,15 @@ rule Ref_ok/i31: s |- REF.I31_NUM i : (REF I31) rule Ref_ok/struct: - s |- REF.STRUCT_ADDR a : (REF dt) + s |- REF.STRUCT_ADDR a : (REF (_HT dt)) -- if s.STRUCTS[a].TYPE = dt rule Ref_ok/array: - s |- REF.ARRAY_ADDR a : (REF dt) + s |- REF.ARRAY_ADDR a : (REF (_HT dt)) -- if s.ARRAYS[a].TYPE = dt rule Ref_ok/func: - s |- REF.FUNC_ADDR a : (REF dt) + s |- REF.FUNC_ADDR a : (REF (_HT dt)) -- if s.FUNCS[a].TYPE = dt rule Ref_ok/exn: diff --git a/specification/wasm-latest/4.3-execution.instructions.spectec b/specification/wasm-latest/4.3-execution.instructions.spectec index bde165a66..3aefa08e7 100644 --- a/specification/wasm-latest/4.3-execution.instructions.spectec +++ b/specification/wasm-latest/4.3-execution.instructions.spectec @@ -203,10 +203,10 @@ rule Step_read/return_call_ref-frame-addr: rule Step_pure/call_indirect: - (CALL_INDIRECT x yy) ~> (TABLE.GET x) (REF.CAST (REF NULL yy)) (CALL_REF yy) + (CALL_INDIRECT x yy) ~> (TABLE.GET x) (REF.CAST (REF NULL (_HT yy))) (CALL_REF yy) rule Step_pure/return_call_indirect: - (RETURN_CALL_INDIRECT x yy) ~> (TABLE.GET x) (REF.CAST (REF NULL yy)) (RETURN_CALL_REF yy) + (RETURN_CALL_INDIRECT x yy) ~> (TABLE.GET x) (REF.CAST (REF NULL (_HT yy))) (RETURN_CALL_REF yy) rule Step_pure/frame-vals: @@ -616,7 +616,7 @@ rule Step/data.drop: ;; Reference instructions rule Step_read/ref.null-idx: - z; (REF.NULL (_IDX x)) ~> (REF.NULL $type(z, x)) + z; (REF.NULL (_HT _IDX x)) ~> (REF.NULL (_HT $type(z, x))) rule Step_read/ref.func: z; (REF.FUNC x) ~> (REF.FUNC_ADDR $moduleinst(z).FUNCS[x]) diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index 743ff8785..d6c1d7093 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -29,7 +29,7 @@ grammar Babsheaptype : heaptype = grammar Bheaptype : heaptype = | ht:Babsheaptype => ht - | x33:Bs33 => _IDX $s33_to_u32(x33) -- if x33 >= 0 + | x33:Bs33 => _HT (_IDX $s33_to_u32(x33)) -- if x33 >= 0 grammar Breftype : reftype = | 0x63 ht:Bheaptype => REF NULL ht diff --git a/specification/wasm-latest/6.2-text.types.spectec b/specification/wasm-latest/6.2-text.types.spectec index 2afedafc9..fd437be11 100644 --- a/specification/wasm-latest/6.2-text.types.spectec +++ b/specification/wasm-latest/6.2-text.types.spectec @@ -30,7 +30,7 @@ grammar Tabsheaptype : heaptype = grammar Theaptype_(I) : heaptype = | ht:Tabsheaptype => ht - | x:Ttypeidx_(I) => _IDX x + | x:Ttypeidx_(I) => _HT (_IDX x) grammar Tnull : null = | "null" => NULL From e7acc8d388eb2609f4d8668ab3e4e97c1f68fab2 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 13 Jul 2026 05:24:52 -0700 Subject: [PATCH 09/24] show EXACT --- specification/wasm-latest/1.2-syntax.types.spectec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index c0e9f8a9d..6bf936730 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -7,7 +7,7 @@ ;; TODO(3, rossberg): add ability to do this inline syntax null hint(show NULL) hint(macro "%" "%") = NULL -syntax exact hint(desc "exactness") = EXACT +syntax exact hint(show EXACT) = EXACT syntax addrtype hint(desc "address type") = | I32 | I64 From 34f1e6525787f49e1298b211a39d8d63c3f8293d Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 03:07:38 -0700 Subject: [PATCH 10/24] update tests --- spectec/test-frontend/TEST.md | 424 +++++++++++++++++----------------- 1 file changed, 210 insertions(+), 214 deletions(-) diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 9fbf91e57..3f47dc1b8 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -555,6 +555,10 @@ def $free_externidx(externidx : externidx) : free syntax null = | NULL +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec +syntax exact = + | EXACT + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec syntax addrtype = | I32 @@ -606,13 +610,13 @@ syntax final = ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:37.1-38.43 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:39.1-40.43 syntax typeuse = | _IDX{typeidx : typeidx}(typeidx : typeidx) | _DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:43.1-44.42 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:45.1-46.37 syntax heaptype = | ANY | EQ @@ -627,12 +631,9 @@ syntax heaptype = | EXTERN | NOEXTERN | BOT - | _IDX{typeidx : typeidx}(typeidx : typeidx) - | REC{n : n}(n : n) - | _DEF{rectype : rectype, n : n}(rectype : rectype, n : n) - | EXACT{typeuse : typeuse}(typeuse : typeuse) + | _HT{`exact?` : exact?, typeuse : typeuse}(exact?{exact <- `exact?`} : exact?, typeuse : typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:51.1-52.14 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:53.1-54.14 syntax valtype = | I32 | I64 @@ -642,7 +643,7 @@ syntax valtype = | REF{`null?` : null?, heaptype : heaptype}(null?{null <- `null?`} : null?, heaptype : heaptype) | BOT -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:92.1-92.66 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:94.1-94.66 syntax storagetype = | BOT | I32 @@ -654,36 +655,36 @@ syntax storagetype = | I8 | I16 -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:102.1-103.16 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:104.1-105.16 syntax resulttype = list(syntax valtype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:112.1-112.61 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:114.1-114.61 syntax fieldtype = | `%%`{`mut?` : mut?, storagetype : storagetype}(mut?{mut <- `mut?`} : mut?, storagetype : storagetype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:114.1-117.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:116.1-119.34 syntax comptype = | STRUCT{list : list(syntax fieldtype)}(list : list(syntax fieldtype)) | ARRAY{fieldtype : fieldtype}(fieldtype : fieldtype) | `FUNC%->%`{resulttype : resulttype}(resulttype : resulttype, resulttype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:119.1-119.90 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:121.1-121.90 syntax describestype = | DESCRIBES{typeuse : typeuse}(typeuse : typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:120.1-120.93 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:122.1-122.93 syntax descriptortype = | DESCRIPTOR{typeuse : typeuse}(typeuse : typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:122.1-123.44 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:124.1-125.44 syntax desctype = | `%%%`{`describestype?` : describestype?, `descriptortype?` : descriptortype?, comptype : comptype}(describestype?{describestype <- `describestype?`} : describestype?, descriptortype?{descriptortype <- `descriptortype?`} : descriptortype?, comptype : comptype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:125.1-126.33 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:127.1-128.33 syntax subtype = | SUB{`final?` : final?, `typeuse*` : typeuse*, desctype : desctype}(final?{final <- `final?`} : final?, typeuse*{typeuse <- `typeuse*`} : typeuse*, desctype : desctype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:128.1-129.22 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:130.1-131.22 syntax rectype = | REC{list : list(syntax subtype)}(list : list(syntax subtype)) } @@ -1065,13 +1066,13 @@ def $as_deftype(typeuse : typeuse) : deftype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:314.1-314.87 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:316.1-316.87 def $tagsxt(externtype*) : tagtype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:320.1-320.23 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:322.1-322.23 def $tagsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:321.1-321.44 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:323.1-323.44 def $tagsxt{jt : tagtype, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:322.1-322.57 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:324.1-324.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1079,13 +1080,13 @@ def $tagsxt(externtype*) : tagtype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:315.1-315.90 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:317.1-317.90 def $globalsxt(externtype*) : globaltype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:324.1-324.26 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:326.1-326.26 def $globalsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:325.1-325.53 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:327.1-327.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:326.1-326.63 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:328.1-328.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1093,13 +1094,13 @@ def $globalsxt(externtype*) : globaltype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:316.1-316.87 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:318.1-318.87 def $memsxt(externtype*) : memtype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:328.1-328.23 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:330.1-330.23 def $memsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:329.1-329.44 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:331.1-331.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:330.1-330.57 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:332.1-332.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1107,13 +1108,13 @@ def $memsxt(externtype*) : memtype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:317.1-317.89 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:319.1-319.89 def $tablesxt(externtype*) : tabletype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:332.1-332.25 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:334.1-334.25 def $tablesxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:333.1-333.50 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:335.1-335.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:334.1-334.61 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:336.1-336.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1121,13 +1122,13 @@ def $tablesxt(externtype*) : tabletype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:318.1-318.88 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:320.1-320.88 def $funcsxt(externtype*) : deftype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:336.1-336.24 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:338.1-338.24 def $funcsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:337.1-337.47 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:339.1-339.47 def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:338.1-338.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:340.1-340.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1135,14 +1136,14 @@ def $funcsxt(externtype*) : deftype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:343.1-343.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:345.1-345.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:374.1-374.38 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:376.1-376.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:375.1-375.95 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:377.1-377.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:376.1-376.92 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:378.1-378.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -1150,13 +1151,13 @@ def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:416.1-416.59 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:418.1-418.59 def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:417.1-417.39 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:419.1-419.39 def $minus_recs([], []) = ([], []) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:418.1-418.63 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:420.1-420.63 def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:419.1-420.45 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:421.1-422.45 def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) } @@ -1179,89 +1180,89 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:344.1-344.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:346.1-346.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:378.1-378.66 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:380.1-380.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:379.1-379.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:381.1-381.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:349.1-349.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:351.1-351.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:385.1-385.67 - def $subst_heaptype{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : typeuse <: heaptype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:386.1-386.65 - def $subst_heaptype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: heaptype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: heaptype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:387.1-387.53 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:387.1-387.89 + def $subst_heaptype{`exact?` : exact?, tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}(_HT_heaptype(exact?{exact <- `exact?`}, (tv' : typevar <: typeuse)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _HT_heaptype(exact?{exact <- `exact?`}, $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:388.1-388.87 + def $subst_heaptype{`exact?` : exact?, dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}(_HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _HT_heaptype(exact?{exact <- `exact?`}, ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse)) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:389.1-389.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:350.1-350.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:352.1-352.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:389.1-389.87 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:391.1-391.87 def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:351.1-351.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:353.1-353.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:391.1-391.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:393.1-393.64 def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:392.1-392.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:394.1-394.64 def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:393.1-393.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:395.1-395.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:394.1-394.40 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:396.1-396.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:354.1-354.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:356.1-356.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:398.1-398.66 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:400.1-400.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:399.1-399.69 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:355.1-355.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:357.1-357.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.82 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:403.1-403.82 def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:356.1-356.122 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:358.1-358.122 def $subst_describestype(describestype : describestype, typevar*, typeuse*) : describestype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:407.1-407.92 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:409.1-409.92 def $subst_describestype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIBES_describestype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIBES_describestype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:357.1-357.122 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:359.1-359.122 def $subst_descriptortype(descriptortype : descriptortype, typevar*, typeuse*) : descriptortype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:408.1-408.95 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:410.1-410.95 def $subst_descriptortype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIPTOR_descriptortype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIPTOR_descriptortype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:359.1-359.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:361.1-361.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:403.1-403.85 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:405.1-405.85 def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`})) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:404.1-404.81 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:406.1-406.81 def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:405.1-405.123 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:407.1-407.123 def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`}), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:360.1-360.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:362.1-362.112 def $subst_desctype(desctype : desctype, typevar*, typeuse*) : desctype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:410.1-411.107 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:412.1-413.107 def $subst_desctype{`dc1?` : describestype?, `dc2?` : descriptortype?, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_desctype(dc1?{dc1 <- `dc1?`}, dc2?{dc2 <- `dc2?`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_desctype($subst_describestype(dc1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dc1 <- `dc1?`}, $subst_descriptortype(dc2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dc2 <- `dc2?`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:361.1-361.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:363.1-363.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:413.1-414.80 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:415.1-416.80 def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, desctype : desctype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, desctype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_desctype(desctype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:362.1-362.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:364.1-364.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:422.1-423.45 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:424.1-425.45 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`})), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`})) -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:363.1-363.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:365.1-365.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:428.1-428.80 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:430.1-430.80 def $subst_deftype{qt : rectype, i : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) } @@ -1356,11 +1357,11 @@ def $subst_all_moduletype(moduletype : moduletype, typeuse*) : moduletype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:466.1-466.97 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:468.1-468.97 def $subst_all_deftypes(deftype*, typeuse*) : deftype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:467.1-467.40 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:469.1-469.40 def $subst_all_deftypes{`tu*` : typeuse*}([], tu*{tu <- `tu*`}) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:468.1-468.101 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:470.1-470.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, tu*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, tu*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, tu*{tu <- `tu*`}) } @@ -1449,90 +1450,90 @@ def $free_typevar(typevar : typevar) : free ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:501.1-501.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:503.1-503.36 def $free_heaptype(heaptype : heaptype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:552.1-552.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:554.1-554.65 def $free_heaptype{absheaptype : absheaptype}((absheaptype : absheaptype <: heaptype)) = $free_absheaptype(absheaptype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:553.1-553.53 - def $free_heaptype{typeuse : typeuse}((typeuse : typeuse <: heaptype)) = $free_typeuse(typeuse) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:555.1-555.64 + def $free_heaptype{`exact?` : exact?, typeuse : typeuse}(_HT_heaptype(exact?{exact <- `exact?`}, typeuse)) = $free_typeuse(typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:502.1-502.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:504.1-504.34 def $free_reftype(reftype : reftype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:555.1-555.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:557.1-557.65 def $free_reftype{`null?` : null?, heaptype : heaptype}(REF_reftype(null?{null <- `null?`}, heaptype)) = $free_heaptype(heaptype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:504.1-504.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:506.1-506.34 def $free_typeuse(typeuse : typeuse) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:549.1-549.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:551.1-551.52 def $free_typeuse{typevar : typevar}((typevar : typevar <: typeuse)) = $free_typevar(typevar) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:550.1-550.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:552.1-552.52 def $free_typeuse{deftype : deftype}((deftype : deftype <: typeuse)) = $free_deftype(deftype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:505.1-505.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:507.1-507.34 def $free_valtype(valtype : valtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:557.1-557.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:559.1-559.52 def $free_valtype{numtype : numtype}((numtype : numtype <: valtype)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:558.1-558.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:560.1-560.52 def $free_valtype{vectype : vectype}((vectype : vectype <: valtype)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:559.1-559.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:561.1-561.52 def $free_valtype{reftype : reftype}((reftype : reftype <: valtype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:560.1-560.28 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:562.1-562.28 def $free_valtype(BOT_valtype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:507.1-507.40 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:509.1-509.40 def $free_resulttype(resulttype : resulttype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:562.1-562.69 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:564.1-564.69 def $free_resulttype{`valtype*` : valtype*}(`%`_resulttype(valtype*{valtype <- `valtype*`})) = $free_list($free_valtype(valtype)*{valtype <- `valtype*`}) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:508.1-508.42 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:510.1-510.42 def $free_storagetype(storagetype : storagetype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:564.1-564.56 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:566.1-566.56 def $free_storagetype{valtype : valtype}((valtype : valtype <: storagetype)) = $free_valtype(valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:565.1-565.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:567.1-567.59 def $free_storagetype{packtype : packtype}((packtype : packtype <: storagetype)) = $free_packtype(packtype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:509.1-509.38 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:511.1-511.38 def $free_fieldtype(fieldtype : fieldtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:567.1-567.71 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:569.1-569.71 def $free_fieldtype{`mut?` : mut?, storagetype : storagetype}(`%%`_fieldtype(mut?{mut <- `mut?`}, storagetype)) = $free_storagetype(storagetype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:510.1-510.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:512.1-512.36 def $free_comptype(comptype : comptype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:569.1-569.80 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:571.1-571.80 def $free_comptype{`fieldtype*` : fieldtype*}(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`}))) = $free_list($free_fieldtype(fieldtype)*{fieldtype <- `fieldtype*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:570.1-570.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:572.1-572.65 def $free_comptype{fieldtype : fieldtype}(ARRAY_comptype(fieldtype)) = $free_fieldtype(fieldtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:571.1-571.121 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:573.1-573.121 def $free_comptype{resulttype_1 : resulttype, resulttype_2 : resulttype}(`FUNC%->%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:511.1-511.46 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:513.1-513.46 def $free_describestype(describestype : describestype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:573.1-573.58 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:575.1-575.58 def $free_describestype{tu : typeuse}(DESCRIBES_describestype(tu)) = $free_typeuse(tu) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:512.1-512.48 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:514.1-514.48 def $free_descriptortype(descriptortype : descriptortype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:574.1-574.60 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:576.1-576.60 def $free_descriptortype{tu : typeuse}(DESCRIPTOR_descriptortype(tu)) = $free_typeuse(tu) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:513.1-513.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:515.1-515.36 def $free_desctype(desctype : desctype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:576.1-577.102 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:578.1-579.102 def $free_desctype{`dc1?` : describestype?, `dc2?` : descriptortype?, ct : comptype}(`%%%`_desctype(dc1?{dc1 <- `dc1?`}, dc2?{dc2 <- `dc2?`}, ct)) = $free_opt($free_describestype(dc1)?{dc1 <- `dc1?`}) +++ $free_opt($free_descriptortype(dc2)?{dc2 <- `dc2?`}) +++ $free_comptype(ct) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:514.1-514.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:516.1-516.34 def $free_subtype(subtype : subtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:579.1-580.66 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:581.1-582.66 def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, desctype : desctype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, desctype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_desctype(desctype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:515.1-515.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:517.1-517.34 def $free_rectype(rectype : rectype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:582.1-582.70 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:584.1-584.70 def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`}))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:543.1-543.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:545.1-545.34 def $free_deftype(deftype : deftype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:544.1-544.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:546.1-546.59 def $free_deftype{rectype : rectype, n : n}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) } @@ -2794,11 +2795,11 @@ def $before(typeuse : typeuse, typeidx : typeidx, nat : nat) : bool ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec def $unrollht(context : context, heaptype : heaptype) : subtype ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec - def $unrollht{C : context, deftype : deftype}(C, (deftype : deftype <: heaptype)) = $unrolldt(deftype) + def $unrollht{C : context, `exact?` : exact?, deftype : deftype}(C, _HT_heaptype(exact?{exact <- `exact?`}, (deftype : deftype <: typeuse))) = $unrolldt(deftype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec - def $unrollht{C : context, typeidx : typeidx}(C, _IDX_heaptype(typeidx)) = $unrolldt(C.TYPES_context[typeidx!`%`_typeidx.0]) + def $unrollht{C : context, `exact?` : exact?, typeidx : typeidx}(C, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(typeidx))) = $unrolldt(C.TYPES_context[typeidx!`%`_typeidx.0]) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec - def $unrollht{C : context, i : n}(C, REC_heaptype(i)) = C.RECS_context[i] + def $unrollht{C : context, `exact?` : exact?, i : n}(C, _HT_heaptype(exact?{exact <- `exact?`}, REC_typeuse(i))) = C.RECS_context[i] ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec rec { @@ -2810,116 +2811,111 @@ relation Heaptype_ok: `%|-%:OK`(context, heaptype) `%|-%:OK`(C, (absheaptype : absheaptype <: heaptype)) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:23.1-25.35 - rule typeuse{C : context, typeuse : typeuse}: - `%|-%:OK`(C, (typeuse : typeuse <: heaptype)) - -- Typeuse_ok: `%|-%:OK`(C, typeuse) - - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:27.1-29.35 - rule exact{C : context, typeuse : typeuse}: - `%|-%:OK`(C, EXACT_heaptype(typeuse)) + rule typeuse{C : context, `exact?` : exact?, typeuse : typeuse}: + `%|-%:OK`(C, _HT_heaptype(exact?{exact <- `exact?`}, typeuse)) -- Typeuse_ok: `%|-%:OK`(C, typeuse) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:10.1-10.91 relation Reftype_ok: `%|-%:OK`(context, reftype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:31.1-33.37 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:27.1-29.37 rule _{C : context, heaptype : heaptype}: `%|-%:OK`(C, REF_reftype(NULL_null?{}, heaptype)) -- Heaptype_ok: `%|-%:OK`(C, heaptype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:11.1-11.91 relation Valtype_ok: `%|-%:OK`(context, valtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:35.1-37.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:31.1-33.35 rule num{C : context, numtype : numtype}: `%|-%:OK`(C, (numtype : numtype <: valtype)) -- Numtype_ok: `%|-%:OK`(C, numtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:39.1-41.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:35.1-37.35 rule vec{C : context, vectype : vectype}: `%|-%:OK`(C, (vectype : vectype <: valtype)) -- Vectype_ok: `%|-%:OK`(C, vectype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:43.1-45.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:39.1-41.35 rule ref{C : context, reftype : reftype}: `%|-%:OK`(C, (reftype : reftype <: valtype)) -- Reftype_ok: `%|-%:OK`(C, reftype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:47.1-48.16 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:43.1-44.16 rule bot{C : context}: `%|-%:OK`(C, BOT_valtype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:12.1-12.94 relation Typeuse_ok: `%|-%:OK`(context, typeuse) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:105.1-107.30 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:101.1-103.30 rule typeidx{C : context, typeidx : typeidx, dt : deftype}: `%|-%:OK`(C, _IDX_typeuse(typeidx)) -- if (C.TYPES_context[typeidx!`%`_typeidx.0] = dt) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:109.1-111.23 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:105.1-107.23 rule rec{C : context, i : n, st : subtype}: `%|-%:OK`(C, REC_typeuse(i)) -- if (C.RECS_context[i] = st) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:113.1-115.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:109.1-111.35 rule deftype{C : context, deftype : deftype}: `%|-%:OK`(C, (deftype : deftype <: typeuse)) -- Deftype_ok: `%|-%:OK`(C, deftype) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:53.1-53.100 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:49.1-49.100 relation Resulttype_ok: `%|-%:OK`(context, resulttype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:56.1-58.32 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:52.1-54.32 rule _{C : context, `t*` : valtype*}: `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`})) -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:89.1-89.104 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:85.1-85.104 relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:129.1-131.43 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:125.1-127.43 rule _{C : context, storagetype : storagetype}: `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) -- Storagetype_ok: `%|-%:OK`(C, storagetype) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:90.1-90.106 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:86.1-86.106 relation Storagetype_ok: `%|-%:OK`(context, storagetype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:121.1-123.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:117.1-119.35 rule val{C : context, valtype : valtype}: `%|-%:OK`(C, (valtype : valtype <: storagetype)) -- Valtype_ok: `%|-%:OK`(C, valtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:125.1-127.37 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:121.1-123.37 rule pack{C : context, packtype : packtype}: `%|-%:OK`(C, (packtype : packtype <: storagetype)) -- Packtype_ok: `%|-%:OK`(C, packtype) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:91.1-91.103 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:87.1-87.103 relation Comptype_ok: `%|-%:OK`(context, comptype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:134.1-136.42 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:130.1-132.42 rule struct{C : context, `fieldtype*` : fieldtype*}: `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`}))) -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:138.1-140.39 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:134.1-136.39 rule array{C : context, fieldtype : fieldtype}: `%|-%:OK`(C, ARRAY_comptype(fieldtype)) -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:142.1-145.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:138.1-141.35 rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`})) -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`})) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:92.1-92.103 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:88.1-88.103 relation Desctype_ok: `%|-%:OK`(context, desctype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:148.1-152.31 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:144.1-148.31 rule _{C : context, `tu_1?` : typeuse?, `tu_2?` : typeuse?, ct : comptype}: `%|-%:OK`(C, `%%%`_desctype(DESCRIBES_describestype(tu_1)?{tu_1 <- `tu_1?`}, DESCRIPTOR_descriptortype(tu_2)?{tu_2 <- `tu_2?`}, ct)) -- (Typeuse_ok: `%|-%:OK`(C, tu_1))?{tu_1 <- `tu_1?`} -- (Typeuse_ok: `%|-%:OK`(C, tu_2))?{tu_2 <- `tu_2?`} -- Comptype_ok: `%|-%:OK`(C, ct) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:93.1-93.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:89.1-89.126 relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:155.1-162.49 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:151.1-158.49 rule _{C : context, `x*` : idx*, desctype : desctype, x_0 : idx, `x'**` : idx**, `desctype'*` : desctype*}: `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, desctype), OK_oktypeidx(x_0)) -- if (|x*{x <- `x*`}| <= 1) @@ -2928,56 +2924,56 @@ relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) -- Desctype_ok: `%|-%:OK`(C, desctype) -- (Desctype_sub: `%|-%<:%`(C, desctype, desctype'))*{desctype' <- `desctype'*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:94.1-94.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:90.1-90.126 relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:184.1-185.23 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:180.1-181.23 rule empty{C : context, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list([])), OK_oktypeidx(x)) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:187.1-190.48 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:183.1-186.48 rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`})), OK_oktypeidx(x)) -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidx(`%`_typeidx((x!`%`_idx.0 + 1)))) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:192.1-194.60 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:188.1-190.60 rule _rec2{C : context, `subtype*` : subtype*, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidx(x)) -- Rectype_ok2: `%|-%:%`({TYPES [], RECS subtype*{subtype <- `subtype*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS []} +++ C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(x, 0)) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:95.1-95.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:91.1-91.126 relation Subtype_ok2: `%|-%:%`(context, subtype, oktypeidxnat) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:174.1-181.49 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:170.1-177.49 rule _{C : context, `typeuse*` : typeuse*, desctype : desctype, x : idx, i : nat, `typeuse'**` : typeuse**, `desctype'*` : desctype*}: `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, desctype), OK_oktypeidxnat(x, i)) -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) -- (if $before(typeuse, x, i))*{typeuse <- `typeuse*`} - -- (if ($unrollht(C, (typeuse : typeuse <: heaptype)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, desctype')))*{desctype' <- `desctype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} + -- (if ($unrollht(C, _HT_heaptype(?(), typeuse)) = SUB_subtype(?(), typeuse'*{typeuse' <- `typeuse'*`}, desctype')))*{desctype' <- `desctype'*`, typeuse <- `typeuse*`, `typeuse'*` <- `typeuse'**`} -- Desctype_ok: `%|-%:OK`(C, desctype) -- (Desctype_sub: `%|-%<:%`(C, desctype, desctype'))*{desctype' <- `desctype'*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:96.1-96.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:92.1-92.126 relation Rectype_ok2: `%|-%:%`(context, rectype, oktypeidxnat) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:196.1-197.24 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:192.1-193.24 rule empty{C : context, x : idx, i : nat}: `%|-%:%`(C, REC_rectype(`%`_list([])), OK_oktypeidxnat(x, i)) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:199.1-202.55 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:195.1-198.55 rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx, i : nat}: `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(x, i)) -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypeidxnat(x, i)) -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(`%`_typeidx((x!`%`_idx.0 + 1)), (i + 1))) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:97.1-97.102 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:93.1-93.102 relation Deftype_ok: `%|-%:OK`(context, deftype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:205.1-209.14 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:201.1-205.14 rule _{C : context, rectype : rectype, i : n, x : idx, `subtype*` : subtype*, n : n}: `%|-%:OK`(C, _DEF_deftype(rectype, i)) -- Rectype_ok: `%|-%:%`(C, rectype, OK_oktypeidx(x)) -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`}))) -- if (i < n) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:100.1-100.108 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:96.1-96.108 relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:170.1-172.41 rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: @@ -2995,27 +2991,27 @@ relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`}), `%`_resulttype(t_11*{t_11 <- `t_11*`})) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`}), `%`_resulttype(t_22*{t_22 <- `t_22*`})) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:101.1-101.108 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:97.1-97.108 relation Desctype_sub: `%|-%<:%`(context, desctype, desctype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:184.1-188.37 rule _{C : context, tu_11 : typeuse, tu_12 : typeuse, ct_1 : comptype, tu_21 : typeuse, tu_22 : typeuse, ct_2 : comptype}: `%|-%<:%`(C, `%%%`_desctype(?(DESCRIBES_describestype(tu_11)), ?(DESCRIPTOR_descriptortype(tu_12)), ct_1), `%%%`_desctype(?(DESCRIBES_describestype(tu_21)), ?(DESCRIPTOR_descriptortype(tu_22)), ct_2)) - -- Heaptype_sub: `%|-%<:%`(C, (tu_11 : typeuse <: heaptype), (tu_21 : typeuse <: heaptype)) - -- Heaptype_sub: `%|-%<:%`(C, (tu_12 : typeuse <: heaptype), (tu_22 : typeuse <: heaptype)) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), tu_11), _HT_heaptype(?(), tu_21)) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), tu_12), _HT_heaptype(?(), tu_22)) -- Comptype_sub: `%|-%<:%`(C, ct_1, ct_2) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:102.1-102.107 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:98.1-98.107 relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:191.1-193.66 rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: `%|-%<:%`(C, deftype_1, deftype_2) -- if ($clos_deftype(C, deftype_1) = $clos_deftype(C, deftype_2)) - ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:195.1-198.49 + ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:195.1-198.57 rule super{C : context, deftype_1 : deftype, deftype_2 : deftype, `final?` : final?, `typeuse*` : typeuse*, desctype : desctype, i : nat}: `%|-%<:%`(C, deftype_1, deftype_2) -- if ($unrolldt(deftype_1) = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, desctype)) - -- Heaptype_sub: `%|-%<:%`(C, (typeuse*{typeuse <- `typeuse*`}[i] : typeuse <: heaptype), (deftype_2 : deftype <: heaptype)) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), typeuse*{typeuse <- `typeuse*`}[i]), _HT_heaptype(?(), (deftype_2 : deftype <: typeuse))) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:9.1-9.104 relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) @@ -3023,10 +3019,10 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) rule refl{C : context, heaptype : heaptype}: `%|-%<:%`(C, heaptype, heaptype) - ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:23.1-25.44 - rule `exact-l`{C : context, typeuse : typeuse, heaptype : heaptype}: - `%|-%<:%`(C, EXACT_heaptype(typeuse), heaptype) - -- Heaptype_sub: `%|-%<:%`(C, (typeuse : typeuse <: heaptype), heaptype) + ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:23.1-25.48 + rule `exact-l`{C : context, exact : exact, typeuse : typeuse, heaptype : heaptype}: + `%|-%<:%`(C, _HT_heaptype(?(exact), typeuse), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), typeuse), heaptype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:27.1-31.48 rule trans{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype, heaptype' : heaptype}: @@ -3053,37 +3049,37 @@ relation Heaptype_sub: `%|-%<:%`(context, heaptype, heaptype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:45.1-47.42 rule struct{C : context, deftype : deftype, `fieldtype*` : fieldtype*}: - `%|-%<:%`(C, (deftype : deftype <: heaptype), STRUCT_heaptype) + `%|-%<:%`(C, _HT_heaptype(?(), (deftype : deftype <: typeuse)), STRUCT_heaptype) -- Expand: `%~~%`(deftype, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`}))) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:49.1-51.40 rule array{C : context, deftype : deftype, fieldtype : fieldtype}: - `%|-%<:%`(C, (deftype : deftype <: heaptype), ARRAY_heaptype) + `%|-%<:%`(C, _HT_heaptype(?(), (deftype : deftype <: typeuse)), ARRAY_heaptype) -- Expand: `%~~%`(deftype, ARRAY_comptype(fieldtype)) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:53.1-55.42 rule func{C : context, deftype : deftype, `t_1*` : valtype*, `t_2*` : valtype*}: - `%|-%<:%`(C, (deftype : deftype <: heaptype), FUNC_heaptype) + `%|-%<:%`(C, _HT_heaptype(?(), (deftype : deftype <: typeuse)), FUNC_heaptype) -- Expand: `%~~%`(deftype, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:57.1-59.46 rule def{C : context, deftype_1 : deftype, deftype_2 : deftype}: - `%|-%<:%`(C, (deftype_1 : deftype <: heaptype), (deftype_2 : deftype <: heaptype)) + `%|-%<:%`(C, _HT_heaptype(?(), (deftype_1 : deftype <: typeuse)), _HT_heaptype(?(), (deftype_2 : deftype <: typeuse))) -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) - ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:61.1-63.53 + ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:61.1-63.57 rule `typeidx-l`{C : context, typeidx : typeidx, heaptype : heaptype}: - `%|-%<:%`(C, _IDX_heaptype(typeidx), heaptype) - -- Heaptype_sub: `%|-%<:%`(C, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype), heaptype) + `%|-%<:%`(C, _HT_heaptype(?(), _IDX_typeuse(typeidx)), heaptype) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: typeuse)), heaptype) - ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:65.1-67.53 + ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:65.1-67.57 rule `typeidx-r`{C : context, heaptype : heaptype, typeidx : typeidx}: - `%|-%<:%`(C, heaptype, _IDX_heaptype(typeidx)) - -- Heaptype_sub: `%|-%<:%`(C, heaptype, (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: heaptype)) + `%|-%<:%`(C, heaptype, _HT_heaptype(?(), _IDX_typeuse(typeidx))) + -- Heaptype_sub: `%|-%<:%`(C, heaptype, _HT_heaptype(?(), (C.TYPES_context[typeidx!`%`_typeidx.0] : deftype <: typeuse))) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:69.1-71.49 rule rec{C : context, i : n, `typeuse*` : typeuse*, j : nat, `final?` : final?, desctype : desctype}: - `%|-%<:%`(C, REC_heaptype(i), (typeuse*{typeuse <- `typeuse*`}[j] : typeuse <: heaptype)) + `%|-%<:%`(C, _HT_heaptype(?(), REC_typeuse(i)), _HT_heaptype(?(), typeuse*{typeuse <- `typeuse*`}[j])) -- if (C.RECS_context[i] = SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, desctype)) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:73.1-75.40 @@ -3527,7 +3523,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:125.1-127.45 rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: - `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) + `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:129.1-133.45 @@ -3553,7 +3549,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:149.1-154.42 rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: - `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _IDX_heaptype(x))]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) + `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`}))) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) @@ -3594,7 +3590,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:212.1-215.20 rule ref.func{C : context, x : idx, dt : deftype}: - `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), (dt : deftype <: heaptype))]))) + `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), (dt : deftype <: typeuse)))]))) -- if (C.FUNCS_context[x!`%`_idx.0] = dt) -- if (x <- C.REFS_context) @@ -3636,66 +3632,66 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-254.45 rule struct.new{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: - `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`}))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:256.1-259.48 rule struct.new_default{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: - `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`}))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:264.1-268.41 rule struct.get{C : context, `sx?` : sx?, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: - `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x))]), [], `%`_resulttype([$unpack(zt)]))) + `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:270.1-273.24 rule struct.set{C : context, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*}: - `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) $unpack(zt)]), [], `%`_resulttype([]))) + `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(?(MUT_mut), zt)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:278.1-280.43 rule array.new{C : context, x : idx, zt : storagetype, `mut?` : mut?}: - `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:282.1-285.45 rule array.new_default{C : context, x : idx, `mut?` : mut?, zt : storagetype}: - `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:287.1-289.43 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: - `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:291.1-294.40 rule array.new_elem{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: - `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:296.1-300.24 rule array.new_data{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: - `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _IDX_heaptype(x))]))) + `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-305.39 rule array.get{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: - `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) + `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} = ?()) <=> $is_packtype(zt)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:307.1-309.42 rule array.set{C : context, x : idx, zt : storagetype}: - `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) + `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-312.43 @@ -3704,25 +3700,25 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:314.1-316.42 rule array.fill{C : context, x : idx, zt : storagetype}: - `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) + `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:318.1-322.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: - `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x_1)) I32_valtype REF_valtype(?(NULL_null), _IDX_heaptype(x_2)) I32_valtype I32_valtype]), [], `%`_resulttype([]))) + `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_1))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_2))) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:324.1-327.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: - `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) + `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-333.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: - `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _IDX_heaptype(x)) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) + `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) @@ -5913,17 +5909,17 @@ relation Ref_ok: `%|-%:%`(store, ref, reftype) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:42.1-44.31 rule struct{s : store, a : addr, dt : deftype}: - `%|-%:%`(s, REF.STRUCT_ADDR_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + `%|-%:%`(s, REF.STRUCT_ADDR_ref(a), REF_reftype(?(), _HT_heaptype(?(), (dt : deftype <: typeuse)))) -- if (s.STRUCTS_store[a].TYPE_structinst = dt) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:46.1-48.30 rule array{s : store, a : addr, dt : deftype}: - `%|-%:%`(s, REF.ARRAY_ADDR_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + `%|-%:%`(s, REF.ARRAY_ADDR_ref(a), REF_reftype(?(), _HT_heaptype(?(), (dt : deftype <: typeuse)))) -- if (s.ARRAYS_store[a].TYPE_arrayinst = dt) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:50.1-52.29 rule func{s : store, a : addr, dt : deftype}: - `%|-%:%`(s, REF.FUNC_ADDR_ref(a), REF_reftype(?(), (dt : deftype <: heaptype))) + `%|-%:%`(s, REF.FUNC_ADDR_ref(a), REF_reftype(?(), _HT_heaptype(?(), (dt : deftype <: typeuse)))) -- if (s.FUNCS_store[a].TYPE_funcinst = dt) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:54.1-56.24 @@ -6125,11 +6121,11 @@ relation Step_pure: `%~>%`(instr*, instr*) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule call_indirect{x : idx, yy : typeuse}: - `%~>%`([CALL_INDIRECT_instr(x, yy)], [TABLE.GET_instr(x) REF.CAST_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) CALL_REF_instr(yy)]) + `%~>%`([CALL_INDIRECT_instr(x, yy)], [TABLE.GET_instr(x) REF.CAST_instr(REF_reftype(?(NULL_null), _HT_heaptype(?(), yy))) CALL_REF_instr(yy)]) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule return_call_indirect{x : idx, yy : typeuse}: - `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [TABLE.GET_instr(x) REF.CAST_instr(REF_reftype(?(NULL_null), (yy : typeuse <: heaptype))) RETURN_CALL_REF_instr(yy)]) + `%~>%`([RETURN_CALL_INDIRECT_instr(x, yy)], [TABLE.GET_instr(x) REF.CAST_instr(REF_reftype(?(NULL_null), _HT_heaptype(?(), yy))) RETURN_CALL_REF_instr(yy)]) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule `frame-vals`{n : n, f : frame, `val*` : val*}: @@ -6754,7 +6750,7 @@ relation Step_read: `%~>%`(config, instr*) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule `ref.null-idx`{z : state, x : idx}: - `%~>%`(`%;%`_config(z, [REF.NULL_instr(_IDX_heaptype(x))]), [REF.NULL_instr(($type(z, x) : deftype <: heaptype))]) + `%~>%`(`%;%`_config(z, [REF.NULL_instr(_HT_heaptype(?(), _IDX_typeuse(x)))]), [REF.NULL_instr(_HT_heaptype(?(), ($type(z, x) : deftype <: typeuse)))]) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule ref.func{z : state, x : idx}: @@ -7599,7 +7595,7 @@ grammar Bheaptype : heaptype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{ht : heaptype} ht:Babsheaptype => ht ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{x33 : s33} x33:Bs33 => _IDX_heaptype($s33_to_u32(x33)) + prod{x33 : s33} x33:Bs33 => _HT_heaptype(?(), _IDX_typeuse($s33_to_u32(x33))) -- if (x33!`%`_s33.0 >= (0 : nat <:> int)) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec @@ -9633,7 +9629,7 @@ grammar Theaptype_(I : I) : heaptype ;; ../../../../specification/wasm-latest/6.2-text.types.spectec prod{ht : heaptype} ht:Tabsheaptype => ht ;; ../../../../specification/wasm-latest/6.2-text.types.spectec - prod{x : idx} x:Ttypeidx_(I) => _IDX_heaptype(x) + prod{x : idx} x:Ttypeidx_(I) => _HT_heaptype(?(), _IDX_typeuse(x)) ;; ../../../../specification/wasm-latest/6.2-text.types.spectec grammar Tnull : null From c3b35c63962ef8d029782a525b35459d07389d70 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 03:18:45 -0700 Subject: [PATCH 11/24] update tests --- spectec/test-frontend/TEST.md | 470 ++++++++++++++++++---------------- 1 file changed, 249 insertions(+), 221 deletions(-) diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 3f47dc1b8..24fe9b19c 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -2174,6 +2174,8 @@ syntax instr = | I31.GET{sx : sx}(sx : sx) | STRUCT.NEW{typeidx : typeidx}(typeidx : typeidx) | STRUCT.NEW_DEFAULT{typeidx : typeidx}(typeidx : typeidx) + | STRUCT.NEW_DESC{typeidx : typeidx}(typeidx : typeidx) + | STRUCT.NEW_DEFAULT_DESC{typeidx : typeidx}(typeidx : typeidx) | STRUCT.GET{`sx?` : sx?, typeidx : typeidx, u32 : u32}(sx?{sx <- `sx?`} : sx?, typeidx : typeidx, u32 : u32) | STRUCT.SET{typeidx : typeidx, u32 : u32}(typeidx : typeidx, u32 : u32) | ARRAY.NEW{typeidx : typeidx}(typeidx : typeidx) @@ -2264,227 +2266,227 @@ def $free_blocktype(blocktype : blocktype) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:572.1-572.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:574.1-574.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:573.1-573.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:574.1-574.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:417.1-417.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:419.1-419.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:430.1-430.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:429.1-429.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:431.1-431.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:430.1-430.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:432.1-432.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:431.1-431.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:433.1-433.86 def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:433.1-433.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:435.1-435.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:434.1-434.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:435.1-436.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-438.79 def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-438.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:440.1-440.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-441.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:440.1-441.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-443.69 def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-445.83 - def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-447.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-449.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:450.1-450.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-452.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-454.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:455.1-455.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-454.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:455.1-455.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-457.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-459.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-460.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.64 def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.62 def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-467.55 def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.64 def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-481.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-482.49 - def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.49 - def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-486.49 - def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-488.49 + def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-490.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-490.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-492.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.59 def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.59 def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-503.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-504.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-504.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:507.1-507.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.69 def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-515.51 - def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-517.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-519.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-523.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-525.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-525.51 - def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-527.51 + def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-529.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-529.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.41 def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.63 def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-535.63 def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.67 def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-541.63 def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-541.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.64 def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-544.64 def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-545.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-547.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-547.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-549.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-551.49 - def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-553.49 - def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) + def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-555.49 - def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-557.49 - def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) + def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-559.49 - def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-561.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-563.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:564.1-564.59 def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-563.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-565.59 def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:564.1-564.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:566.1-566.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-568.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-568.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-570.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-569.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-571.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:418.1-418.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:420.1-420.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-578.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) } @@ -2845,17 +2847,17 @@ relation Valtype_ok: `%|-%:OK`(context, valtype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:12.1-12.94 relation Typeuse_ok: `%|-%:OK`(context, typeuse) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:101.1-103.30 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:106.1-108.30 rule typeidx{C : context, typeidx : typeidx, dt : deftype}: `%|-%:OK`(C, _IDX_typeuse(typeidx)) -- if (C.TYPES_context[typeidx!`%`_typeidx.0] = dt) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:105.1-107.23 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:110.1-112.23 rule rec{C : context, i : n, st : subtype}: `%|-%:OK`(C, REC_typeuse(i)) -- if (C.RECS_context[i] = st) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:109.1-111.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:114.1-116.35 rule deftype{C : context, deftype : deftype}: `%|-%:OK`(C, (deftype : deftype <: typeuse)) -- Deftype_ok: `%|-%:OK`(C, deftype) @@ -2867,55 +2869,55 @@ relation Resulttype_ok: `%|-%:OK`(context, resulttype) `%|-%:OK`(C, `%`_resulttype(t*{t <- `t*`})) -- (Valtype_ok: `%|-%:OK`(C, t))*{t <- `t*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:85.1-85.104 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:90.1-90.104 relation Fieldtype_ok: `%|-%:OK`(context, fieldtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:125.1-127.43 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:130.1-132.43 rule _{C : context, storagetype : storagetype}: `%|-%:OK`(C, `%%`_fieldtype(MUT_mut?{}, storagetype)) -- Storagetype_ok: `%|-%:OK`(C, storagetype) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:86.1-86.106 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:91.1-91.106 relation Storagetype_ok: `%|-%:OK`(context, storagetype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:117.1-119.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:122.1-124.35 rule val{C : context, valtype : valtype}: `%|-%:OK`(C, (valtype : valtype <: storagetype)) -- Valtype_ok: `%|-%:OK`(C, valtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:121.1-123.37 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:126.1-128.37 rule pack{C : context, packtype : packtype}: `%|-%:OK`(C, (packtype : packtype <: storagetype)) -- Packtype_ok: `%|-%:OK`(C, packtype) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:87.1-87.103 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:92.1-92.103 relation Comptype_ok: `%|-%:OK`(context, comptype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:130.1-132.42 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:135.1-137.42 rule struct{C : context, `fieldtype*` : fieldtype*}: `%|-%:OK`(C, STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`}))) -- (Fieldtype_ok: `%|-%:OK`(C, fieldtype))*{fieldtype <- `fieldtype*`} - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:134.1-136.39 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:139.1-141.39 rule array{C : context, fieldtype : fieldtype}: `%|-%:OK`(C, ARRAY_comptype(fieldtype)) -- Fieldtype_ok: `%|-%:OK`(C, fieldtype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:138.1-141.35 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:143.1-146.35 rule func{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:OK`(C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_1*{t_1 <- `t_1*`})) -- Resulttype_ok: `%|-%:OK`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`})) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:88.1-88.103 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:93.1-93.103 relation Desctype_ok: `%|-%:OK`(context, desctype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:144.1-148.31 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:149.1-153.31 rule _{C : context, `tu_1?` : typeuse?, `tu_2?` : typeuse?, ct : comptype}: `%|-%:OK`(C, `%%%`_desctype(DESCRIBES_describestype(tu_1)?{tu_1 <- `tu_1?`}, DESCRIPTOR_descriptortype(tu_2)?{tu_2 <- `tu_2?`}, ct)) -- (Typeuse_ok: `%|-%:OK`(C, tu_1))?{tu_1 <- `tu_1?`} -- (Typeuse_ok: `%|-%:OK`(C, tu_2))?{tu_2 <- `tu_2?`} -- Comptype_ok: `%|-%:OK`(C, ct) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:89.1-89.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:94.1-94.126 relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:151.1-158.49 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:156.1-163.49 rule _{C : context, `x*` : idx*, desctype : desctype, x_0 : idx, `x'**` : idx**, `desctype'*` : desctype*}: `%|-%:%`(C, SUB_subtype(FINAL_final?{}, _IDX_typeuse(x)*{x <- `x*`}, desctype), OK_oktypeidx(x_0)) -- if (|x*{x <- `x*`}| <= 1) @@ -2924,26 +2926,26 @@ relation Subtype_ok: `%|-%:%`(context, subtype, oktypeidx) -- Desctype_ok: `%|-%:OK`(C, desctype) -- (Desctype_sub: `%|-%<:%`(C, desctype, desctype'))*{desctype' <- `desctype'*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:90.1-90.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:95.1-95.126 relation Rectype_ok: `%|-%:%`(context, rectype, oktypeidx) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:180.1-181.23 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:185.1-186.23 rule empty{C : context, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list([])), OK_oktypeidx(x)) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:183.1-186.48 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:188.1-191.48 rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`})), OK_oktypeidx(x)) -- Subtype_ok: `%|-%:%`(C, subtype_1, OK_oktypeidx(x)) -- Rectype_ok: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidx(`%`_typeidx((x!`%`_idx.0 + 1)))) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:188.1-190.60 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:193.1-195.60 rule _rec2{C : context, `subtype*` : subtype*, x : idx}: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidx(x)) -- Rectype_ok2: `%|-%:%`({TYPES [], RECS subtype*{subtype <- `subtype*`}, TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS []} +++ C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(x, 0)) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:91.1-91.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:96.1-96.126 relation Subtype_ok2: `%|-%:%`(context, subtype, oktypeidxnat) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:170.1-177.49 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:175.1-182.49 rule _{C : context, `typeuse*` : typeuse*, desctype : desctype, x : idx, i : nat, `typeuse'**` : typeuse**, `desctype'*` : desctype*}: `%|-%:%`(C, SUB_subtype(FINAL_final?{}, typeuse*{typeuse <- `typeuse*`}, desctype), OK_oktypeidxnat(x, i)) -- if (|typeuse*{typeuse <- `typeuse*`}| <= 1) @@ -2952,28 +2954,28 @@ relation Subtype_ok2: `%|-%:%`(context, subtype, oktypeidxnat) -- Desctype_ok: `%|-%:OK`(C, desctype) -- (Desctype_sub: `%|-%<:%`(C, desctype, desctype'))*{desctype' <- `desctype'*`} -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:92.1-92.126 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:97.1-97.126 relation Rectype_ok2: `%|-%:%`(context, rectype, oktypeidxnat) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:192.1-193.24 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:197.1-198.24 rule empty{C : context, x : idx, i : nat}: `%|-%:%`(C, REC_rectype(`%`_list([])), OK_oktypeidxnat(x, i)) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:195.1-198.55 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:200.1-203.55 rule cons{C : context, subtype_1 : subtype, `subtype*` : subtype*, x : idx, i : nat}: `%|-%:%`(C, REC_rectype(`%`_list([subtype_1] ++ subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(x, i)) -- Subtype_ok2: `%|-%:%`(C, subtype_1, OK_oktypeidxnat(x, i)) -- Rectype_ok2: `%|-%:%`(C, REC_rectype(`%`_list(subtype*{subtype <- `subtype*`})), OK_oktypeidxnat(`%`_typeidx((x!`%`_idx.0 + 1)), (i + 1))) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:93.1-93.102 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:98.1-98.102 relation Deftype_ok: `%|-%:OK`(context, deftype) - ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:201.1-205.14 + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:206.1-210.14 rule _{C : context, rectype : rectype, i : n, x : idx, `subtype*` : subtype*, n : n}: `%|-%:OK`(C, _DEF_deftype(rectype, i)) -- Rectype_ok: `%|-%:%`(C, rectype, OK_oktypeidx(x)) -- if (rectype = REC_rectype(`%`_list(subtype^n{subtype <- `subtype*`}))) -- if (i < n) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:96.1-96.108 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:101.1-101.108 relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:170.1-172.41 rule struct{C : context, `ft_1*` : fieldtype*, `ft'_1*` : fieldtype*, `ft_2*` : fieldtype*}: @@ -2991,7 +2993,7 @@ relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_21*{t_21 <- `t_21*`}), `%`_resulttype(t_11*{t_11 <- `t_11*`})) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_12*{t_12 <- `t_12*`}), `%`_resulttype(t_22*{t_22 <- `t_22*`})) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:97.1-97.108 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:102.1-102.108 relation Desctype_sub: `%|-%<:%`(context, desctype, desctype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:184.1-188.37 rule _{C : context, tu_11 : typeuse, tu_12 : typeuse, ct_1 : comptype, tu_21 : typeuse, tu_22 : typeuse, ct_2 : comptype}: @@ -3000,7 +3002,7 @@ relation Desctype_sub: `%|-%<:%`(context, desctype, desctype) -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(?(), tu_12), _HT_heaptype(?(), tu_22)) -- Comptype_sub: `%|-%<:%`(C, ct_1, ct_2) -;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:98.1-98.107 +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:103.1-103.107 relation Deftype_sub: `%|-%<:%`(context, deftype, deftype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:191.1-193.66 rule refl{C : context, deftype_1 : deftype, deftype_2 : deftype}: @@ -3193,6 +3195,13 @@ relation Expand_use: `%~~_%%`(typeuse, context, comptype) `%~~_%%`(_IDX_typeuse(typeidx), C, comptype) -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], comptype) +;; ../../../../specification/wasm-latest/2.1-validation.types.spectec +relation ExpandDesc: `%~~%`(deftype, desctype) + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec + rule _{deftype : deftype, desctype : desctype}: + `%~~%`(deftype, desctype) + -- if ($expanddt_to_desctype(deftype) = desctype) + ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec relation Limits_ok: `%|-%:%`(context, limits, nat) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec @@ -3630,414 +3639,425 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-254.45 - rule struct.new{C : context, x : idx, `zt*` : storagetype*, `mut?*` : mut?*}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-254.68 + rule struct.new{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) - -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`}))) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:256.1-259.48 - rule struct.new_default{C : context, x : idx, `mut?*` : mut?*, `zt*` : storagetype*}: + rule struct.new_default{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) - -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`}))) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:264.1-268.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:261.1-263.88 + rule struct.new_desc{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: + `%|-%:%`(C, STRUCT.NEW_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:265.1-268.48 + rule struct.new_default_desc{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: + `%|-%:%`(C, STRUCT.NEW_DEFAULT_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:273.1-277.41 rule struct.get{C : context, `sx?` : sx?, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:270.1-273.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:279.1-282.24 rule struct.set{C : context, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(?(MUT_mut), zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:278.1-280.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:287.1-289.43 rule array.new{C : context, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:282.1-285.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:291.1-294.45 rule array.new_default{C : context, x : idx, `mut?` : mut?, zt : storagetype}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:287.1-289.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:296.1-298.43 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:291.1-294.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:300.1-303.40 rule array.new_elem{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:296.1-300.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:305.1-309.24 rule array.new_data{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-305.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-314.39 rule array.get{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} = ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:307.1-309.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:316.1-318.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-312.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:320.1-321.43 rule array.len{C : context}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:314.1-316.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:323.1-325.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:318.1-322.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:327.1-331.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_1))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_2))) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:324.1-327.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-336.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-333.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:338.1-342.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:338.1-340.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:347.1-349.26 rule extern.convert_any{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:342.1-344.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:351.1-353.26 rule any.convert_extern{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:349.1-351.28 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:358.1-360.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:362.1-364.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-359.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:366.1-368.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.30 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:373.1-375.30 rule global.get{C : context, x : idx, t : valtype, `mut?` : mut?}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:377.1-379.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:375.1-377.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:384.1-386.32 rule table.get{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:388.1-390.32 rule table.set{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:383.1-385.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:392.1-394.32 rule table.size{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:387.1-389.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:396.1-398.32 rule table.grow{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:391.1-393.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:400.1-402.32 rule table.fill{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:395.1-399.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:404.1-408.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:401.1-405.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-414.36 rule table.init{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:407.1-409.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:416.1-418.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:422.1-424.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:431.1-433.32 rule memory.size{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:426.1-428.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:435.1-437.32 rule memory.grow{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:430.1-432.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:439.1-441.32 rule memory.fill{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:434.1-437.38 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:443.1-446.38 rule memory.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:439.1-442.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:448.1-451.24 rule memory.init{C : context, x : idx, y : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:444.1-446.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:453.1-455.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:457.1-460.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:466.1-469.44 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:462.1-465.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:471.1-474.36 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:476.1-479.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:485.1-488.44 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:481.1-484.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:490.1-493.36 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(M))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:486.1-489.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:495.1-498.47 rule `vload-val`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:491.1-494.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:500.1-503.41 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, (M * N)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:496.1-499.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:505.1-508.36 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:501.1-504.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:510.1-513.36 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:506.1-510.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:515.1-519.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:512.1-515.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:521.1-524.47 rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:517.1-521.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:526.1-530.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:526.1-527.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:535.1-536.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:529.1-530.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:538.1-539.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:532.1-533.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:535.1-536.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-545.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:538.1-539.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.44 rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.35 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:559.1-560.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:553.1-554.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.55 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:559.1-560.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.51 rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-587.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:589.1-590.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:592.1-593.50 rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-588.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:595.1-597.29 rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:590.1-591.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:599.1-600.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:593.1-595.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:602.1-604.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:597.1-599.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:606.1-608.21 rule vreplace_lane{C : context, sh : shape, i : laneidx}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-602.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:610.1-611.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:604.1-605.57 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:613.1-614.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:607.1-608.64 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:616.1-617.64 rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:610.1-611.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:613.1-614.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:622.1-623.46 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:6.1-6.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:628.1-629.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:623.1-627.82 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:632.1-636.82 rule seq{C : context, instr_1 : instr, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: `%|-%:%`(C, [instr_1] ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`}), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:629.1-633.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:638.1-642.33 rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr <- `instr*`}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:636.1-639.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:645.1-648.33 rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -4088,6 +4108,14 @@ relation Instr_const: `%|-%CONST`(context, instr) rule struct.new_default{C : context, x : idx}: `%|-%CONST`(C, STRUCT.NEW_DEFAULT_instr(x)) + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec + rule struct.new_desc{C : context, x : idx}: + `%|-%CONST`(C, STRUCT.NEW_DESC_instr(x)) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec + rule struct.new_default_desc{C : context, x : idx}: + `%|-%CONST`(C, STRUCT.NEW_DEFAULT_DESC_instr(x)) + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec rule array.new{C : context, x : idx}: `%|-%CONST`(C, ARRAY.NEW_instr(x)) From e4fd1bd622ab5cec1273f0265d43318e5e741489 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 03:25:46 -0700 Subject: [PATCH 12/24] update tests --- spectec/test-frontend/TEST.md | 280 +++++++++++++++++----------------- 1 file changed, 144 insertions(+), 136 deletions(-) diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 24fe9b19c..d24c3f457 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -849,7 +849,7 @@ syntax externtype = | GLOBAL{globaltype : globaltype}(globaltype : globaltype) | MEM{memtype : memtype}(memtype : memtype) | TABLE{tabletype : tabletype}(tabletype : tabletype) - | FUNC{typeuse : typeuse}(typeuse : typeuse) + | FUNC{heaptype : heaptype}(heaptype : heaptype) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec syntax moduletype = @@ -1123,11 +1123,11 @@ def $tablesxt(externtype*) : tabletype* rec { ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:320.1-320.88 -def $funcsxt(externtype*) : deftype* +def $funcsxt(externtype*) : heaptype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:338.1-338.24 def $funcsxt([]) = [] ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:339.1-339.47 - def $funcsxt{dt : deftype, `xt*` : externtype*}([FUNC_externtype((dt : deftype <: typeuse))] ++ xt*{xt <- `xt*`}) = [dt] ++ $funcsxt(xt*{xt <- `xt*`}) + def $funcsxt{ht : heaptype, `xt*` : externtype*}([FUNC_externtype(ht)] ++ xt*{xt <- `xt*`}) = [ht] ++ $funcsxt(xt*{xt <- `xt*`}) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:340.1-340.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise @@ -1302,7 +1302,7 @@ def $subst_externtype(externtype : externtype, typevar*, typeuse*) : externtype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $subst_externtype{mt : memtype, `tv*` : typevar*, `tu*` : typeuse*}(MEM_externtype(mt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = MEM_externtype($subst_memtype(mt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec - def $subst_externtype{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype((dt : deftype <: typeuse)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype(($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse)) + def $subst_externtype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(FUNC_externtype(ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = FUNC_externtype($subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $subst_moduletype(moduletype : moduletype, typevar*, typeuse*) : moduletype @@ -1578,7 +1578,7 @@ def $free_externtype(externtype : externtype) : free ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $free_externtype{tabletype : tabletype}(TABLE_externtype(tabletype)) = $free_tabletype(tabletype) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec - def $free_externtype{typeuse : typeuse}(FUNC_externtype(typeuse)) = $free_typeuse(typeuse) + def $free_externtype{heaptype : heaptype}(FUNC_externtype(heaptype)) = $free_heaptype(heaptype) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec def $free_moduletype(moduletype : moduletype) : free @@ -2672,7 +2672,7 @@ syntax context = GLOBALS{`globaltype*` : globaltype*} globaltype*, MEMS{`memtype*` : memtype*} memtype*, TABLES{`tabletype*` : tabletype*} tabletype*, - FUNCS{`deftype*` : deftype*} deftype*, + FUNCS{`heaptype*` : heaptype*} heaptype*, DATAS{`datatype*` : datatype*} datatype*, ELEMS{`elemtype*` : elemtype*} elemtype*, LOCALS{`localtype*` : localtype*} localtype*, @@ -3263,8 +3263,8 @@ relation Externtype_ok: `%|-%:OK`(context, externtype) -- Tabletype_ok: `%|-%:OK`(C, tabletype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec - rule func{C : context, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: - `%|-%:OK`(C, FUNC_externtype(typeuse)) + rule func{C : context, `exact?` : exact?, typeuse : typeuse, `t_1*` : valtype*, `t_2*` : valtype*}: + `%|-%:OK`(C, FUNC_externtype(_HT_heaptype(exact?{exact <- `exact?`}, typeuse))) -- Typeuse_ok: `%|-%:OK`(C, typeuse) -- Expand_use: `%~~_%%`(typeuse, C, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -3351,9 +3351,9 @@ relation Externtype_sub: `%|-%<:%`(context, externtype, externtype) -- Tabletype_sub: `%|-%<:%`(C, tabletype_1, tabletype_2) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec - rule func{C : context, deftype_1 : deftype, deftype_2 : deftype}: - `%|-%<:%`(C, FUNC_externtype((deftype_1 : deftype <: typeuse)), FUNC_externtype((deftype_2 : deftype <: typeuse))) - -- Deftype_sub: `%|-%<:%`(C, deftype_1, deftype_2) + rule func{C : context, heaptype_1 : heaptype, heaptype_2 : heaptype}: + `%|-%<:%`(C, FUNC_externtype(heaptype_1), FUNC_externtype(heaptype_2)) + -- Heaptype_sub: `%|-%<:%`(C, heaptype_1, heaptype_2) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec relation Blocktype_ok: `%|-%:%`(context, blocktype, instrtype) @@ -3525,38 +3525,40 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_3) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:121.1-123.45 - rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:121.1-124.37 + rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*, `exact?` : exact?, dt : deftype}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) + -- if (C.FUNCS_context[x!`%`_idx.0] = _HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:125.1-127.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:126.1-128.45 rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:129.1-133.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:130.1-134.45 rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:135.1-138.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:136.1-139.42 rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:141.1-146.42 - rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:142.1-148.42 + rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `exact?` : exact?, dt : deftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) + -- if (C.FUNCS_context[x!`%`_idx.0] = _HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.RETURN_context = ?(`%`_resulttype(t'_2*{t'_2 <- `t'_2*`}))) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:149.1-154.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:151.1-156.42 rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -3564,7 +3566,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:157.1-165.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:159.1-167.42 rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) @@ -3574,490 +3576,490 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:172.1-175.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:174.1-177.42 rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`}), `%`_resulttype([]))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:177.1-179.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:179.1-181.42 rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:181.1-185.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:183.1-187.34 rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`}), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`({TYPES [], RECS [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`})], RETURN ?(), REFS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:208.1-210.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:210.1-212.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:212.1-215.20 - rule ref.func{C : context, x : idx, dt : deftype}: - `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), (dt : deftype <: typeuse)))]))) - -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:214.1-217.20 + rule ref.func{C : context, x : idx, ht : heaptype}: + `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), ht)]))) + -- if (C.FUNCS_context[x!`%`_idx.0] = ht) -- if (x <- C.REFS_context) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:217.1-218.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:219.1-220.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:220.1-222.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:222.1-224.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:224.1-226.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:226.1-228.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)]), [], `%`_resulttype([REF_valtype(?(), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:228.1-229.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:230.1-231.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:231.1-235.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:233.1-237.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:237.1-241.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:239.1-243.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:246.1-247.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:248.1-249.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-254.68 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:254.1-256.68 rule struct.new{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:256.1-259.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:258.1-261.48 rule struct.new_default{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:261.1-263.88 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:263.1-265.88 rule struct.new_desc{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:265.1-268.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-270.48 rule struct.new_default_desc{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:273.1-277.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:275.1-279.41 rule struct.get{C : context, `sx?` : sx?, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:279.1-282.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:281.1-284.24 rule struct.set{C : context, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(?(MUT_mut), zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:287.1-289.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:289.1-291.43 rule array.new{C : context, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:291.1-294.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-296.45 rule array.new_default{C : context, x : idx, `mut?` : mut?, zt : storagetype}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:296.1-298.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:298.1-300.43 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:300.1-303.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-305.40 rule array.new_elem{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:305.1-309.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:307.1-311.24 rule array.new_data{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-314.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:313.1-316.39 rule array.get{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} = ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:316.1-318.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:318.1-320.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:320.1-321.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:322.1-323.43 rule array.len{C : context}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:323.1-325.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:325.1-327.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:327.1-331.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-333.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_1))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_2))) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-336.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:335.1-338.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:338.1-342.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:340.1-344.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:347.1-349.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:349.1-351.26 rule extern.convert_any{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:351.1-353.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.26 rule any.convert_extern{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:358.1-360.28 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:360.1-362.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:362.1-364.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:366.1-368.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:373.1-375.30 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:375.1-377.30 rule global.get{C : context, x : idx, t : valtype, `mut?` : mut?}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:377.1-379.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:384.1-386.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:386.1-388.32 rule table.get{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:388.1-390.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:390.1-392.32 rule table.set{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:392.1-394.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:394.1-396.32 rule table.size{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:396.1-398.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:398.1-400.32 rule table.grow{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:400.1-402.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:402.1-404.32 rule table.fill{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:404.1-408.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:406.1-410.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-414.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:412.1-416.36 rule table.init{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:416.1-418.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:418.1-420.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:431.1-433.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:433.1-435.32 rule memory.size{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:435.1-437.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 rule memory.grow{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:439.1-441.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-443.32 rule memory.fill{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:443.1-446.38 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:445.1-448.38 rule memory.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:448.1-451.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:450.1-453.24 rule memory.init{C : context, x : idx, y : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:453.1-455.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:455.1-457.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:466.1-469.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:468.1-471.44 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:471.1-474.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:473.1-476.36 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:485.1-488.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:487.1-490.44 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:490.1-493.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:492.1-495.36 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(M))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:495.1-498.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:497.1-500.47 rule `vload-val`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:500.1-503.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:502.1-505.41 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, (M * N)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:505.1-508.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:507.1-510.36 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:510.1-513.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:512.1-515.36 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:515.1-519.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:517.1-521.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:521.1-524.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:523.1-526.47 rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:526.1-530.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:528.1-532.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:535.1-536.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:537.1-538.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:538.1-539.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:540.1-541.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:543.1-544.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-545.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:546.1-547.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:549.1-550.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:552.1-553.44 rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.35 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:558.1-559.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:559.1-560.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:561.1-562.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:564.1-565.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.55 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:567.1-568.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:570.1-571.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:573.1-574.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:576.1-577.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:579.1-580.51 rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:582.1-583.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:585.1-586.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-587.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:588.1-589.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:589.1-590.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:591.1-592.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:592.1-593.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:594.1-595.50 rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:595.1-597.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:597.1-599.29 rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:599.1-600.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-602.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:602.1-604.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:604.1-606.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:606.1-608.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-610.21 rule vreplace_lane{C : context, sh : shape, i : laneidx}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:610.1-611.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:612.1-613.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:613.1-614.57 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:615.1-616.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:616.1-617.64 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:618.1-619.64 rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:621.1-622.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:622.1-623.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:624.1-625.46 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:6.1-6.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:628.1-629.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:630.1-631.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:632.1-636.82 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:634.1-638.82 rule seq{C : context, instr_1 : instr, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: `%|-%:%`(C, [instr_1] ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`}), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:638.1-642.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:640.1-644.33 rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr <- `instr*`}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:645.1-648.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:647.1-650.33 rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -4272,9 +4274,10 @@ relation Elem_ok: `%|-%:%`(context, elem, elemtype) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec relation Start_ok: `%|-%:OK`(context, start) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec - rule _{C : context, x : idx}: + rule _{C : context, x : idx, `exact?` : exact?, dt : deftype}: `%|-%:OK`(C, START_start(x)) - -- Expand: `%~~%`(C.FUNCS_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype([]), `%`_resulttype([]))) + -- if (C.FUNCS_context[x!`%`_idx.0] = _HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))) + -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype([]), `%`_resulttype([]))) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec relation Import_ok: `%|-%:%`(context, import, externtype) @@ -4306,9 +4309,9 @@ relation Externidx_ok: `%|-%:%`(context, externidx, externtype) -- if (C.TABLES_context[x!`%`_idx.0] = tt) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec - rule func{C : context, x : idx, dt : deftype}: - `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype((dt : deftype <: typeuse))) - -- if (C.FUNCS_context[x!`%`_idx.0] = dt) + rule func{C : context, x : idx, ht : heaptype}: + `%|-%:%`(C, FUNC_externidx(x), FUNC_externtype(ht)) + -- if (C.FUNCS_context[x!`%`_idx.0] = ht) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec relation Export_ok: `%|-%:%%`(context, export, name, externtype) @@ -4320,13 +4323,13 @@ relation Export_ok: `%|-%:%%`(context, export, name, externtype) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec rec { -;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:136.1-136.100 +;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:137.1-137.100 relation Globals_ok: `%|-%:%`(context, global*, globaltype*) - ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:180.1-181.17 + ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:182.1-183.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:183.1-186.54 + ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:185.1-188.54 rule cons{C : context, global_1 : global, `global*` : global*, gt_1 : globaltype, `gt*` : globaltype*}: `%|-%:%`(C, [global_1] ++ global*{global <- `global*`}, [gt_1] ++ gt*{gt <- `gt*`}) -- Global_ok: `%|-%:%`(C, global_1, gt_1) @@ -4336,13 +4339,13 @@ relation Globals_ok: `%|-%:%`(context, global*, globaltype*) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec rec { -;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:135.1-135.98 +;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:136.1-136.98 relation Types_ok: `%|-%:%`(context, type*, deftype*) - ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:172.1-173.17 + ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:174.1-175.17 rule empty{C : context}: `%|-%:%`(C, [], []) - ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:175.1-178.49 + ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec:177.1-180.49 rule cons{C : context, type_1 : type, `type*` : type*, `dt_1*` : deftype*, `dt*` : deftype*}: `%|-%:%`(C, [type_1] ++ type*{type <- `type*`}, dt_1*{dt_1 <- `dt_1*`} ++ dt*{dt <- `dt*`}) -- Type_ok: `%|-%:%`(C, type_1, dt_1*{dt_1 <- `dt_1*`}) @@ -4361,7 +4364,7 @@ def $funcidx_nonfuncs(nonfuncs : nonfuncs) : funcidx* ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec relation Module_ok: `|-%:%`(module, moduletype) ;; ../../../../specification/wasm-latest/2.4-validation.modules.spectec - rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `dt_I*` : deftype*, `x*` : idx*}: + rule _{`type*` : type*, `import*` : import*, `tag*` : tag*, `global*` : global*, `mem*` : mem*, `table*` : table*, `func*` : func*, `data*` : data*, `elem*` : elem*, `start?` : start?, `export*` : export*, C : context, `xt_I*` : externtype*, `xt_E*` : externtype*, `dt'*` : deftype*, C' : context, `jt*` : tagtype*, `gt*` : globaltype*, `mt*` : memtype*, `tt*` : tabletype*, `dt*` : deftype*, `ok*` : datatype*, `rt*` : reftype*, `nm*` : name*, `jt_I*` : tagtype*, `mt_I*` : memtype*, `tt_I*` : tabletype*, `gt_I*` : globaltype*, `ht_I*` : heaptype*, `ht*` : heaptype*, `x*` : idx*}: `|-%:%`(MODULE_module(type*{type <- `type*`}, import*{import <- `import*`}, tag*{tag <- `tag*`}, global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, func*{func <- `func*`}, data*{data <- `data*`}, elem*{elem <- `elem*`}, start?{start <- `start?`}, export*{export <- `export*`}), $clos_moduletype(C, `%->%`_moduletype(xt_I*{xt_I <- `xt_I*`}, xt_E*{xt_E <- `xt_E*`}))) -- Types_ok: `%|-%:%`({TYPES [], RECS [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS []}, type*{type <- `type*`}, dt'*{dt' <- `dt'*`}) -- (Import_ok: `%|-%:%`({TYPES dt'*{dt' <- `dt'*`}, RECS [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS []}, import, xt_I))*{import <- `import*`, xt_I <- `xt_I*`} @@ -4376,13 +4379,14 @@ relation Module_ok: `|-%:%`(module, moduletype) -- (Export_ok: `%|-%:%%`(C, export, nm, xt_E))*{export <- `export*`, nm <- `nm*`, xt_E <- `xt_E*`} -- if $disjoint_(syntax name, nm*{nm <- `nm*`}) -- if (C = C' +++ {TYPES [], RECS [], TAGS jt_I*{jt_I <- `jt_I*`} ++ jt*{jt <- `jt*`}, GLOBALS gt*{gt <- `gt*`}, MEMS mt_I*{mt_I <- `mt_I*`} ++ mt*{mt <- `mt*`}, TABLES tt_I*{tt_I <- `tt_I*`} ++ tt*{tt <- `tt*`}, FUNCS [], DATAS ok*{ok <- `ok*`}, ELEMS rt*{rt <- `rt*`}, LOCALS [], LABELS [], RETURN ?(), REFS []}) - -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, RECS [], TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS dt_I*{dt_I <- `dt_I*`} ++ dt*{dt <- `dt*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}}) + -- if (C' = {TYPES dt'*{dt' <- `dt'*`}, RECS [], TAGS [], GLOBALS gt_I*{gt_I <- `gt_I*`}, MEMS [], TABLES [], FUNCS ht_I*{ht_I <- `ht_I*`} ++ ht*{ht <- `ht*`}, DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS x*{x <- `x*`}}) + -- if (ht*{ht <- `ht*`} = _HT_heaptype(?(EXACT_exact), (dt : deftype <: typeuse))*{dt <- `dt*`}) -- if (x*{x <- `x*`} = $funcidx_nonfuncs(`%%%%`_nonfuncs(global*{global <- `global*`}, mem*{mem <- `mem*`}, table*{table <- `table*`}, elem*{elem <- `elem*`}))) -- if (jt_I*{jt_I <- `jt_I*`} = $tagsxt(xt_I*{xt_I <- `xt_I*`})) -- if (gt_I*{gt_I <- `gt_I*`} = $globalsxt(xt_I*{xt_I <- `xt_I*`})) -- if (mt_I*{mt_I <- `mt_I*`} = $memsxt(xt_I*{xt_I <- `xt_I*`})) -- if (tt_I*{tt_I <- `tt_I*`} = $tablesxt(xt_I*{xt_I <- `xt_I*`})) - -- if (dt_I*{dt_I <- `dt_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) + -- if (ht_I*{ht_I <- `ht_I*`} = $funcsxt(xt_I*{xt_I <- `xt_I*`})) ;; ../../../../specification/wasm-latest/3.0-numerics.relaxed.spectec syntax relaxed2 = @@ -6015,7 +6019,7 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:104.1-106.30 rule func{s : store, a : addr, funcinst : funcinst}: - `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype((funcinst.TYPE_funcinst : deftype <: typeuse))) + `%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype(_HT_heaptype(?(EXACT_exact), (funcinst.TYPE_funcinst : deftype <: typeuse)))) -- if (s.FUNCS_store[a] = funcinst) ;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:108.1-111.37 @@ -7734,7 +7738,9 @@ grammar Btabletype : tabletype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Bexterntype : externtype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_IDX_typeuse(x)) + prod{x : idx} {{0x00} {x:Btypeidx}} => FUNC_externtype(_HT_heaptype(?(), _IDX_typeuse(x))) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{x : idx} {{0x20} {x:Btypeidx}} => FUNC_externtype(_HT_heaptype(?(EXACT_exact), _IDX_typeuse(x))) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{tt : tabletype} {{0x01} {tt:Btabletype}} => TABLE_externtype(tt) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec @@ -9804,7 +9810,9 @@ grammar Texterntype_(I : I) : (externtype, idctxt) ;; ../../../../specification/wasm-latest/6.2-text.types.spectec prod{`id?` : char?, tt : tabletype} {{"("} {"table"} {?(`%`_name(lift(id?{id <- `id?`}))):Tid?{}} {tt:Ttabletype_(I)} {")"}} => (TABLE_externtype(tt), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [?(`%`_name(lift(id?{id <- `id?`})))], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) ;; ../../../../specification/wasm-latest/6.2-text.types.spectec - prod{`id?` : char?, x : idx, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}))):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_IDX_typeuse(x)), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`})))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + prod{`id?` : char?, x : idx, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}))):Tid?{}} {(x, I'):Ttypeuse_(I)} {")"}} => (FUNC_externtype(_HT_heaptype(?(), _IDX_typeuse(x))), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`})))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) + ;; ../../../../specification/wasm-latest/6.2-text.types.spectec + prod{`id?` : char?, x : idx, I' : I} {{"("} {"func"} {?(`%`_name(lift(id?{id <- `id?`}))):Tid?{}} {"("} {"exact"} {(x, I'):Ttypeuse_(I)} {")"} {")"}} => (FUNC_externtype(_HT_heaptype(?(EXACT_exact), _IDX_typeuse(x))), {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [?(`%`_name(lift(id?{id <- `id?`})))], DATAS [], ELEMS [], LOCALS [], LABELS [], FIELDS [], TYPEDEFS []}) ;; ../../../../specification/wasm-latest/6.3-text.instructions.spectec grammar Tlabel_(I : I) : (name?, I) From f1b94b8bcb92ae2cdf96890a58a2cec06a329cb0 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 05:39:27 -0700 Subject: [PATCH 13/24] fix parens --- specification/wasm-latest/1.2-syntax.types.spectec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index 6bf936730..cdf6c2ef1 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -43,7 +43,7 @@ syntax typevar hint(desc "type variable") = | _IDX typeidx | REC n hint(show REC.%) syntax heaptype hint(desc "heap type") = - | absheaptype | _HT exact? typeuse + | absheaptype | _HT exact? typeuse hint(show % %) syntax reftype hint(desc "reference type") = | REF null? heaptype From de6816fa1db460e5ee669f19d21f4e51e9c51e13 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 05:44:22 -0700 Subject: [PATCH 14/24] update tests --- spectec/test-frontend/TEST.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 3f47dc1b8..8dcc6cc80 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -616,7 +616,7 @@ syntax typeuse = | _DEF{rectype : rectype, n : n}(rectype : rectype, n : n) | REC{n : n}(n : n) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:45.1-46.37 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:45.1-46.52 syntax heaptype = | ANY | EQ From a889729c02f2da9adb7226d708926d26ecfd217a Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 06:36:35 -0700 Subject: [PATCH 15/24] use exactness variable and update tests --- document/core/valid/instructions.rst | 2 +- .../2.3-validation.instructions.spectec | 6 +- spectec/test-frontend/TEST.md | 392 +++++++++--------- 3 files changed, 201 insertions(+), 199 deletions(-) diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index 1da2143a7..7dc05b840 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -810,7 +810,7 @@ $${rule: Instr_ok/ref.eq} $${rule-prose: Instr_ok/ref.get_desc} -$${rule: Instr_ok/ref.get_desc Instr_ok/ref.get_desc-exact} +$${rule: Instr_ok/ref.get_desc} .. _valid-ref.test: diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 68e18a5b5..bb380f13b 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -231,11 +231,7 @@ rule Instr_ok/ref.eq: C |- REF.EQ : (REF NULL EQ) (REF NULL EQ) -> I32 rule Instr_ok/ref.get_desc: - C |- REF.GET_DESC x : (REF NULL (_IDX x)) -> (REF (_IDX y)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct - -rule Instr_ok/ref.get_desc-exact: - C |- REF.GET_DESC x : (REF NULL (EXACT (_IDX x))) -> (REF (EXACT (_IDX y))) + C |- REF.GET_DESC x : (REF NULL (_HT exact? _IDX x)) -> (REF (_HT exact? _IDX y)) -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct rule Instr_ok/ref.test: diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index c06e6b333..59c39e951 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -2167,6 +2167,7 @@ syntax instr = | REF.IS_NULL | REF.AS_NON_NULL | REF.EQ + | REF.GET_DESC{typeidx : typeidx}(typeidx : typeidx) | REF.TEST{reftype : reftype}(reftype : reftype) | REF.CAST{reftype : reftype}(reftype : reftype) | REF.FUNC{funcidx : funcidx}(funcidx : funcidx) @@ -2266,227 +2267,227 @@ def $free_blocktype(blocktype : blocktype) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:574.1-574.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-578.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:419.1-419.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:420.1-420.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:430.1-430.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:431.1-431.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:431.1-431.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:432.1-432.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:432.1-432.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:433.1-433.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:433.1-433.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:434.1-434.86 def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:435.1-435.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-438.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-439.79 def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:440.1-440.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-441.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-441.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-443.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.69 def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-446.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-447.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-448.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-454.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:455.1-455.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.64 def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-466.62 def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-467.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-468.55 def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.64 - def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.68 - def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.68 + def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.60 - def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.60 + def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-481.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-481.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-485.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-486.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-487.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-488.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-489.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-490.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-491.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-492.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-493.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.59 - def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.59 - def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-503.59 + def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-504.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-504.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:507.1-507.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.69 - def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.69 + def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-517.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-518.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-519.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-520.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-525.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-526.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-527.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-529.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.41 - def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.41 + def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.63 - def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-535.63 - def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.63 + def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.67 - def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.67 + def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-541.63 - def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.63 + def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.64 - def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-544.64 - def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.64 + def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-547.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-548.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-549.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-550.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-553.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-554.49 def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-555.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-556.49 def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-557.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-559.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-560.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-561.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-562.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-563.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:564.1-564.59 - def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-565.59 - def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:566.1-566.59 + def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-568.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:568.1-569.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-570.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:570.1-571.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-571.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:572.1-572.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:420.1-420.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:580.1-581.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) } @@ -3623,443 +3624,448 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:233.1-237.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:233.1-235.71 + rule ref.get_desc{C : context, x : idx, `exact?` : exact?, y : idx, `describestype?` : describestype?, ct : comptype}: + `%|-%:%`(C, REF.GET_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(y)))]))) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:237.1-241.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:239.1-243.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:243.1-247.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:248.1-249.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-253.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:254.1-256.68 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:258.1-260.68 rule struct.new{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:258.1-261.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:262.1-265.48 rule struct.new_default{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:263.1-265.88 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-269.88 rule struct.new_desc{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-270.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:271.1-274.48 rule struct.new_default_desc{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:275.1-279.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:279.1-283.41 rule struct.get{C : context, `sx?` : sx?, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:281.1-284.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:285.1-288.24 rule struct.set{C : context, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(?(MUT_mut), zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:289.1-291.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-295.43 rule array.new{C : context, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-296.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:297.1-300.45 rule array.new_default{C : context, x : idx, `mut?` : mut?, zt : storagetype}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:298.1-300.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-304.43 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-305.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:306.1-309.40 rule array.new_elem{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:307.1-311.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-315.24 rule array.new_data{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:313.1-316.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:317.1-320.39 rule array.get{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} = ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:318.1-320.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:322.1-324.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:322.1-323.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:326.1-327.43 rule array.len{C : context}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:325.1-327.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-331.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-333.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-337.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_1))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_2))) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:335.1-338.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:339.1-342.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:340.1-344.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:344.1-348.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:349.1-351.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.26 rule extern.convert_any{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-359.26 rule any.convert_extern{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:360.1-362.28 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:372.1-374.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:375.1-377.30 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.30 rule global.get{C : context, x : idx, t : valtype, `mut?` : mut?}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:383.1-385.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:386.1-388.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:390.1-392.32 rule table.get{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:390.1-392.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:394.1-396.32 rule table.set{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:394.1-396.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:398.1-400.32 rule table.size{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:398.1-400.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:402.1-404.32 rule table.grow{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:402.1-404.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:406.1-408.32 rule table.fill{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:406.1-410.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-414.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:412.1-416.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:416.1-420.36 rule table.init{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:418.1-420.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:422.1-424.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:433.1-435.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 rule memory.size{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-443.32 rule memory.grow{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-443.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:445.1-447.32 rule memory.fill{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:445.1-448.38 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:449.1-452.38 rule memory.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:450.1-453.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:454.1-457.24 rule memory.init{C : context, x : idx, y : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:455.1-457.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:459.1-461.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:468.1-471.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:472.1-475.44 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:473.1-476.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:477.1-480.36 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:487.1-490.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:491.1-494.44 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:492.1-495.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:496.1-499.36 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(M))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:497.1-500.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:501.1-504.47 rule `vload-val`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:502.1-505.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:506.1-509.41 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, (M * N)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:507.1-510.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:511.1-514.36 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:512.1-515.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:516.1-519.36 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:517.1-521.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:521.1-525.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:523.1-526.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:527.1-530.47 rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:528.1-532.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:532.1-536.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:537.1-538.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:540.1-541.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-545.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:543.1-544.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:546.1-547.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:549.1-550.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:553.1-554.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:552.1-553.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.44 rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:558.1-559.35 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:561.1-562.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:564.1-565.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:567.1-568.55 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:570.1-571.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:573.1-574.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:576.1-577.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:579.1-580.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.51 rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:582.1-583.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-587.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:585.1-586.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:589.1-590.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:588.1-589.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:592.1-593.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:591.1-592.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:595.1-596.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:594.1-595.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:598.1-599.50 rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:597.1-599.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-603.29 rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-602.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:605.1-606.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:604.1-606.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-610.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-610.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:612.1-614.21 rule vreplace_lane{C : context, sh : shape, i : laneidx}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:612.1-613.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:616.1-617.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:615.1-616.57 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:618.1-619.64 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:622.1-623.64 rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:621.1-622.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:625.1-626.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:624.1-625.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:628.1-629.46 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:6.1-6.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:630.1-631.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:634.1-635.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:634.1-638.82 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:638.1-642.82 rule seq{C : context, instr_1 : instr, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: `%|-%:%`(C, [instr_1] ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`}), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:640.1-644.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:644.1-648.33 rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr <- `instr*`}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:647.1-650.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:651.1-654.33 rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) From 90248f3da2608cfa87fd546ac0f5eae986c30f0c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 14 Jul 2026 07:09:07 -0700 Subject: [PATCH 16/24] use exactness vars and update tests --- document/core/valid/instructions.rst | 6 +- .../2.3-validation.instructions.spectec | 48 +- spectec/test-frontend/TEST.md | 458 ++++++++++-------- 3 files changed, 260 insertions(+), 252 deletions(-) diff --git a/document/core/valid/instructions.rst b/document/core/valid/instructions.rst index 7589addf1..8b1db1a79 100644 --- a/document/core/valid/instructions.rst +++ b/document/core/valid/instructions.rst @@ -259,7 +259,7 @@ $${rule: Instr_ok/br_on_cast_fail} $${rule-prose: Instr_ok/br_on_cast_desc_eq} -$${rule: Instr_ok/br_on_cast_desc_eq Instr_ok/br_on_cast_desc_eq-exact} +$${rule: Instr_ok/br_on_cast_desc_eq} .. note:: The existence of a common supertype ${:rt_3} means that ${:rt_1} and ${:rt_2} must be in the same heap subtyping hierarchy. @@ -272,7 +272,7 @@ $${rule: Instr_ok/br_on_cast_desc_eq Instr_ok/br_on_cast_desc_eq-exact} $${rule-prose: Instr_ok/br_on_cast_desc_eq_fail} -$${rule: Instr_ok/br_on_cast_desc_eq_fail Instr_ok/br_on_cast_desc_eq_fail-exact} +$${rule: Instr_ok/br_on_cast_desc_eq_fail} .. note:: The existence of a common supertype ${:rt_3} means that ${:rt_1} and ${:rt_2} must be in the same heap subtyping hierarchy. @@ -872,7 +872,7 @@ $${rule: Instr_ok/ref.cast} $${rule-prose: Instr_ok/ref.cast_desc_eq} -$${rule: Instr_ok/ref.cast_desc_eq Instr_ok/ref.cast_desc_eq-exact} +$${rule: Instr_ok/ref.cast_desc_eq} .. index:: aggregate reference diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 5ac94c9dd..3bfb63578 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -116,52 +116,26 @@ rule Instr_ok/br_on_cast_fail: -- Reftype_sub: C |- $diffrt(rt_1, rt_2) <: rt rule Instr_ok/br_on_cast_desc_eq: - C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null_2 (_IDX x)) : t* rt_1 (REF NULL (_IDX y)) -> t* ($diffrt(rt_1, (REF null_2 (_IDX x)))) + C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null? (_HT exact? _IDX x)) : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* ($diffrt(rt_1, (REF null? (_HT exact? _IDX x)))) -- if C.LABELS[l] = t* rt -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct -- Reftype_ok: C |- rt_1 : OK - -- Reftype_ok: C |- (REF null_2 (_IDX x)) : OK -- Reftype_ok: C |- rt_3 : OK ---- -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt_3 - -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt - -rule Instr_ok/br_on_cast_desc_eq-exact: - C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null_2 (EXACT (_IDX x))) : t* rt_1 (REF NULL (EXACT (_IDX y))) -> t* ($diffrt(rt_1, (REF null_2 (EXACT (_IDX x))))) - -- if C.LABELS[l] = t* rt - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct - -- Reftype_ok: C |- rt_1 : OK - -- Reftype_ok: C |- (REF null_2 (EXACT (_IDX x))) : OK - -- Reftype_ok: C |- rt_3 : OK - ---- - -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt_3 - -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt + -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt_3 + -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt rule Instr_ok/br_on_cast_desc_eq_fail: - C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null_2 (_IDX x)) : t* rt_1 (REF NULL (_IDX y)) -> t* (REF null_2 (_IDX x)) + C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null? (_HT exact? _IDX x)) : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* (REF null? (_HT exact? _IDX x)) -- if C.LABELS[l] = t* rt -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct -- Reftype_ok: C |- rt_1 : OK - -- Reftype_ok: C |- (REF null_2 (_IDX x)) : OK -- Reftype_ok: C |- rt_3 : OK ---- -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null_2 (_IDX x)) <: rt_3 - -- Reftype_sub: C |- $diffrt(rt_1, (REF null_2 (_IDX x))) <: rt - -rule Instr_ok/br_on_cast_desc_eq_fail-exact: - C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null_2 (EXACT (_IDX x))) : t* rt_1 (REF NULL (EXACT (_IDX y))) -> t* (REF null_2 (EXACT (_IDX x))) - -- if C.LABELS[l] = t* rt - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct - -- Reftype_ok: C |- rt_1 : OK - -- Reftype_ok: C |- (REF null_2 (EXACT (_IDX x))) : OK - -- Reftype_ok: C |- rt_3 : OK - ---- - -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null_2 (EXACT (_IDX x))) <: rt_3 - -- Reftype_sub: C |- $diffrt(rt_1, (REF null_2 (EXACT (_IDX x)))) <: rt + -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt_3 + -- Reftype_sub: C |- $diffrt(rt_1, (REF null? (_HT exact? _IDX x))) <: rt ;; Function instructions @@ -295,14 +269,10 @@ rule Instr_ok/ref.cast: -- Reftype_sub: C |- rt <: rt' rule Instr_ok/ref.cast_desc_eq: - C |- REF.CAST_DESC_EQ (REF null_1 (_IDX x)) : (REF NULL ht) (REF NULL (_IDX y)) -> (REF null_1 (_IDX x)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct - -- Heaptype_sub: C |- (_IDX x) <: ht - -rule Instr_ok/ref.cast_desc_eq-exact: - C |- REF.CAST_DESC_EQ (REF null_1 (EXACT (_IDX x))) : (REF NULL ht) (REF NULL (EXACT (_IDX y))) -> (REF null_1 (EXACT (_IDX x))) + C |- REF.CAST_DESC_EQ (REF null? (_HT exact? _IDX x)) : (REF NULL ht) (REF NULL (_HT exact? _IDX y)) -> (REF null? (_HT exact? _IDX x)) + -- Heaptype_ok: C |- ht : OK -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct - -- Heaptype_sub: C |- (_IDX x) <: ht + -- Heaptype_sub: C |- (_HT exact? _IDX x) <: ht ;; Scalar reference instructions diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 59c39e951..574a07d3f 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -2128,6 +2128,8 @@ syntax instr = | BR_ON_NON_NULL{labelidx : labelidx}(labelidx : labelidx) | BR_ON_CAST{labelidx : labelidx, reftype : reftype}(labelidx : labelidx, reftype : reftype, reftype) | BR_ON_CAST_FAIL{labelidx : labelidx, reftype : reftype}(labelidx : labelidx, reftype : reftype, reftype) + | BR_ON_CAST_DESC_EQ{labelidx : labelidx, reftype : reftype}(labelidx : labelidx, reftype : reftype, reftype) + | BR_ON_CAST_DESC_EQ_FAIL{labelidx : labelidx, reftype : reftype}(labelidx : labelidx, reftype : reftype, reftype) | CALL{funcidx : funcidx}(funcidx : funcidx) | CALL_REF{typeuse : typeuse}(typeuse : typeuse) | CALL_INDIRECT{tableidx : tableidx, typeuse : typeuse}(tableidx : tableidx, typeuse : typeuse) @@ -2170,6 +2172,7 @@ syntax instr = | REF.GET_DESC{typeidx : typeidx}(typeidx : typeidx) | REF.TEST{reftype : reftype}(reftype : reftype) | REF.CAST{reftype : reftype}(reftype : reftype) + | REF.CAST_DESC_EQ{reftype : reftype}(reftype : reftype) | REF.FUNC{funcidx : funcidx}(funcidx : funcidx) | REF.I31 | I31.GET{sx : sx}(sx : sx) @@ -2267,227 +2270,233 @@ def $free_blocktype(blocktype : blocktype) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-584.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-585.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-578.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-586.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat))] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:420.1-420.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:423.1-423.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:431.1-431.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:434.1-434.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:432.1-432.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:435.1-435.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:433.1-433.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:434.1-434.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.86 def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:440.1-440.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-439.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-442.79 def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-441.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-447.69 def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-446.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-449.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-448.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:450.1-451.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-453.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_DESC_EQ_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-457.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_DESC_EQ_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-459.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-460.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-462.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-467.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.64 def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-466.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.62 def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-468.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-475.55 def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.64 def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-481.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:481.1-481.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-485.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-492.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-487.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-494.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-489.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-496.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-491.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-498.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-493.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-500.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-503.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.62 def $free_instr{heaptype : heaptype}(REF.NULL_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.34 def $free_instr(REF.IS_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:507.1-507.38 def $free_instr(REF.AS_NON_NULL_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.29 def $free_instr(REF.EQ_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.59 def $free_instr{reftype : reftype}(REF.TEST_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-503.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.59 def $free_instr{reftype : reftype}(REF.CAST_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-504.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.67 + def $free_instr{reftype : reftype}(REF.CAST_DESC_EQ_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.59 def $free_instr{funcidx : funcidx}(REF.FUNC_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.30 def $free_instr(REF.I31_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:507.1-507.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.33 def $free_instr{sx : sx}(I31.GET_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.41 def $free_instr{typeidx : typeidx}(STRUCT.NEW_instr(typeidx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.69 def $free_instr{typeidx : typeidx}(STRUCT.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(STRUCT.GET_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.65 def $free_instr{typeidx : typeidx, u32 : u32}(STRUCT.SET_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.60 def $free_instr{typeidx : typeidx}(ARRAY.NEW_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.68 def $free_instr{typeidx : typeidx}(ARRAY.NEW_DEFAULT_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.70 def $free_instr{typeidx : typeidx, u32 : u32}(ARRAY.NEW_FIXED_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-518.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-526.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.NEW_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-520.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.NEW_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-529.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(ARRAY.GET_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(ARRAY.SET_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.32 def $free_instr(ARRAY.LEN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.61 def $free_instr{typeidx : typeidx}(ARRAY.FILL_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-526.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(ARRAY.COPY_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(ARRAY.INIT_DATA_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-538.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(ARRAY.INIT_ELEM_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.41 def $free_instr(EXTERN.CONVERT_ANY_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-541.41 def $free_instr(ANY.CONVERT_EXTERN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-535.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.63 def $free_instr{localidx : localidx}(LOCAL.GET_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-544.63 def $free_instr{localidx : localidx}(LOCAL.SET_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.63 def $free_instr{localidx : localidx}(LOCAL.TEE_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.67 def $free_instr{globalidx : globalidx}(GLOBAL.GET_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.67 def $free_instr{globalidx : globalidx}(GLOBAL.SET_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.63 def $free_instr{tableidx : tableidx}(TABLE.GET_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 def $free_instr{tableidx : tableidx}(TABLE.SET_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-544.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.64 def $free_instr{tableidx : tableidx}(TABLE.SIZE_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.64 def $free_instr{tableidx : tableidx}(TABLE.GROW_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.64 def $free_instr{tableidx : tableidx}(TABLE.FILL_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-548.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-556.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(TABLE.COPY_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-550.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(TABLE.INIT_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.60 def $free_instr{elemidx : elemidx}(ELEM.DROP_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-554.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-562.49 def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-556.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.49 def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-560.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-568.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-562.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-570.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-572.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-565.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:573.1-573.59 def $free_instr{memidx : memidx}(MEMORY.SIZE_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:566.1-566.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:574.1-574.59 def $free_instr{memidx : memidx}(MEMORY.GROW_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.59 def $free_instr{memidx : memidx}(MEMORY.FILL_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:568.1-569.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-577.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(MEMORY.COPY_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:570.1-571.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.49 def $free_instr{memidx : memidx, dataidx : dataidx}(MEMORY.INIT_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:572.1-572.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:580.1-580.60 def $free_instr{dataidx : dataidx}(DATA.DROP_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:424.1-424.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:580.1-581.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-589.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) } @@ -3526,31 +3535,53 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_3) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:121.1-124.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:118.1-127.61 + rule br_on_cast_desc_eq{C : context, l : labelidx, rt_1 : reftype, `null?` : null?, `exact?` : exact?, x : idx, `t*` : valtype*, y : idx, rt : reftype, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + `%|-%:%`(C, BR_ON_CAST_DESC_EQ_instr(l, rt_1, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(y)))]), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))) : reftype <: valtype)]))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)])) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) + -- Reftype_sub: `%|-%<:%`(C, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x))), rt_3) + -- Reftype_sub: `%|-%<:%`(C, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x))), rt) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:129.1-138.76 + rule br_on_cast_desc_eq_fail{C : context, l : labelidx, rt_1 : reftype, `null?` : null?, `exact?` : exact?, x : idx, `t*` : valtype*, y : idx, rt : reftype, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + `%|-%:%`(C, BR_ON_CAST_DESC_EQ_FAIL_instr(l, rt_1, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(y)))]), [], `%`_resulttype(t*{t <- `t*`} ++ [REF_valtype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))]))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)])) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) + -- Reftype_sub: `%|-%<:%`(C, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x))), rt_3) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))), rt) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:143.1-146.37 rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*, `exact?` : exact?, dt : deftype}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.FUNCS_context[x!`%`_idx.0] = _HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))) -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:126.1-128.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:148.1-150.45 rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:130.1-134.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:152.1-156.45 rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:136.1-139.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:158.1-161.42 rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:142.1-148.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:164.1-170.42 rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `exact?` : exact?, dt : deftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- if (C.FUNCS_context[x!`%`_idx.0] = _HT_heaptype(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))) @@ -3559,7 +3590,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:151.1-156.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:173.1-178.42 rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -3567,7 +3598,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:159.1-167.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:181.1-189.42 rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)]), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) @@ -3577,495 +3608,502 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`}), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`})) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`}), [], `%`_resulttype(t_4*{t_4 <- `t_4*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:174.1-177.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:196.1-199.42 rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`}), `%`_resulttype([]))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:179.1-181.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:201.1-203.42 rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)]), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:183.1-187.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:205.1-209.34 rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`}), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), [], `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`({TYPES [], RECS [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`})], RETURN ?(), REFS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:210.1-212.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:232.1-234.31 rule ref.null{C : context, ht : heaptype}: `%|-%:%`(C, REF.NULL_instr(ht), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:214.1-217.20 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:236.1-239.20 rule ref.func{C : context, x : idx, ht : heaptype}: `%|-%:%`(C, REF.FUNC_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), ht)]))) -- if (C.FUNCS_context[x!`%`_idx.0] = ht) -- if (x <- C.REFS_context) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:219.1-220.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:241.1-242.34 rule ref.i31{C : context}: `%|-%:%`(C, REF.I31_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:222.1-224.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:244.1-246.31 rule ref.is_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.IS_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)]), [], `%`_resulttype([I32_valtype]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:226.1-228.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:248.1-250.31 rule ref.as_non_null{C : context, ht : heaptype}: `%|-%:%`(C, REF.AS_NON_NULL_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)]), [], `%`_resulttype([REF_valtype(?(), ht)]))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:230.1-231.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-253.51 rule ref.eq{C : context}: `%|-%:%`(C, REF.EQ_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:233.1-235.71 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:255.1-257.71 rule ref.get_desc{C : context, x : idx, `exact?` : exact?, y : idx, `describestype?` : describestype?, ct : comptype}: `%|-%:%`(C, REF.GET_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(y)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:237.1-241.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:259.1-263.33 rule ref.test{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.TEST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:243.1-247.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:265.1-269.33 rule ref.cast{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, REF.CAST_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-253.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:271.1-275.50 + rule ref.cast_desc_eq{C : context, `null?` : null?, `exact?` : exact?, x : idx, ht : heaptype, y : idx, `describestype?` : describestype?, ct : comptype}: + `%|-%:%`(C, REF.CAST_DESC_EQ_instr(REF_reftype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht) REF_valtype(?(NULL_null), _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(null?{null <- `null?`}, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)))]))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(exact?{exact <- `exact?`}, _IDX_typeuse(x)), ht) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:280.1-281.42 rule i31.get{C : context, sx : sx}: `%|-%:%`(C, I31.GET_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:258.1-260.68 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:286.1-288.68 rule struct.new{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:262.1-265.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:290.1-293.48 rule struct.new_default{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-269.88 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:295.1-297.88 rule struct.new_desc{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:271.1-274.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:299.1-302.48 rule struct.new_default_desc{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:279.1-283.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:307.1-311.41 rule struct.get{C : context, `sx?` : sx?, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: `%|-%:%`(C, STRUCT.GET_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x)))]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:285.1-288.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:313.1-316.24 rule struct.set{C : context, x : idx, i : u32, zt : storagetype, `ft*` : fieldtype*}: `%|-%:%`(C, STRUCT.SET_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`}))) -- if (ft*{ft <- `ft*`}[i!`%`_u32.0] = `%%`_fieldtype(?(MUT_mut), zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-295.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:321.1-323.43 rule array.new{C : context, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:297.1-300.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:325.1-328.45 rule array.new_default{C : context, x : idx, `mut?` : mut?, zt : storagetype}: `%|-%:%`(C, ARRAY.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-304.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:330.1-332.43 rule array.new_fixed{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.NEW_FIXED_instr(x, `%`_u32(n)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:306.1-309.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:334.1-337.40 rule array.new_elem{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: `%|-%:%`(C, ARRAY.NEW_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-315.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:339.1-343.24 rule array.new_data{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.NEW_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:317.1-320.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:345.1-348.39 rule array.get{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, ARRAY.GET_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype]), [], `%`_resulttype([$unpack(zt)]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} = ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:322.1-324.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:350.1-352.42 rule array.set{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt)]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:326.1-327.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:354.1-355.43 rule array.len{C : context}: `%|-%:%`(C, ARRAY.LEN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-331.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-359.42 rule array.fill{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype $unpack(zt) I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-337.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:361.1-365.40 rule array.copy{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: `%|-%:%`(C, ARRAY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_1))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x_2))) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:339.1-342.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:367.1-370.44 rule array.init_elem{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, ARRAY.INIT_ELEM_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:344.1-348.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:372.1-376.24 rule array.init_data{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, ARRAY.INIT_DATA_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(), _IDX_typeuse(x))) I32_valtype I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:381.1-383.26 rule extern.convert_any{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, EXTERN.CONVERT_ANY_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-359.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:385.1-387.26 rule any.convert_extern{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, ANY.CONVERT_EXTERN_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)]), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)]))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.28 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:392.1-394.28 rule local.get{C : context, x : idx, t : valtype}: `%|-%:%`(C, LOCAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:396.1-398.29 rule local.set{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:372.1-374.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:400.1-402.29 rule local.tee{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, LOCAL.TEE_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [x], `%`_resulttype([t]))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.30 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:407.1-409.30 rule global.get{C : context, x : idx, t : valtype, `mut?` : mut?}: `%|-%:%`(C, GLOBAL.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([t]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:383.1-385.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:411.1-413.29 rule global.set{C : context, x : idx, t : valtype}: `%|-%:%`(C, GLOBAL.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([t]), [], `%`_resulttype([]))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:390.1-392.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:418.1-420.32 rule table.get{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.GET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(rt : reftype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:394.1-396.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:422.1-424.32 rule table.set{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.SET_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:398.1-400.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:426.1-428.32 rule table.size{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: `%|-%:%`(C, TABLE.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:402.1-404.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:430.1-432.32 rule table.grow{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: `%|-%:%`(C, TABLE.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:406.1-408.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:434.1-436.32 rule table.fill{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, TABLE.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-414.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:438.1-442.36 rule table.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, TABLE.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:416.1-420.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:444.1-448.36 rule table.init{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, TABLE.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:422.1-424.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:450.1-452.24 rule elem.drop{C : context, x : idx, rt : reftype}: `%|-%:%`(C, ELEM.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:465.1-467.32 rule memory.size{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.SIZE_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-443.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:469.1-471.32 rule memory.grow{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.GROW_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(at : addrtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:445.1-447.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:473.1-475.32 rule memory.fill{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.FILL_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:449.1-452.38 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:477.1-480.38 rule memory.copy{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: `%|-%:%`(C, MEMORY.COPY_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:454.1-457.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:482.1-485.24 rule memory.init{C : context, x : idx, y : idx, at : addrtype, lim : limits}: `%|-%:%`(C, MEMORY.INIT_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:459.1-461.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:487.1-489.24 rule data.drop{C : context, x : idx}: `%|-%:%`(C, DATA.DROP_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:472.1-475.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:500.1-503.44 rule `load-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:477.1-480.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:505.1-508.36 rule `load-pack`{C : context, Inn : Inn, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(M), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([(Inn : Inn <: valtype)]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:491.1-494.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:519.1-522.44 rule `store-val`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:496.1-499.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:524.1-527.36 rule `store-pack`{C : context, Inn : Inn, M : M, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(M))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, M) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:501.1-504.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:529.1-532.47 rule `vload-val`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:506.1-509.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:534.1-537.41 rule `vload-pack`{C : context, M : M, N : N, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(M), N, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, (M * N)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:511.1-514.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:539.1-542.36 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:516.1-519.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-547.36 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:521.1-525.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:549.1-553.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:527.1-530.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:555.1-558.47 rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:532.1-536.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:560.1-564.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype]), [], `%`_resulttype([]))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:569.1-570.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-545.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:572.1-573.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:575.1-576.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([(nt : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:578.1-579.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:553.1-554.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:581.1-582.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:584.1-585.44 rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)]), [], `%`_resulttype([(nt_1 : numtype <: valtype)]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.35 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:590.1-591.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:593.1-594.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:596.1-597.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.55 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:599.1-600.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:602.1-603.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:605.1-606.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-609.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:611.1-612.51 rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-587.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:614.1-615.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:589.1-590.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:617.1-618.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:592.1-593.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:620.1-621.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:595.1-596.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:623.1-624.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([I32_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:598.1-599.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:626.1-627.50 rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-603.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:629.1-631.29 rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:605.1-606.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:633.1-634.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-610.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:636.1-638.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:612.1-614.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:640.1-642.21 rule vreplace_lane{C : context, sh : shape, i : laneidx}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)]), [], `%`_resulttype([V128_valtype]))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:616.1-617.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:644.1-645.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.57 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:647.1-648.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:622.1-623.64 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:650.1-651.64 rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:625.1-626.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:653.1-654.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype]), [], `%`_resulttype([V128_valtype]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:628.1-629.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:656.1-657.46 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype]), [], `%`_resulttype([V128_valtype]))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:6.1-6.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:634.1-635.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:662.1-663.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:638.1-642.82 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:666.1-670.82 rule seq{C : context, instr_1 : instr, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: `%|-%:%`(C, [instr_1] ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) -- Instr_ok: `%|-%:%`(C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`}), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`}))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:644.1-648.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:672.1-676.33 rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr <- `instr*`}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:651.1-654.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:679.1-682.33 rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`}))) -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) From 952f3fb2a55a34d5329efc0b7c5fcb1bd7365557 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 16 Jul 2026 00:43:58 -0700 Subject: [PATCH 17/24] Spectec for binary format of types and instructions --- document/core/binary/types.rst | 8 ++++++-- document/core/util/macros.def | 3 +++ .../wasm-latest/5.2-binary.types.spectec | 19 ++++++++++++++++--- .../5.3-binary.instructions.spectec | 9 +++++++++ 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/document/core/binary/types.rst b/document/core/binary/types.rst index 4ea3ce6a7..ffcd219a0 100644 --- a/document/core/binary/types.rst +++ b/document/core/binary/types.rst @@ -117,11 +117,15 @@ Composite Types $${grammar: Bmut Bcomptype Bfieldtype Bstoragetype Bpacktype} -.. index:: recursive type, sub type, composite type +.. index:: recursive type, sub type, desctype, composite type pair: binary format; recursive type pair: binary format; sub type + pair: binary format; desctype .. _binary-rectype: .. _binary-subtype: +.. _binary-desctype: +.. _binary-describestype: +.. _binary-descriptortype: Recursive Types ~~~~~~~~~~~~~~~ @@ -129,7 +133,7 @@ Recursive Types :ref:`Recursive types ` are encoded by the byte ${:0x4E} followed by a :ref:`list ` of :ref:`sub types `. Additional shorthands are recognized for unary recursions and sub types without super types. -$${grammar: Brectype Bsubtype} +$${grammar: Brectype Bsubtype Bdesctype Bdescribestype Bdescriptortype} .. index:: limits diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 419cfdf0f..41f8a4bfc 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -843,6 +843,9 @@ .. |Bstoragetype| mathdef:: \xref{binary/types}{binary-storagetype}{\B{storagetype}} .. |Bpacktype| mathdef:: \xref{binary/types}{binary-packtype}{\B{packtype}} .. |Bcomptype| mathdef:: \xref{binary/types}{binary-comptype}{\B{comptype}} +.. |Bdescribestype| mathdef:: \xref{binary/types}{binary-describestype}{\B{describestype}} +.. |Bdescriptortype| mathdef:: \xref{binary/types}{binary-descriptortype}{\B{descriptortype}} +.. |Bdesctype| mathdef:: \xref{binary/types}{binary-desctype}{\B{desctype}} .. |Bsubtype| mathdef:: \xref{binary/types}{binary-subtype}{\B{subtype}} .. |Brectype| mathdef:: \xref{binary/types}{binary-rectype}{\B{rectype}} .. |Bglobaltype| mathdef:: \xref{binary/types}{binary-globaltype}{\B{globaltype}} diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index 55603591a..a2914395c 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -29,6 +29,7 @@ grammar Babsheaptype : heaptype = grammar Bheaptype : heaptype = | ht:Babsheaptype => ht + | 0x62 x:Btypeidx => _HT EXACT (_IDX x) | x33:Bs33 => _HT (_IDX $s33_to_u32(x33)) -- if x33 >= 0 grammar Breftype : reftype = @@ -68,10 +69,22 @@ grammar Bcomptype : comptype = | 0x5F ft*:Blist(Bfieldtype) => STRUCT ft* | 0x60 t_1*:Bresulttype t_2*:Bresulttype => FUNC t_1* -> t_2* +grammar Bdescribestype : describestype = + | 0x4C x:Btypeidx => DESCRIBES (_IDX x) + +grammar Bdescriptortype : descriptortype = + | 0x4D x:Btypeidx => DESCRIPTOR (_IDX x) + +grammar Bdesctype : desctype = + | describestype:Bdescribestype descriptortype:Bdescriptortype ct:Bcomptype => describestype descriptortype ct + | describestype:Bdescribestype ct:Bcomptype => describestype ct + | descriptortype:Bdescriptortype ct:Bcomptype => descriptortype ct + | ct:Bcomptype => ct + grammar Bsubtype : subtype = - | 0x4F x*:Blist(Btypeidx) ct:Bcomptype => SUB FINAL (_IDX x)* ct - | 0x50 x*:Blist(Btypeidx) ct:Bcomptype => SUB (_IDX x)* ct - | ct:Bcomptype => SUB FINAL eps ct + | 0x4F x*:Blist(Btypeidx) desctype:Bdesctype => SUB FINAL (_IDX x)* desctype + | 0x50 x*:Blist(Btypeidx) desctype:Bdesctype => SUB (_IDX x)* desctype + | desctype:Bdesctype => SUB FINAL eps desctype grammar Brectype : rectype = | 0x4E st*:Blist(Bsubtype) => REC st* diff --git a/specification/wasm-latest/5.3-binary.instructions.spectec b/specification/wasm-latest/5.3-binary.instructions.spectec index ac06754ab..4c4b3ddfc 100644 --- a/specification/wasm-latest/5.3-binary.instructions.spectec +++ b/specification/wasm-latest/5.3-binary.instructions.spectec @@ -56,6 +56,10 @@ grammar Binstr/control : instr = ... l:Blabelidx ht_1:Bheaptype ht_2:Bheaptype => BR_ON_CAST l (REF null_1? ht_1) (REF null_2? ht_2) | 0xFB 25:Bu32 (null_1?, null_2?):Bcastop l:Blabelidx ht_1:Bheaptype ht_2:Bheaptype => BR_ON_CAST_FAIL l (REF null_1? ht_1) (REF null_2? ht_2) + | 0xFB 37:Bu32 (null_1?, null_2?):Bcastop + l:Blabelidx ht_1:Bheaptype ht_2:Bheaptype => BR_ON_CAST_DESC_EQ l (REF null_1? ht_1) (REF null_2? ht_2) + | 0xFB 38:Bu32 (null_1?, null_2?):Bcastop + l:Blabelidx ht_1:Bheaptype ht_2:Bheaptype => BR_ON_CAST_DESC_EQ_FAIL l (REF null_1? ht_1) (REF null_2? ht_2) | ... grammar Bcatch : catch = @@ -146,6 +150,9 @@ grammar Binstr/ref : instr = ... | 0xFB 21:Bu32 ht:Bheaptype => REF.TEST (REF NULL ht) | 0xFB 22:Bu32 ht:Bheaptype => REF.CAST (REF ht) | 0xFB 23:Bu32 ht:Bheaptype => REF.CAST (REF NULL ht) + | 0xFB 34:Bu32 x:Btypeidx => REF.GET_DESC x + | 0xFB 35:Bu32 ht:Bheaptype => REF.CAST_DESC_EQ (REF ht) + | 0xFB 36:Bu32 ht:Bheaptype => REF.CAST_DESC_EQ (REF NULL ht) | ... grammar Binstr/struct : instr = ... @@ -155,6 +162,8 @@ grammar Binstr/struct : instr = ... | 0xFB 3:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET S x i | 0xFB 4:Bu32 x:Btypeidx i:Bu32 => STRUCT.GET U x i | 0xFB 5:Bu32 x:Btypeidx i:Bu32 => STRUCT.SET x i + | 0xFB 32:Bu32 x:Btypeidx => STRUCT.NEW_DESC x + | 0xFB 33:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT_DESC x | ... grammar Binstr/array : instr = ... From 29dcc39efa829c2e41ee8eb2d567dfd85e4babe8 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 24 Jul 2026 11:59:54 -0700 Subject: [PATCH 18/24] Update prose and ExpandDesc => Expand_desc --- document/core/valid/conventions.rst | 4 ++-- specification/wasm-latest/2.1-validation.types.spectec | 4 ++-- .../wasm-latest/2.3-validation.instructions.spectec | 8 ++++---- spectec/src/backend-prose/gen.ml | 2 +- spectec/test-frontend/TEST.md | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/document/core/valid/conventions.rst b/document/core/valid/conventions.rst index 8ec31b468..8d009021a 100644 --- a/document/core/valid/conventions.rst +++ b/document/core/valid/conventions.rst @@ -170,9 +170,9 @@ $${rule: Expand {Expand_use/*}} $${relation-ignore: Expand Expand_use} $${definition-ignore: expanddt} -We use the same notation to denote the expansion of a :ref:`defined type ` or :ref:`type use ` to a :ref:`desctype ` as well. +The same notation also denotes the expansion of a :ref:`defined type ` or :ref:`type use ` to a :ref:`desctype `. -$${rule: ExpandDesc} +$${rule: Expand_desc} .. index:: ! instruction type, value type, result type, instruction, local, local index diff --git a/specification/wasm-latest/2.1-validation.types.spectec b/specification/wasm-latest/2.1-validation.types.spectec index 8cf635aa5..a8d40c64e 100644 --- a/specification/wasm-latest/2.1-validation.types.spectec +++ b/specification/wasm-latest/2.1-validation.types.spectec @@ -73,10 +73,10 @@ rule Expand: deftype ~~ comptype -- if $expanddt(deftype) = comptype rule Expand_use/deftype: deftype ~~_C comptype -- Expand: deftype ~~ comptype rule Expand_use/typeidx: _IDX typeidx ~~_C comptype -- Expand: C.TYPES[typeidx] ~~ comptype -relation ExpandDesc: deftype ~~ desctype hint(macro "%expanddt_to_desctype") hint(tabular) +relation Expand_desc: deftype ~~ desctype hint(macro "%expanddt_to_desctype") hint(tabular) hint(prose "The :ref:`expansion ` of %1 is %2") ;; TODO(3, ?): avoid hardcoding reST -rule ExpandDesc: deftype ~~ desctype -- if $expanddt_to_desctype(deftype) = desctype +rule Expand_desc: deftype ~~ desctype -- if $expanddt_to_desctype(deftype) = desctype ;; Type definitions diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 28487693e..ff3dd90b7 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -251,20 +251,20 @@ rule Instr_ok/i31.get: rule Instr_ok/struct.new: C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_HT _IDX x)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* rule Instr_ok/struct.new_default: C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_HT _IDX x)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~~ describestype? eps STRUCT (mut? zt)* -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* rule Instr_ok/struct.new_desc: C |- STRUCT.NEW_DESC x : $unpack(zt)* (REF NULL (_HT EXACT _IDX y)) -> (REF (_HT EXACT _IDX x)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) + -- Expand_desc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) rule Instr_ok/struct.new_default_desc: C |- STRUCT.NEW_DEFAULT_DESC x : (REF NULL (_HT EXACT (_IDX y))) -> (REF (_HT EXACT _IDX x)) - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) + -- Expand_desc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) (STRUCT (mut? zt)*) -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* def $is_packtype(storagetype) : bool hint(show %1 = $unpack(%1)) hint(prose "%1 is a packed type") diff --git a/spectec/src/backend-prose/gen.ml b/spectec/src/backend-prose/gen.ml index 9b966ce22..4c4ffb3a3 100644 --- a/spectec/src/backend-prose/gen.ml +++ b/spectec/src/backend-prose/gen.ml @@ -32,7 +32,7 @@ let flatten_rec def = let is_validation_helper_relation def = match def.it with - | Ast.RelD (id, _, _, _) -> id.it = "Expand" || id.it = "Expand_use" || id.it = "ExpandDesc" + | Ast.RelD (id, _, _, _) -> id.it = "Expand" || id.it = "Expand_use" || id.it = "Expand_desc" | _ -> false (* NOTE: Assume validation relation is `|-` *) let is_validation_relation def = diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 82c65d700..bfb0edfd1 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -3196,7 +3196,7 @@ relation Expand_use: `%~~_%%`(typeuse, context, comptype) -- Expand: `%~~%`(C.TYPES_context[typeidx!`%`_typeidx.0], comptype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec -relation ExpandDesc: `%~~%`(deftype, desctype) +relation Expand_desc: `%~~%`(deftype, desctype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec rule _{deftype : deftype, desctype : desctype}: `%~~%`(deftype, desctype) @@ -3642,23 +3642,23 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-254.68 rule struct.new{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`}), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) - -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + -- Expand_desc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:256.1-259.48 rule struct.new_default{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_instr(x), `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(), _IDX_typeuse(x)))]))) - -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + -- Expand_desc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:261.1-263.88 rule struct.new_desc{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, STRUCT.NEW_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) - -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + -- Expand_desc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:265.1-268.48 rule struct.new_default_desc{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, STRUCT.NEW_DEFAULT_DESC_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(y)))]), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(?(EXACT_exact), _IDX_typeuse(x)))]))) - -- ExpandDesc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) + -- Expand_desc: `%~~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`})))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt)))*{zt <- `zt*`} ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:273.1-277.41 From 6d4b2ad35534e964fc1b3a2f2e142e3a4737a288 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 23 Oct 2026 00:29:50 -0700 Subject: [PATCH 19/24] Fix REFGETDESC macro and $free_instr --- document/core/util/macros.def | 2 +- .../1.3-syntax.instructions.spectec | 1 + spectec/test-frontend/TEST.md | 112 +++++++++--------- 3 files changed, 59 insertions(+), 56 deletions(-) diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 864672e66..bd9be4ea9 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -550,7 +550,7 @@ .. |REFISNULL| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}is\_null}} .. |REFASNONNULL| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}as\_non\_null}} .. |REFEQ| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}eq}} -.. |REFGETDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref.get\_desc}} +.. |REFGETDESC| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}get\_desc}} .. |REFTEST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}test}} .. |REFCAST| mathdef:: \xref{syntax/instructions}{syntax-instr-ref}{\K{ref{.}cast}} diff --git a/specification/wasm-latest/1.3-syntax.instructions.spectec b/specification/wasm-latest/1.3-syntax.instructions.spectec index fe18e58a3..09e10d0ea 100644 --- a/specification/wasm-latest/1.3-syntax.instructions.spectec +++ b/specification/wasm-latest/1.3-syntax.instructions.spectec @@ -512,6 +512,7 @@ def $free_instr(REF.NULL heaptype) = $free_heaptype(heaptype) def $free_instr(REF.IS_NULL) = {} def $free_instr(REF.AS_NON_NULL) = {} def $free_instr(REF.EQ) = {} +def $free_instr(REF.GET_DESC typeidx) = $free_typeidx(typeidx) def $free_instr(REF.TEST reftype) = $free_reftype(reftype) def $free_instr(REF.CAST reftype) = $free_reftype(reftype) def $free_instr(REF.FUNC funcidx) = $free_funcidx(funcidx) diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index b69f22afd..746f1d7a5 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -2751,13 +2751,13 @@ def $free_catch(catch : catch) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-590.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } @@ -2878,110 +2878,112 @@ def $free_instr(instr : instr) : free def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.59 - def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.63 + def $free_instr{typeidx : typeidx}(`REF.GET_DESC`_instr(typeidx)) = $free_typeidx(typeidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.59 - def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.59 + def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.66 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DESC`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.74 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.74 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT_DESC`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-529.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-533.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-535.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-541.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-543.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:544.1-545.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.41 - def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 + def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.63 - def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 - def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-557.63 - def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.64 - def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 - def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 + def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-563.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:564.1-565.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:566.1-566.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:568.1-569.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-570.49 def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:570.1-571.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-572.49 def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:572.1-573.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:573.1-574.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:574.1-575.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-576.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-577.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-578.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:580.1-580.59 - def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 - def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 + def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-584.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-586.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-587.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:425.1-425.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:595.1-596.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) } From d104a86d7063ca3cb19ffc0d14b991c1c2c09c7f Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 23 Oct 2026 00:29:52 -0700 Subject: [PATCH 20/24] Fix descriptor cast validation rules and tests --- document/core/syntax/instructions.rst | 2 +- .../2.3-validation.instructions.spectec | 23 +- spectec/test-frontend/TEST.md | 475 ++++++++++-------- 3 files changed, 272 insertions(+), 228 deletions(-) diff --git a/document/core/syntax/instructions.rst b/document/core/syntax/instructions.rst index 41e518115..7809caece 100644 --- a/document/core/syntax/instructions.rst +++ b/document/core/syntax/instructions.rst @@ -263,7 +263,7 @@ The instruction ${:REF.CAST_DESC_EQ} performs a similar downcast but checks the .. note:: 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. - 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, + Similarly, the ${:BR_ON_CAST} and ${:BR_ON_CAST_FAIL} instructions provide versions of ${:REF.CAST} that branch depending on the success of the downcast instead of trapping, and ${:BR_ON_CAST_DESC_EQ} and ${:BR_ON_CAST_DESC_EQ_FAIL} provide branching versions of ${:REF.CAST_DESC_EQ}. An additional instruction operating on function references is the :ref:`control instruction ` ${:CALL_REF}. diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index c8b135f46..f32d36308 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -116,26 +116,28 @@ rule Instr_ok/br_on_cast_fail: -- Reftype_sub: C |- $diffrt(rt_1, rt_2) <: rt rule Instr_ok/br_on_cast_desc_eq: - C |- BR_ON_CAST_DESC_EQ l rt_1 (REF null? (_HT exact? _IDX x)) : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* ($diffrt(rt_1, (REF null? (_HT exact? _IDX x)))) + C |- BR_ON_CAST_DESC_EQ l rt_1 rt_2 : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* ($diffrt(rt_1, rt_2)) -- if C.LABELS[l] = t* rt - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- if rt_2 = (REF null? (_HT exact? _IDX x)) + -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct -- Reftype_ok: C |- rt_1 : OK -- Reftype_ok: C |- rt_3 : OK ---- -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt_3 - -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt + -- Reftype_sub: C |- rt_2 <: rt_3 + -- Reftype_sub: C |- rt_2 <: rt rule Instr_ok/br_on_cast_desc_eq_fail: - C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 (REF null? (_HT exact? _IDX x)) : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* (REF null? (_HT exact? _IDX x)) + C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 rt_2 : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* rt_2 -- if C.LABELS[l] = t* rt - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- if rt_2 = (REF null? (_HT exact? _IDX x)) + -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct -- Reftype_ok: C |- rt_1 : OK -- Reftype_ok: C |- rt_3 : OK ---- -- Reftype_sub: C |- rt_1 <: rt_3 - -- Reftype_sub: C |- (REF null? (_HT exact? _IDX x)) <: rt_3 - -- Reftype_sub: C |- $diffrt(rt_1, (REF null? (_HT exact? _IDX x))) <: rt + -- Reftype_sub: C |- rt_2 <: rt_3 + -- Reftype_sub: C |- $diffrt(rt_1, rt_2) <: rt ;; Function instructions @@ -269,9 +271,10 @@ rule Instr_ok/ref.cast: -- Reftype_sub: C |- rt <: rt' rule Instr_ok/ref.cast_desc_eq: - C |- REF.CAST_DESC_EQ (REF null? (_HT exact? _IDX x)) : (REF NULL ht) (REF NULL (_HT exact? _IDX y)) -> (REF null? (_HT exact? _IDX x)) + C |- REF.CAST_DESC_EQ rt : (REF NULL ht) (REF NULL (_HT exact? _IDX y)) -> rt + -- if rt = (REF null? (_HT exact? _IDX x)) -- Heaptype_ok: C |- ht : OK - -- ExpandDesc: C.TYPES[x] ~~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct -- Heaptype_sub: C |- (_HT exact? _IDX x) <: ht diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 746f1d7a5..6d755cc68 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -2600,6 +2600,8 @@ syntax instr = | BR_ON_NON_NULL(labelidx) | BR_ON_CAST(labelidx : labelidx, reftype : reftype, reftype : reftype) | BR_ON_CAST_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_DESC_EQ(labelidx : labelidx, reftype : reftype, reftype : reftype) + | BR_ON_CAST_DESC_EQ_FAIL(labelidx : labelidx, reftype : reftype, reftype : reftype) | CALL(funcidx) | CALL_REF(typeuse) | CALL_INDIRECT(tableidx : tableidx, typeuse : typeuse) @@ -2642,6 +2644,7 @@ syntax instr = | `REF.GET_DESC`(typeidx) | `REF.TEST`(reftype) | `REF.CAST`(reftype) + | `REF.CAST_DESC_EQ`(reftype) | `REF.FUNC`(funcidx) | `REF.I31` | `I31.GET`(sx) @@ -2751,239 +2754,245 @@ def $free_catch(catch : catch) : free ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:599.1-599.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:600.1-600.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:601.1-601.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:602.1-602.91 def $shift_labelidxs{labelidx : labelidx, `labelidx'*` : labelidx*}([labelidx] ++ labelidx'*{labelidx' <- `labelidx'*`}) = [`%`_labelidx((((labelidx!`%`_labelidx.0 : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)] ++ $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) } ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:424.1-424.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:427.1-427.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:440.1-440.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:441.1-441.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.86 def $free_instr{`valtype*?` : valtype*?}(SELECT_instr(valtype*{valtype <- `valtype*`}?{`valtype*` <- `valtype*?`})) = $free_opt($free_list($free_valtype(valtype)*{valtype <- `valtype*`})?{`valtype*` <- `valtype*?`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:446.1-447.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.79 def $free_instr{blocktype : blocktype, `instr_1*` : instr*, `instr_2*` : instr*}(`IF%%ELSE%`_instr(blocktype, instr_1*{instr_1 <- `instr_1*`}, instr_2*{instr_2 <- `instr_2*`})) = $free_blocktype(blocktype) +++ $free_block(instr_1*{instr_1 <- `instr_1*`}) +++ $free_block(instr_2*{instr_2 <- `instr_2*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-449.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:450.1-450.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-452.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.69 def $free_instr{`labelidx*` : labelidx*, labelidx' : labelidx}(BR_TABLE_instr(labelidx*{labelidx <- `labelidx*`}, labelidx')) = $free_list($free_labelidx(labelidx)*{labelidx <- `labelidx*`}) +++ $free_labelidx(labelidx') - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-454.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:455.1-456.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-458.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-461.83 def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-460.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-463.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_DESC_EQ_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.83 + def $free_instr{labelidx : labelidx, reftype_1 : reftype, reftype_2 : reftype}(BR_ON_CAST_DESC_EQ_FAIL_instr(labelidx, reftype_1, reftype_2)) = $free_labelidx(labelidx) +++ $free_reftype(reftype_1) +++ $free_reftype(reftype_2) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-463.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-470.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-465.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-472.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:466.1-466.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-468.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-475.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-470.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.53 def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:471.1-471.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.32 def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:472.1-473.99 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-480.99 def $free_instr{blocktype : blocktype, `catch*` : catch*, `instr*` : instr*}(TRY_TABLE_instr(blocktype, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_list($free_catch(catch)*{catch <- `catch*`}) +++ $free_list($free_instr(instr)*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-475.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:476.1-476.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:477.1-477.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.64 def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.62 def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-481.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-488.55 def $free_instr{numtype_1 : numtype, numtype_2 : numtype, cvtop : cvtop__(numtype_2, numtype_1)}(CVTOP_instr(numtype_1, numtype_2, cvtop)) = $free_numtype(numtype_1) +++ $free_numtype(numtype_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:500.1-500.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-501.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:502.1-502.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-503.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-498.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:504.1-505.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextunop : vextunop__(ishape_2, ishape_1)}(VEXTUNOP_instr(ishape_1, ishape_2, vextunop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-500.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-507.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextbinop : vextbinop__(ishape_2, ishape_1)}(VEXTBINOP_instr(ishape_1, ishape_2, vextbinop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:501.1-502.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-509.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, vextternop : vextternop__(ishape_2, ishape_1)}(VEXTTERNOP_instr(ishape_1, ishape_2, vextternop)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:503.1-504.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-511.49 def $free_instr{ishape_1 : ishape, ishape_2 : ishape, sx : sx}(VNARROW_instr(ishape_1, ishape_2, sx)) = $free_shape(ishape_1!`%`_ishape.0) +++ $free_shape(ishape_2!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-506.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-513.47 def $free_instr{shape_1 : shape, shape_2 : shape, vcvtop : vcvtop__(shape_2, shape_1)}(VCVTOP_instr(shape_1, shape_2, vcvtop)) = $free_shape(shape_1) +++ $free_shape(shape_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:507.1-507.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.62 def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.34 def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.38 def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.63 def $free_instr{typeidx : typeidx}(`REF.GET_DESC`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.59 def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.59 def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.67 + def $free_instr{reftype : reftype}(`REF.CAST_DESC_EQ`_instr(reftype)) = $free_reftype(reftype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-529.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.66 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DESC`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.74 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.74 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT_DESC`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-535.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:536.1-536.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-550.55 def $free_instr{typeidx_1 : typeidx, typeidx_2 : typeidx}(`ARRAY.COPY`_instr(typeidx_1, typeidx_2)) = $free_typeidx(typeidx_1) +++ $free_typeidx(typeidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-552.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-554.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.41 def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-557.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.63 def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.63 def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-563.67 def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:564.1-564.67 def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:566.1-566.63 def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:568.1-568.64 def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-569.64 def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:570.1-570.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-572.59 def $free_instr{tableidx_1 : tableidx, tableidx_2 : tableidx}(`TABLE.COPY`_instr(tableidx_1, tableidx_2)) = $free_tableidx(tableidx_1) +++ $free_tableidx(tableidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:573.1-574.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-575.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:569.1-570.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-578.49 def $free_instr{numtype : numtype, `loadop?` : loadop_(numtype)?, memidx : memidx, memarg : memarg}(LOAD_instr(numtype, loadop?{loadop <- `loadop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:571.1-572.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.49 def $free_instr{numtype : numtype, `storeop?` : storeop_(numtype)?, memidx : memidx, memarg : memarg}(STORE_instr(numtype, storeop?{storeop <- `storeop?`}, memidx, memarg)) = $free_numtype(numtype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:573.1-574.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-582.49 def $free_instr{vectype : vectype, `vloadop?` : vloadop_(vectype)?, memidx : memidx, memarg : memarg}(VLOAD_instr(vectype, vloadop?{vloadop <- `vloadop?`}, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:575.1-576.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-584.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VLOAD_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-578.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-586.49 def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-588.49 def $free_instr{vectype : vectype, sz : sz, memidx : memidx, memarg : memarg, laneidx : laneidx}(VSTORE_LANE_instr(vectype, sz, memidx, memarg, laneidx)) = $free_vectype(vectype) +++ $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:589.1-589.59 def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-590.59 def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-593.51 def $free_instr{memidx_1 : memidx, memidx_2 : memidx}(`MEMORY.COPY`_instr(memidx_1, memidx_2)) = $free_memidx(memidx_1) +++ $free_memidx(memidx_2) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-595.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-596.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:425.1-425.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:604.1-605.47 def $free_block{`instr*` : instr*, free : free}(instr*{instr <- `instr*`}) = free[LABELS_free = $shift_labelidxs(free.LABELS_free)] -- if (free = $free_list($free_instr(instr)*{instr <- `instr*`})) } @@ -4051,31 +4060,55 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_3) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:121.1-124.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:118.1-128.34 + rule br_on_cast_desc_eq{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + `%|-%:%`(C, BR_ON_CAST_DESC_EQ_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- if (rt_2 = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:130.1-140.49 + rule br_on_cast_desc_eq_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + `%|-%:%`(C, BR_ON_CAST_DESC_EQ_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) + -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) + -- if (rt_2 = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Reftype_ok: `%|-%:OK`(C, rt_1) + -- Reftype_ok: `%|-%:OK`(C, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) + -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_3) + -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:145.1-148.37 rule call{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*, `exact?` : exact?, dt : deftype}: `%|-%:%`(C, CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- if (C.FUNCS_context[x!`%`_idx.0] = `%%`_exactdeftype(exact?{exact <- `exact?`}, dt)) -- Expand: `%~~%`(dt, `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:126.1-128.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:150.1-152.45 rule call_ref{C : context, x : idx, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x))))],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:130.1-134.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:154.1-158.45 rule call_indirect{C : context, x : idx, y : idx, `t_1*` : valtype*, at : addrtype, `t_2*` : valtype*, lim : limits, rt : reftype}: `%|-%:%`(C, CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) -- Reftype_sub: `%|-%<:%`(C, rt, REF_reftype(?(NULL_null), FUNC_heaptype)) -- Expand: `%~~%`(C.TYPES_context[y!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:136.1-139.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:160.1-163.42 rule return{C : context, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, RETURN_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- if (C.RETURN_context = ?(`%`_resulttype(t*{t <- `t*`},))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:142.1-148.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:166.1-172.42 rule return_call{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `exact?` : exact?, dt : deftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) -- if (C.FUNCS_context[x!`%`_idx.0] = `%%`_exactdeftype(exact?{exact <- `exact?`}, dt)) @@ -4084,7 +4117,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:151.1-156.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:175.1-180.42 rule return_call_ref{C : context, x : idx, `t_3*` : valtype*, `t_1*` : valtype*, `t_4*` : valtype*, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_REF_instr(_IDX_typeuse(x)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x))))],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},))) @@ -4092,7 +4125,7 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:159.1-167.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:183.1-191.42 rule return_call_indirect{C : context, x : idx, y : idx, `t_3*` : valtype*, `t_1*` : valtype*, at : addrtype, `t_4*` : valtype*, lim : limits, rt : reftype, `t_2*` : valtype*, `t'_2*` : valtype*}: `%|-%:%`(C, RETURN_CALL_INDIRECT_instr(x, _IDX_typeuse(y)), `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`} ++ t_1*{t_1 <- `t_1*`} ++ [(at : addrtype <: valtype)],), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) @@ -4102,500 +4135,508 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Resulttype_sub: `%|-%<:%`(C, `%`_resulttype(t_2*{t_2 <- `t_2*`},), `%`_resulttype(t'_2*{t'_2 <- `t'_2*`},)) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_3*{t_3 <- `t_3*`},), [], `%`_resulttype(t_4*{t_4 <- `t_4*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:174.1-177.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:198.1-201.42 rule throw{C : context, x : idx, `t_1*` : valtype*, `t*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_instr(x), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ t*{t <- `t*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Expand: `%~~%`($as_deftype(C.TAGS_context[x!`%`_idx.0]), `FUNC%->%`_comptype(`%`_resulttype(t*{t <- `t*`},), `%`_resulttype([],))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:179.1-181.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:203.1-205.42 rule throw_ref{C : context, `t_1*` : valtype*, `t_2*` : valtype*}: `%|-%:%`(C, THROW_REF_instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`} ++ [REF_valtype(?(NULL_null), EXN_heaptype)],), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Instrtype_ok: `%|-%:OK`(C, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:183.1-187.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:207.1-211.34 rule try_table{C : context, bt : blocktype, `catch*` : catch*, `instr*` : instr*, `t_1*` : valtype*, `t_2*` : valtype*, `x*` : idx*}: `%|-%:%`(C, TRY_TABLE_instr(bt, `%`_list(catch*{catch <- `catch*`},), instr*{instr <- `instr*`}), `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Blocktype_ok: `%|-%:%`(C, bt, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), [], `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Instrs_ok: `%|-%:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [`%`_resulttype(t_2*{t_2 <- `t_2*`},)], RETURN ?(), REFS [], RECS []} +++ C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- (Catch_ok: `%|-%:OK`(C, catch))*{catch <- `catch*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:210.1-212.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:234.1-236.31 rule `ref.null`{C : context, ht : heaptype}: `%|-%:%`(C, `REF.NULL`_instr(ht), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(NULL_null), ht)],))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:214.1-217.20 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:238.1-241.20 rule `ref.func`{C : context, x : idx, edt : exactdeftype}: `%|-%:%`(C, `REF.FUNC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(edt : exactdeftype <: exacttypeuse))],))) -- if (C.FUNCS_context[x!`%`_idx.0] = edt) -- if (x <- C.REFS_context) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:219.1-220.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:243.1-244.34 rule `ref.i31`{C : context}: `%|-%:%`(C, `REF.I31`_instr, `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), I31_heaptype)],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:222.1-224.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:246.1-248.31 rule `ref.is_null`{C : context, ht : heaptype}: `%|-%:%`(C, `REF.IS_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([I32_valtype],))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:226.1-228.31 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:250.1-252.31 rule `ref.as_non_null`{C : context, ht : heaptype}: `%|-%:%`(C, `REF.AS_NON_NULL`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht)],), [], `%`_resulttype([REF_valtype(?(), ht)],))) -- Heaptype_ok: `%|-%:OK`(C, ht) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:230.1-231.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:254.1-255.51 rule `ref.eq`{C : context}: `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:233.1-235.71 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:257.1-259.71 rule `ref.get_desc`{C : context, x : idx, `exact?` : exact?, y : idx, `describestype?` : describestype?, ct : comptype}: `%|-%:%`(C, `REF.GET_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],))) -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:237.1-241.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:261.1-265.33 rule `ref.test`{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, `REF.TEST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([I32_valtype],))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:243.1-247.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-271.33 rule `ref.cast`{C : context, rt : reftype, rt' : reftype}: `%|-%:%`(C, `REF.CAST`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([(rt' : reftype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) -- Reftype_ok: `%|-%:OK`(C, rt) -- Reftype_ok: `%|-%:OK`(C, rt') -- Reftype_sub: `%|-%<:%`(C, rt, rt') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:252.1-253.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:273.1-278.50 + rule `ref.cast_desc_eq`{C : context, rt : reftype, ht : heaptype, `exact?` : exact?, y : idx, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype}: + `%|-%:%`(C, `REF.CAST_DESC_EQ`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype([(rt : reftype <: valtype)],))) + -- if (rt = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) + -- Heaptype_ok: `%|-%:OK`(C, ht) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))), ht) + + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:283.1-284.42 rule `i31.get`{C : context, sx : sx}: `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:258.1-260.68 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:289.1-291.68 rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:262.1-265.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-296.48 rule `struct.new_default`{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:267.1-269.86 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:298.1-300.86 rule `struct.new_desc`{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: `%|-%:%`(C, `STRUCT.NEW_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(y))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:271.1-274.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-305.48 rule `struct.new_default_desc`{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, `STRUCT.NEW_DEFAULT_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(y))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:279.1-283.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:310.1-314.41 rule `struct.get`{C : context, `sx?` : sx?, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*, `mut?` : mut?}: `%|-%:%`(C, `STRUCT.GET`_instr(sx?{sx <- `sx?`}, x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x))))],), [], `%`_resulttype([$unpack(zt)],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(mut?{mut <- `mut?`}, zt)) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:285.1-288.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:316.1-319.24 rule `struct.set`{C : context, x : idx, i : fieldidx, zt : storagetype, `ft*` : fieldtype*}: `%|-%:%`(C, `STRUCT.SET`_instr(x, i), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) $unpack(zt)],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},))) -- if (ft*{ft <- `ft*`}[i!`%`_fieldidx.0] = `%%`_fieldtype(?(MUT_mut), zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:293.1-295.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:324.1-326.43 rule `array.new`{C : context, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, `ARRAY.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([$unpack(zt) I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:297.1-300.45 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:328.1-331.45 rule `array.new_default`{C : context, x : idx, `mut?` : mut?, zt : storagetype}: `%|-%:%`(C, `ARRAY.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- Defaultable: `|-%DEFAULTABLE`($unpack(zt),) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:302.1-304.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-335.43 rule `array.new_fixed`{C : context, x : idx, n : n, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)^n{},), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:306.1-309.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:337.1-340.40 rule `array.new_elem`{C : context, x : idx, y : idx, `mut?` : mut?, rt : reftype}: `%|-%:%`(C, `ARRAY.NEW_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, (rt : reftype <: storagetype)))) -- Reftype_sub: `%|-%<:%`(C, C.ELEMS_context[y!`%`_idx.0], rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-315.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:342.1-346.24 rule `array.new_data`{C : context, x : idx, y : idx, `mut?` : mut?, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `ARRAY.NEW_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([I32_valtype I32_valtype],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:317.1-320.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:348.1-351.41 rule `array.get`{C : context, `sx?` : sx?, x : idx, zt : storagetype, `mut?` : mut?}: `%|-%:%`(C, `ARRAY.GET`_instr(sx?{sx <- `sx?`}, x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) I32_valtype],), [], `%`_resulttype([$unpack(zt)],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt))) -- if ((sx?{sx <- `sx?`} =/= ?()) <=> $is_packtype(zt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:322.1-324.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.42 rule `array.set`{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, `ARRAY.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) I32_valtype $unpack(zt)],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:326.1-327.43 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-358.43 rule `array.len`{C : context}: `%|-%:%`(C, `ARRAY.LEN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ARRAY_heaptype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:329.1-331.42 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:360.1-362.42 rule `array.fill`{C : context, x : idx, zt : storagetype}: `%|-%:%`(C, `ARRAY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) I32_valtype $unpack(zt) I32_valtype],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:333.1-337.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-368.40 rule `array.copy`{C : context, x_1 : idx, x_2 : idx, zt_1 : storagetype, `mut?` : mut?, zt_2 : storagetype}: `%|-%:%`(C, `ARRAY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x_1)))) I32_valtype REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x_2)))) I32_valtype I32_valtype],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x_1!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt_1))) -- Expand: `%~~%`(C.TYPES_context[x_2!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(mut?{mut <- `mut?`}, zt_2))) -- Storagetype_sub: `%|-%<:%`(C, zt_2, zt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:339.1-342.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:370.1-373.44 rule `array.init_elem`{C : context, x : idx, y : idx, zt : storagetype}: `%|-%:%`(C, `ARRAY.INIT_ELEM`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- Storagetype_sub: `%|-%<:%`(C, (C.ELEMS_context[y!`%`_idx.0] : reftype <: storagetype), zt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:344.1-348.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:375.1-379.24 rule `array.init_data`{C : context, x : idx, y : idx, zt : storagetype, numtype : numtype, vectype : vectype}: `%|-%:%`(C, `ARRAY.INIT_DATA`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse(x)))) I32_valtype I32_valtype I32_valtype],), [], `%`_resulttype([],))) -- Expand: `%~~%`(C.TYPES_context[x!`%`_idx.0], ARRAY_comptype(`%%`_fieldtype(?(MUT_mut), zt))) -- if (($unpack(zt) = (numtype : numtype <: valtype)) \/ ($unpack(zt) = (vectype : vectype <: valtype))) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:353.1-355.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:384.1-386.26 rule `extern.convert_any`{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, `EXTERN.CONVERT_ANY`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, ANY_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, EXTERN_heaptype)],))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:357.1-359.26 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:388.1-390.26 rule `any.convert_extern`{C : context, `null_1?` : null?, `null_2?` : null?}: `%|-%:%`(C, `ANY.CONVERT_EXTERN`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(null_1?{null_1 <- `null_1?`}, EXTERN_heaptype)],), [], `%`_resulttype([REF_valtype(null_2?{null_2 <- `null_2?`}, ANY_heaptype)],))) -- if (null_1?{null_1 <- `null_1?`} = null_2?{null_2 <- `null_2?`}) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:364.1-366.28 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:395.1-397.28 rule `local.get`{C : context, x : idx, t : valtype}: `%|-%:%`(C, `LOCAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(SET_init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:368.1-370.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:399.1-401.29 rule `local.set`{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, `LOCAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([],))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:372.1-374.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:403.1-405.29 rule `local.tee`{C : context, x : idx, t : valtype, init : init}: `%|-%:%`(C, `LOCAL.TEE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [x], `%`_resulttype([t],))) -- if (C.LOCALS_context[x!`%`_idx.0] = `%%`_localtype(init, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:379.1-381.30 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-412.30 rule `global.get`{C : context, x : idx, t : valtype, `mut?` : mut?}: `%|-%:%`(C, `GLOBAL.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([t],))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(mut?{mut <- `mut?`}, t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:383.1-385.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:414.1-416.29 rule `global.set`{C : context, x : idx, t : valtype}: `%|-%:%`(C, `GLOBAL.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([t],), [], `%`_resulttype([],))) -- if (C.GLOBALS_context[x!`%`_idx.0] = `%%`_globaltype(?(MUT_mut), t)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:390.1-392.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:421.1-423.32 rule `table.get`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, `TABLE.GET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(rt : reftype <: valtype)],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:394.1-396.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:425.1-427.32 rule `table.set`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, `TABLE.SET`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype)],), [], `%`_resulttype([],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:398.1-400.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:429.1-431.32 rule `table.size`{C : context, x : idx, at : addrtype, lim : limits, rt : reftype}: `%|-%:%`(C, `TABLE.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:402.1-404.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:433.1-435.32 rule `table.grow`{C : context, x : idx, rt : reftype, at : addrtype, lim : limits}: `%|-%:%`(C, `TABLE.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:406.1-408.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 rule `table.fill`{C : context, x : idx, at : addrtype, rt : reftype, lim : limits}: `%|-%:%`(C, `TABLE.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (rt : reftype <: valtype) (at : addrtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:410.1-414.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-445.36 rule `table.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, rt_1 : reftype, lim_2 : limits, rt_2 : reftype}: `%|-%:%`(C, `TABLE.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.TABLES_context[x_1!`%`_idx.0] = `%%%`_tabletype(at_1, lim_1, rt_1)) -- if (C.TABLES_context[x_2!`%`_idx.0] = `%%%`_tabletype(at_2, lim_2, rt_2)) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:416.1-420.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:447.1-451.36 rule `table.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits, rt_1 : reftype, rt_2 : reftype}: `%|-%:%`(C, `TABLE.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) -- if (C.TABLES_context[x!`%`_idx.0] = `%%%`_tabletype(at, lim, rt_1)) -- if (C.ELEMS_context[y!`%`_idx.0] = rt_2) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt_1) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:422.1-424.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:453.1-455.24 rule `elem.drop`{C : context, x : idx, rt : reftype}: `%|-%:%`(C, `ELEM.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) -- if (C.ELEMS_context[x!`%`_idx.0] = rt) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:437.1-439.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:468.1-470.32 rule `memory.size`{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, `MEMORY.SIZE`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(at : addrtype <: valtype)],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:441.1-443.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:472.1-474.32 rule `memory.grow`{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, `MEMORY.GROW`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(at : addrtype <: valtype)],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:445.1-447.32 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:476.1-478.32 rule `memory.fill`{C : context, x : idx, at : addrtype, lim : limits}: `%|-%:%`(C, `MEMORY.FILL`_instr(x), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype (at : addrtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:449.1-452.38 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:480.1-483.38 rule `memory.copy`{C : context, x_1 : idx, x_2 : idx, at_1 : addrtype, at_2 : addrtype, lim_1 : limits, lim_2 : limits}: `%|-%:%`(C, `MEMORY.COPY`_instr(x_1, x_2), `%->_%%`_instrtype(`%`_resulttype([(at_1 : addrtype <: valtype) (at_2 : addrtype <: valtype) ($minat(at_1, at_2) : addrtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x_1!`%`_idx.0] = `%%PAGE`_memtype(at_1, lim_1)) -- if (C.MEMS_context[x_2!`%`_idx.0] = `%%PAGE`_memtype(at_2, lim_2)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:454.1-457.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:485.1-488.24 rule `memory.init`{C : context, x : idx, y : idx, at : addrtype, lim : limits}: `%|-%:%`(C, `MEMORY.INIT`_instr(x, y), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) I32_valtype I32_valtype],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- if (C.DATAS_context[y!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:459.1-461.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:490.1-492.24 rule `data.drop`{C : context, x : idx}: `%|-%:%`(C, `DATA.DROP`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) -- if (C.DATAS_context[x!`%`_idx.0] = OK_datatype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:472.1-475.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:503.1-506.44 rule `load-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:477.1-480.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:508.1-511.36 rule `load-pack`{C : context, Inn : Inn, K : K, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, LOAD_instr((Inn : Inn <: numtype), ?(`%_%`_loadop_(`%`_sz(K,), sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([(Inn : Inn <: valtype)],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, K) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:491.1-494.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:522.1-525.44 rule `store-num`{C : context, nt : numtype, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr(nt, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $size(nt)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:496.1-499.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:527.1-530.36 rule `store-pack`{C : context, Inn : Inn, K : K, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, STORE_instr((Inn : Inn <: numtype), ?(`%`_storeop_(`%`_sz(K,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) (Inn : Inn <: valtype)],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, K) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:501.1-504.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:532.1-535.47 rule `vload-num`{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:506.1-509.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:537.1-540.41 rule `vload-pack`{C : context, N : N, M : M, sx : sx, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(N,), M, sx)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, (N * M!`%`_M.0)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:511.1-514.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:542.1-545.36 rule `vload-splat`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(N,))), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:516.1-519.36 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-550.36 rule `vload-zero`{C : context, N : N, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(N,),)), x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:521.1-525.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:552.1-556.21 rule vload_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VLOAD_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([V128_valtype],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:527.1-530.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:558.1-561.47 rule vstore{C : context, x : idx, memarg : memarg, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_instr(V128_vectype, x, memarg), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, $vsize(V128_vectype)) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:532.1-536.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:563.1-567.21 rule vstore_lane{C : context, N : N, x : idx, memarg : memarg, i : laneidx, at : addrtype, lim : limits}: `%|-%:%`(C, VSTORE_LANE_instr(V128_vectype, `%`_sz(N,), x, memarg, i), `%->_%%`_instrtype(`%`_resulttype([(at : addrtype <: valtype) V128_valtype],), [], `%`_resulttype([],))) -- if (C.MEMS_context[x!`%`_idx.0] = `%%PAGE`_memtype(at, lim)) -- Memarg_ok: `|-%:%->%`(memarg, at, N) -- if ((i!`%`_laneidx.0 : nat <:> rat) < ((128 : nat <:> rat) / (N : nat <:> rat))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:541.1-542.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:572.1-573.33 rule const{C : context, nt : numtype, c_nt : num_(nt)}: `%|-%:%`(C, CONST_instr(nt, c_nt), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([(nt : numtype <: valtype)],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:544.1-545.34 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:575.1-576.34 rule unop{C : context, nt : numtype, unop_nt : unop_(nt)}: `%|-%:%`(C, UNOP_instr(nt, unop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:547.1-548.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:578.1-579.39 rule binop{C : context, nt : numtype, binop_nt : binop_(nt)}: `%|-%:%`(C, BINOP_instr(nt, binop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([(nt : numtype <: valtype)],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:550.1-551.39 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:581.1-582.39 rule testop{C : context, nt : numtype, testop_nt : testop_(nt)}: `%|-%:%`(C, TESTOP_instr(nt, testop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:553.1-554.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:584.1-585.40 rule relop{C : context, nt : numtype, relop_nt : relop_(nt)}: `%|-%:%`(C, RELOP_instr(nt, relop_nt), `%->_%%`_instrtype(`%`_resulttype([(nt : numtype <: valtype) (nt : numtype <: valtype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:556.1-557.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:587.1-588.44 rule cvtop{C : context, nt_1 : numtype, nt_2 : numtype, cvtop : cvtop__(nt_2, nt_1)}: `%|-%:%`(C, CVTOP_instr(nt_1, nt_2, cvtop), `%->_%%`_instrtype(`%`_resulttype([(nt_2 : numtype <: valtype)],), [], `%`_resulttype([(nt_1 : numtype <: valtype)],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:562.1-563.35 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:593.1-594.35 rule vconst{C : context, c : vec_(V128_Vnn)}: `%|-%:%`(C, VCONST_instr(V128_vectype, c), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:565.1-566.41 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:596.1-597.41 rule vvunop{C : context, vvunop : vvunop}: `%|-%:%`(C, VVUNOP_instr(V128_vectype, vvunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:568.1-569.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:599.1-600.48 rule vvbinop{C : context, vvbinop : vvbinop}: `%|-%:%`(C, VVBINOP_instr(V128_vectype, vvbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:571.1-572.55 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:602.1-603.55 rule vvternop{C : context, vvternop : vvternop}: `%|-%:%`(C, VVTERNOP_instr(V128_vectype, vvternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:574.1-575.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:605.1-606.44 rule vvtestop{C : context, vvtestop : vvtestop}: `%|-%:%`(C, VVTESTOP_instr(V128_vectype, vvtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:577.1-578.37 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-609.37 rule vunop{C : context, sh : shape, vunop : vunop_(sh)}: `%|-%:%`(C, VUNOP_instr(sh, vunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:580.1-581.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:611.1-612.44 rule vbinop{C : context, sh : shape, vbinop : vbinop_(sh)}: `%|-%:%`(C, VBINOP_instr(sh, vbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:583.1-584.51 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:614.1-615.51 rule vternop{C : context, sh : shape, vternop : vternop_(sh)}: `%|-%:%`(C, VTERNOP_instr(sh, vternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:586.1-587.40 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:617.1-618.40 rule vtestop{C : context, sh : shape, vtestop : vtestop_(sh)}: `%|-%:%`(C, VTESTOP_instr(sh, vtestop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:589.1-590.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:620.1-621.44 rule vrelop{C : context, sh : shape, vrelop : vrelop_(sh)}: `%|-%:%`(C, VRELOP_instr(sh, vrelop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:592.1-593.47 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:623.1-624.47 rule vshiftop{C : context, sh : ishape, vshiftop : vshiftop_(sh)}: `%|-%:%`(C, VSHIFTOP_instr(sh, vshiftop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype I32_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:595.1-596.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:626.1-627.33 rule vbitmask{C : context, sh : ishape}: `%|-%:%`(C, VBITMASK_instr(sh), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:598.1-599.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:629.1-630.50 rule vswizzlop{C : context, sh : bshape, vswizzlop : vswizzlop_(sh)}: `%|-%:%`(C, VSWIZZLOP_instr(sh, vswizzlop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:601.1-603.29 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:632.1-634.29 rule vshuffle{C : context, sh : bshape, `i*` : laneidx*}: `%|-%:%`(C, VSHUFFLE_instr(sh, i*{i <- `i*`}), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) -- (if (i!`%`_laneidx.0 < (2 * $dim(sh!`%`_bshape.0)!`%`_dim.0)))*{i <- `i*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:605.1-606.44 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:636.1-637.44 rule vsplat{C : context, sh : shape}: `%|-%:%`(C, VSPLAT_instr(sh), `%->_%%`_instrtype(`%`_resulttype([($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:608.1-610.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:639.1-641.21 rule vextract_lane{C : context, sh : shape, `sx?` : sx?, i : laneidx}: `%|-%:%`(C, VEXTRACT_LANE_instr(sh, sx?{sx <- `sx?`}, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([($unpackshape(sh) : numtype <: valtype)],))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:612.1-614.21 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:643.1-645.21 rule vreplace_lane{C : context, sh : shape, i : laneidx}: `%|-%:%`(C, VREPLACE_LANE_instr(sh, i), `%->_%%`_instrtype(`%`_resulttype([V128_valtype ($unpackshape(sh) : numtype <: valtype)],), [], `%`_resulttype([V128_valtype],))) -- if (i!`%`_laneidx.0 < $dim(sh)!`%`_dim.0) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:616.1-617.50 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:647.1-648.50 rule vextunop{C : context, sh_1 : ishape, sh_2 : ishape, vextunop : vextunop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTUNOP_instr(sh_1, sh_2, vextunop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:619.1-620.57 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:650.1-651.57 rule vextbinop{C : context, sh_1 : ishape, sh_2 : ishape, vextbinop : vextbinop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTBINOP_instr(sh_1, sh_2, vextbinop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:622.1-623.64 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:653.1-654.64 rule vextternop{C : context, sh_1 : ishape, sh_2 : ishape, vextternop : vextternop__(sh_2, sh_1)}: `%|-%:%`(C, VEXTTERNOP_instr(sh_1, sh_2, vextternop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:625.1-626.48 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:656.1-657.48 rule vnarrow{C : context, sh_1 : ishape, sh_2 : ishape, sx : sx}: `%|-%:%`(C, VNARROW_instr(sh_1, sh_2, sx), `%->_%%`_instrtype(`%`_resulttype([V128_valtype V128_valtype],), [], `%`_resulttype([V128_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:628.1-629.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:659.1-660.46 rule vcvtop{C : context, sh_1 : shape, sh_2 : shape, vcvtop : vcvtop__(sh_2, sh_1)}: `%|-%:%`(C, VCVTOP_instr(sh_1, sh_2, vcvtop), `%->_%%`_instrtype(`%`_resulttype([V128_valtype],), [], `%`_resulttype([V128_valtype],))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:6.1-6.96 relation Instrs_ok: `%|-%:%`(context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:634.1-635.24 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:665.1-666.24 rule empty{C : context}: `%|-%:%`(C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:637.1-639.46 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:668.1-670.46 rule instr{C : context, instr : instr, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, [instr], `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- Instr_ok: `%|-%:%`(C, instr, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:642.1-646.82 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:673.1-677.82 rule seq{C : context, `instr_1*` : instr*, `instr_2*` : instr*, `t_1*` : valtype*, `x_1*` : idx*, `x_2*` : idx*, `t_3*` : valtype*, `t_2*` : valtype*, `init*` : init*, `t*` : valtype*}: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`} ++ instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`} ++ x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) -- Instrs_ok: `%|-%:%`(C, instr_1*{instr_1 <- `instr_1*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) -- (if (C.LOCALS_context[x_1!`%`_idx.0] = `%%`_localtype(init, t)))*{init <- `init*`, t <- `t*`, x_1 <- `x_1*`} -- Instrs_ok: `%|-%:%`($with_locals(C, x_1*{x_1 <- `x_1*`}, `%%`_localtype(SET_init, t)*{t <- `t*`}), instr_2*{instr_2 <- `instr_2*`}, `%->_%%`_instrtype(`%`_resulttype(t_2*{t_2 <- `t_2*`},), x_2*{x_2 <- `x_2*`}, `%`_resulttype(t_3*{t_3 <- `t_3*`},))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:648.1-652.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:679.1-683.33 rule sub{C : context, `instr*` : instr*, it' : instrtype, it : instrtype}: `%|-%:%`(C, instr*{instr <- `instr*`}, it') -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, it) -- Instrtype_sub: `%|-%<:%`(C, it, it') -- Instrtype_ok: `%|-%:OK`(C, it') - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:655.1-658.33 + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:686.1-689.33 rule frame{C : context, `instr*` : instr*, `t*` : valtype*, `t_1*` : valtype*, `x*` : idx*, `t_2*` : valtype*}: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t*{t <- `t*`} ++ t_2*{t_2 <- `t_2*`},))) -- Instrs_ok: `%|-%:%`(C, instr*{instr <- `instr*`}, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), x*{x <- `x*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`},))) From a3ef7144666b86ca54e83985775aabe7386f5ee2 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 23 Oct 2026 15:34:42 -0700 Subject: [PATCH 21/24] [spec] Binary format review fixes --- document/core/appendix/index-instructions.py | 10 +- document/core/appendix/index-types.rst | 11 +- document/core/binary/instructions.rst | 6 + document/core/binary/types.rst | 7 +- .../wasm-latest/5.2-binary.types.spectec | 12 +- .../5.3-binary.instructions.spectec | 4 +- spectec/test-frontend/TEST.md | 989 +++++++++--------- 7 files changed, 547 insertions(+), 492 deletions(-) diff --git a/document/core/appendix/index-instructions.py b/document/core/appendix/index-instructions.py index 0b0c126fb..37051582c 100755 --- a/document/core/appendix/index-instructions.py +++ b/document/core/appendix/index-instructions.py @@ -359,7 +359,15 @@ def Instruction(version, name, opcode, type=None, validation=None, execution=Non Instruction(3.0, r'\REFI31', r'\hex{FB}~\hex{1C}', r'[\I32] \to [(\REF~\I31)]', r'valid-ref.i31', r'exec-ref.i31'), Instruction(3.0, r'\I31GETS', r'\hex{FB}~\hex{1D}', r'[\I31REF] \to [\I32]', r'valid-i31.get', r'exec-i31.get'), Instruction(3.0, r'\I31GETU', r'\hex{FB}~\hex{1E}', r'[\I31REF] \to [\I32]', r'valid-i31.get', r'exec-i31.get'), - Instruction(0.0, None, r'\hex{FB}~\hex{1F} \dots'), + Instruction(0.0, None, r'\hex{FB}~\hex{1F}'), + Instruction(3.0, r'\STRUCTNEWDESC~x', r'\hex{FB}~\hex{20}', r'[t^\ast~(\REF~\NULL~(\EXACT~y))] \to [(\REF~(\EXACT~x))]', r'valid-struct.new_desc'), + Instruction(3.0, r'\STRUCTNEWDEFAULTDESC~x', r'\hex{FB}~\hex{21}', r'[(\REF~\NULL~(\EXACT~y))] \to [(\REF~(\EXACT~x))]', r'valid-struct.new_default_desc'), + Instruction(3.0, r'\REFGETDESC~x', r'\hex{FB}~\hex{22}', r'[(\REF~\NULL~\EXACT^?~x)] \to [(\REF~\EXACT^?~y)]', r'valid-ref.get_desc'), + Instruction(3.0, r'\REFCASTDESCEQ~(\REF~t)', r'\hex{FB}~\hex{23}', r"[(\REF~t')~(\REF~\NULL~(\EXACT~y))] \to [(\REF~t)]", r'valid-ref.cast_desc_eq'), + Instruction(3.0, r'\REFCASTDESCEQ~(\REF~\NULL~t)', r'\hex{FB}~\hex{24}', r"[(\REF~\NULL~t')~(\REF~\NULL~(\EXACT~y))] \to [(\REF~\NULL~t)]", r'valid-ref.cast_desc_eq'), + Instruction(3.0, r'\BRONCASTDESCEQ~t_1~t_2', r'\hex{FB}~\hex{25}', r'[t_1~(\REF~\NULL~(\EXACT~y))] \to [t_1\reftypediff t_2]', r'valid-br_on_cast_desc_eq'), + Instruction(3.0, r'\BRONCASTDESCEQFAIL~t_1~t_2', r'\hex{FB}~\hex{26}', r'[t_1~(\REF~\NULL~(\EXACT~y))] \to [t_2]', r'valid-br_on_cast_desc_eq_fail'), + Instruction(0.0, None, r'\hex{FB}~\hex{27} \dots'), Instruction(2.0, r'\I32.\TRUNC\K{\_sat\_}\F32\K{\_s}', r'\hex{FC}~\hex{00}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), Instruction(2.0, r'\I32.\TRUNC\K{\_sat\_}\F32\K{\_u}', r'\hex{FC}~\hex{01}', r'[\F32] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), Instruction(2.0, r'\I32.\TRUNC\K{\_sat\_}\F64\K{\_s}', r'\hex{FC}~\hex{02}', r'[\F64] \to [\I32]', r'valid-cvtop', r'exec-cvtop', r'op-trunc_sat'), diff --git a/document/core/appendix/index-types.rst b/document/core/appendix/index-types.rst index 5542d5b37..0d9a08e3f 100644 --- a/document/core/appendix/index-types.rst +++ b/document/core/appendix/index-types.rst @@ -32,15 +32,18 @@ Category Constructor (reserved) :math:`\hex{68}` .. :math:`\hex{65}` :ref:`Reference type ` |REF| :math:`\hex{64}` (-28 as |Bs7|) :ref:`Reference type ` |REF| |NULL| :math:`\hex{63}` (-29 as |Bs7|) -(reserved) :math:`\hex{62}` .. :math:`\hex{61}` +:ref:`Heap type ` :math:`\EXACT~\typeidx` :math:`\hex{62}` (-30 as |Bs7|) +(reserved) :math:`\hex{61}` :ref:`Composite type ` :math:`\TFUNC~[\valtype^\ast] \Tarrow[\valtype^\ast]` :math:`\hex{60}` (-32 as |Bs7|) :ref:`Composite type ` :math:`\TSTRUCT~\fieldtype^\ast` :math:`\hex{5F}` (-33 as |Bs7|) :ref:`Composite type ` :math:`\TARRAY~\fieldtype` :math:`\hex{5E}` (-34 as |Bs7|) (reserved) :math:`\hex{5D}` .. :math:`\hex{51}` -:ref:`Sub type ` :math:`\TSUB~\typeidx^\ast~\comptype` :math:`\hex{50}` (-48 as |Bs7|) -:ref:`Sub type ` :math:`\TSUB~\TFINAL~\typeidx^\ast~\comptype` :math:`\hex{4F}` (-49 as |Bs7|) +:ref:`Sub type ` :math:`\TSUB~\typeidx^\ast~\desctype` :math:`\hex{50}` (-48 as |Bs7|) +:ref:`Sub type ` :math:`\TSUB~\TFINAL~\typeidx^\ast~\desctype` :math:`\hex{4F}` (-49 as |Bs7|) :ref:`Recursive type ` :math:`\TREC~\subtype^\ast` :math:`\hex{4E}` (-50 as |Bs7|) -(reserved) :math:`\hex{4D}` .. :math:`\hex{41}` +:ref:`Descriptor type ` :math:`\TDESCRIPTOR~\typeidx` :math:`\hex{4D}` (-51 as |Bs7|) +:ref:`Descriptor type ` :math:`\TDESCRIBES~\typeidx` :math:`\hex{4C}` (-52 as |Bs7|) +(reserved) :math:`\hex{4B}` .. :math:`\hex{41}` :ref:`Result type ` :math:`[\epsilon]` :math:`\hex{40}` (-64 as |Bs7|) :ref:`Tag type ` :math:`\typeuse` (none) :ref:`Global type ` :math:`\mut~\valtype` (none) diff --git a/document/core/binary/instructions.rst b/document/core/binary/instructions.rst index ec222f641..d96d2dc40 100644 --- a/document/core/binary/instructions.rst +++ b/document/core/binary/instructions.rst @@ -58,6 +58,8 @@ Control Instructions .. _binary-br_on_non_null: .. _binary-br_on_cast: .. _binary-br_on_cast_fail: +.. _binary-br_on_cast_desc_eq: +.. _binary-br_on_cast_desc_eq_fail: .. _binary-return: .. _binary-call: .. _binary-call_ref: @@ -158,6 +160,8 @@ Generic :ref:`reference instructions ` are represented by sing .. _binary-ref.as_non_null: .. _binary-ref.test: .. _binary-ref.cast: +.. _binary-ref.get_desc: +.. _binary-ref.cast_desc_eq: $${grammar: {Binstr/ref}} @@ -176,6 +180,8 @@ Aggregate Instructions .. _binary-i31.get_u: .. _binary-struct.new: .. _binary-struct.new_default: +.. _binary-struct.new_desc: +.. _binary-struct.new_default_desc: .. _binary-struct.get: .. _binary-struct.get_s: .. _binary-struct.get_u: diff --git a/document/core/binary/types.rst b/document/core/binary/types.rst index 77efa2c3c..726b13681 100644 --- a/document/core/binary/types.rst +++ b/document/core/binary/types.rst @@ -41,7 +41,7 @@ $${grammar: Bvectype} Heap Types ~~~~~~~~~~ -:ref:`Heap types ` are encoded as either a single byte, or as a :ref:`type index ` encoded as a positive :ref:`signed integer `. +:ref:`Heap types ` are encoded as either a single byte, as the byte ${:0x62} followed by a :ref:`type index `, or as a :ref:`type index ` encoded as a positive :ref:`signed integer `. $${grammar: Babsheaptype Bheaptype} @@ -118,10 +118,10 @@ Composite Types $${grammar: Bmut Bcomptype Bfieldtype Bstoragetype Bpacktype} -.. index:: recursive type, sub type, desctype, composite type +.. index:: recursive type, sub type, descriptor type, composite type pair: binary format; recursive type pair: binary format; sub type - pair: binary format; desctype + pair: binary format; descriptor type .. _binary-rectype: .. _binary-subtype: .. _binary-desctype: @@ -133,6 +133,7 @@ Recursive Types :ref:`Recursive types ` are encoded by the byte ${:0x4E} followed by a :ref:`list ` of :ref:`sub types `. Additional shorthands are recognized for unary recursions and sub types without super types. +Each :ref:`composite type ` may be preceded by a :ref:`describes ` clause encoded by the byte ${:0x4C} and a :ref:`type index `, and a :ref:`descriptor ` clause encoded by the byte ${:0x4D} and a :ref:`type index `. $${grammar: Brectype Bsubtype Bdesctype Bdescribestype Bdescriptortype} diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index 4df116853..64dcea6af 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -76,15 +76,15 @@ grammar Bdescriptortype : descriptortype = | 0x4D x:Btypeidx => DESCRIPTOR (_IDX x) grammar Bdesctype : desctype = - | describestype:Bdescribestype descriptortype:Bdescriptortype ct:Bcomptype => describestype descriptortype ct - | describestype:Bdescribestype ct:Bcomptype => describestype ct - | descriptortype:Bdescriptortype ct:Bcomptype => descriptortype ct + | d_1:Bdescribestype d_2:Bdescriptortype ct:Bcomptype => d_1 d_2 ct + | d_1:Bdescribestype ct:Bcomptype => d_1 ct + | d_2:Bdescriptortype ct:Bcomptype => d_2 ct | ct:Bcomptype => ct grammar Bsubtype : subtype = - | 0x4F x*:Blist(Btypeidx) desctype:Bdesctype => SUB FINAL (_IDX x)* desctype - | 0x50 x*:Blist(Btypeidx) desctype:Bdesctype => SUB (_IDX x)* desctype - | desctype:Bdesctype => SUB FINAL eps desctype + | 0x4F x*:Blist(Btypeidx) d:Bdesctype => SUB FINAL (_IDX x)* d + | 0x50 x*:Blist(Btypeidx) d:Bdesctype => SUB (_IDX x)* d + | d:Bdesctype => SUB FINAL eps d grammar Brectype : rectype = | 0x4E st*:Blist(Bsubtype) => REC st* diff --git a/specification/wasm-latest/5.3-binary.instructions.spectec b/specification/wasm-latest/5.3-binary.instructions.spectec index 936be5ca1..b2646c7e8 100644 --- a/specification/wasm-latest/5.3-binary.instructions.spectec +++ b/specification/wasm-latest/5.3-binary.instructions.spectec @@ -158,12 +158,12 @@ grammar Binstr/ref : instr = ... grammar Binstr/struct : instr = ... | 0xFB 0:Bu32 x:Btypeidx => STRUCT.NEW x | 0xFB 1:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT x + | 0xFB 32:Bu32 x:Btypeidx => STRUCT.NEW_DESC x + | 0xFB 33:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT_DESC x | 0xFB 2:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET x i | 0xFB 3:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET S x i | 0xFB 4:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.GET U x i | 0xFB 5:Bu32 x:Btypeidx i:Bfieldidx => STRUCT.SET x i - | 0xFB 32:Bu32 x:Btypeidx => STRUCT.NEW_DESC x - | 0xFB 33:Bu32 x:Btypeidx => STRUCT.NEW_DEFAULT_DESC x | ... grammar Binstr/array : instr = ... diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index bd76d4a58..9f64a4a49 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -9083,6 +9083,8 @@ grammar Bheaptype : heaptype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{ht : heaptype} ht:Babsheaptype => ht ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{x : idx} {{0x62} {x:Btypeidx}} => _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{x33 : s33} x33:Bs33 => _HT_heaptype(`%%`_exacttypeuse(?(), _IDX_typeuse($s33_to_u32(x33)))) -- if (x33!`%`_s33.0 >= (0 : nat <:> int)) @@ -9144,14 +9146,35 @@ grammar Bcomptype : comptype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) +;; ../../../../specification/wasm-latest/5.2-binary.types.spectec +grammar Bdescribestype : describestype + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{x : idx} {{0x4C} {x:Btypeidx}} => DESCRIBES_describestype(_IDX_typeuse(x)) + +;; ../../../../specification/wasm-latest/5.2-binary.types.spectec +grammar Bdescriptortype : descriptortype + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{x : idx} {{0x4D} {x:Btypeidx}} => DESCRIPTOR_descriptortype(_IDX_typeuse(x)) + +;; ../../../../specification/wasm-latest/5.2-binary.types.spectec +grammar Bdesctype : desctype + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{d_1 : describestype, d_2 : descriptortype, ct : comptype} {{d_1:Bdescribestype} {d_2:Bdescriptortype} {ct:Bcomptype}} => `%%%`_desctype(?(d_1), ?(d_2), ct) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{d_1 : describestype, ct : comptype} {{d_1:Bdescribestype} {ct:Bcomptype}} => `%%%`_desctype(?(d_1), ?(), ct) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{d_2 : descriptortype, ct : comptype} {{d_2:Bdescriptortype} {ct:Bcomptype}} => `%%%`_desctype(?(), ?(d_2), ct) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec + prod{ct : comptype} ct:Bcomptype => `%%%`_desctype(?(), ?(), ct) + ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Bsubtype : subtype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{`x*` : idx*, ct : comptype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, `%%%`_desctype(?(), ?(), ct)) + prod{`x*` : idx*, d : desctype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {d:Bdesctype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, d) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{`x*` : idx*, ct : comptype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {ct:Bcomptype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, `%%%`_desctype(?(), ?(), ct)) + prod{`x*` : idx*, d : desctype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {d:Bdesctype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, d) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{ct : comptype} ct:Bcomptype => SUB_subtype(?(FINAL_final), [], `%%%`_desctype(?(), ?(), ct)) + prod{d : desctype} d:Bdesctype => SUB_subtype(?(FINAL_final), [], d) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Brectype : rectype @@ -9255,7 +9278,7 @@ grammar Blaneidx : laneidx ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec rec { -;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:793.1-807.71 +;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:802.1-816.71 grammar Binstr : instr ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:8.5-8.24 prod 0x00 => UNREACHABLE_instr @@ -9309,949 +9332,963 @@ grammar Binstr : instr prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(24,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:57.5-58.105 prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(25,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:71.5-71.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:59.5-60.108 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(37,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_DESC_EQ_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:61.5-62.113 + prod{l : labelidx, `null_1?` : null?, ht_1 : heaptype, `null_2?` : null?, ht_2 : heaptype} {{0xFB} {`%`_u32(38,):Bu32} {(null_1?{null_1 <- `null_1?`}, null_2?{null_2 <- `null_2?`}):Bcastop} {l:Blabelidx} {ht_1:Bheaptype} {ht_2:Bheaptype}} => BR_ON_CAST_DESC_EQ_FAIL_instr(l, REF_reftype(null_1?{null_1 <- `null_1?`}, ht_1), REF_reftype(null_2?{null_2 <- `null_2?`}, ht_2)) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:75.5-75.36 prod{x : idx} {{0x20} {x:Blocalidx}} => `LOCAL.GET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:72.5-72.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:76.5-76.36 prod{x : idx} {{0x21} {x:Blocalidx}} => `LOCAL.SET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:73.5-73.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:77.5-77.36 prod{x : idx} {{0x22} {x:Blocalidx}} => `LOCAL.TEE`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:77.5-77.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:81.5-81.38 prod{x : idx} {{0x23} {x:Bglobalidx}} => `GLOBAL.GET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:78.5-78.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:82.5-82.38 prod{x : idx} {{0x24} {x:Bglobalidx}} => `GLOBAL.SET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:85.5-85.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:89.5-89.36 prod{x : idx} {{0x25} {x:Btableidx}} => `TABLE.GET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:86.5-86.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:90.5-90.36 prod{x : idx} {{0x26} {x:Btableidx}} => `TABLE.SET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:87.5-87.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:91.5-91.58 prod{x : idx, y : idx} {{0xFC} {`%`_u32(12,):Bu32} {y:Belemidx} {x:Btableidx}} => `TABLE.INIT`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:88.5-88.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:92.5-92.43 prod{x : idx} {{0xFC} {`%`_u32(13,):Bu32} {x:Belemidx}} => `ELEM.DROP`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:89.5-89.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:93.5-93.67 prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(14,):Bu32} {x_1:Btableidx} {x_2:Btableidx}} => `TABLE.COPY`_instr(x_1, x_2) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:90.5-90.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:94.5-94.45 prod{x : idx} {{0xFC} {`%`_u32(15,):Bu32} {x:Btableidx}} => `TABLE.GROW`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:91.5-91.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:95.5-95.45 prod{x : idx} {{0xFC} {`%`_u32(16,):Bu32} {x:Btableidx}} => `TABLE.SIZE`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:92.5-92.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:96.5-96.45 prod{x : idx} {{0xFC} {`%`_u32(17,):Bu32} {x:Btableidx}} => `TABLE.FILL`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:105.5-105.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:109.5-109.41 prod{x : idx, ao : memarg} {{0x28} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:106.5-106.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:110.5-110.41 prod{x : idx, ao : memarg} {{0x29} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:107.5-107.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:111.5-111.41 prod{x : idx, ao : memarg} {{0x2A} {(x, ao):Bmemarg}} => LOAD_instr(F32_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:108.5-108.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:112.5-112.41 prod{x : idx, ao : memarg} {{0x2B} {(x, ao):Bmemarg}} => LOAD_instr(F64_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:109.5-109.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:113.5-113.50 prod{x : idx, ao : memarg} {{0x2C} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:110.5-110.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:114.5-114.50 prod{x : idx, ao : memarg} {{0x2D} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:111.5-111.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:115.5-115.51 prod{x : idx, ao : memarg} {{0x2E} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:112.5-112.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:116.5-116.51 prod{x : idx, ao : memarg} {{0x2F} {(x, ao):Bmemarg}} => LOAD_instr(I32_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:113.5-113.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:117.5-117.50 prod{x : idx, ao : memarg} {{0x30} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:114.5-114.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:118.5-118.50 prod{x : idx, ao : memarg} {{0x31} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(8,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:115.5-115.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:119.5-119.51 prod{x : idx, ao : memarg} {{0x32} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:116.5-116.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:120.5-120.51 prod{x : idx, ao : memarg} {{0x33} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(16,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:117.5-117.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:121.5-121.51 prod{x : idx, ao : memarg} {{0x34} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:118.5-118.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:122.5-122.51 prod{x : idx, ao : memarg} {{0x35} {(x, ao):Bmemarg}} => LOAD_instr(I64_numtype, ?(`%_%`_loadop_(`%`_sz(32,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:119.5-119.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:123.5-123.42 prod{x : idx, ao : memarg} {{0x36} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:120.5-120.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:124.5-124.42 prod{x : idx, ao : memarg} {{0x37} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:121.5-121.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:125.5-125.42 prod{x : idx, ao : memarg} {{0x38} {(x, ao):Bmemarg}} => STORE_instr(F32_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:122.5-122.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:126.5-126.42 prod{x : idx, ao : memarg} {{0x39} {(x, ao):Bmemarg}} => STORE_instr(F64_numtype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:123.5-123.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:127.5-127.45 prod{x : idx, ao : memarg} {{0x3A} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:124.5-124.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:128.5-128.46 prod{x : idx, ao : memarg} {{0x3B} {(x, ao):Bmemarg}} => STORE_instr(I32_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:125.5-125.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:129.5-129.45 prod{x : idx, ao : memarg} {{0x3C} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(8,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:126.5-126.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:130.5-130.46 prod{x : idx, ao : memarg} {{0x3D} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(16,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:127.5-127.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:131.5-131.46 prod{x : idx, ao : memarg} {{0x3E} {(x, ao):Bmemarg}} => STORE_instr(I64_numtype, ?(`%`_storeop_(`%`_sz(32,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:128.5-128.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:132.5-132.36 prod{x : idx} {{0x3F} {x:Bmemidx}} => `MEMORY.SIZE`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:129.5-129.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:133.5-133.36 prod{x : idx} {{0x40} {x:Bmemidx}} => `MEMORY.GROW`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:130.5-130.56 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:134.5-134.56 prod{x : idx, y : idx} {{0xFC} {`%`_u32(8,):Bu32} {y:Bdataidx} {x:Bmemidx}} => `MEMORY.INIT`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:131.5-131.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:135.5-135.42 prod{x : idx} {{0xFC} {`%`_u32(9,):Bu32} {x:Bdataidx}} => `DATA.DROP`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:132.5-132.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:136.5-136.64 prod{x_1 : idx, x_2 : idx} {{0xFC} {`%`_u32(10,):Bu32} {x_1:Bmemidx} {x_2:Bmemidx}} => `MEMORY.COPY`_instr(x_1, x_2) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:133.5-133.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:137.5-137.44 prod{x : idx} {{0xFC} {`%`_u32(11,):Bu32} {x:Bmemidx}} => `MEMORY.FILL`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:140.5-140.37 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:144.5-144.37 prod{ht : heaptype} {{0xD0} {ht:Bheaptype}} => `REF.NULL`_instr(ht) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:141.5-141.24 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:145.5-145.24 prod 0xD1 => `REF.IS_NULL`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:142.5-142.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:146.5-146.34 prod{x : idx} {{0xD2} {x:Bfuncidx}} => `REF.FUNC`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:143.5-143.19 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:147.5-147.19 prod 0xD3 => `REF.EQ`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:144.5-144.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:148.5-148.28 prod 0xD4 => `REF.AS_NON_NULL`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:145.5-145.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:149.5-149.51 prod{ht : heaptype} {{0xFB} {`%`_u32(20,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(), ht)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:146.5-146.56 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:150.5-150.56 prod{ht : heaptype} {{0xFB} {`%`_u32(21,):Bu32} {ht:Bheaptype}} => `REF.TEST`_instr(REF_reftype(?(NULL_null), ht)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:147.5-147.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:151.5-151.51 prod{ht : heaptype} {{0xFB} {`%`_u32(22,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(), ht)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:148.5-148.56 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:152.5-152.56 prod{ht : heaptype} {{0xFB} {`%`_u32(23,):Bu32} {ht:Bheaptype}} => `REF.CAST`_instr(REF_reftype(?(NULL_null), ht)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:152.5-152.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:153.5-153.46 + prod{x : idx} {{0xFB} {`%`_u32(34,):Bu32} {x:Btypeidx}} => `REF.GET_DESC`_instr(x) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:154.5-154.59 + prod{ht : heaptype} {{0xFB} {`%`_u32(35,):Bu32} {ht:Bheaptype}} => `REF.CAST_DESC_EQ`_instr(REF_reftype(?(), ht)) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:155.5-155.64 + prod{ht : heaptype} {{0xFB} {`%`_u32(36,):Bu32} {ht:Bheaptype}} => `REF.CAST_DESC_EQ`_instr(REF_reftype(?(NULL_null), ht)) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:159.5-159.43 prod{x : idx} {{0xFB} {`%`_u32(0,):Bu32} {x:Btypeidx}} => `STRUCT.NEW`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:153.5-153.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:160.5-160.51 prod{x : idx} {{0xFB} {`%`_u32(1,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:154.5-154.57 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:161.5-161.49 + prod{x : idx} {{0xFB} {`%`_u32(32,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DESC`_instr(x) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:162.5-162.57 + prod{x : idx} {{0xFB} {`%`_u32(33,):Bu32} {x:Btypeidx}} => `STRUCT.NEW_DEFAULT_DESC`_instr(x) + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:163.5-163.57 prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(2,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(), x, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:155.5-155.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:164.5-164.59 prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(3,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(S_sx), x, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:156.5-156.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:165.5-165.59 prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(4,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.GET`_instr(?(U_sx), x, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:157.5-157.57 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:166.5-166.57 prod{x : idx, i : fieldidx} {{0xFB} {`%`_u32(5,):Bu32} {x:Btypeidx} {i:Bfieldidx}} => `STRUCT.SET`_instr(x, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:161.5-161.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:170.5-170.42 prod{x : idx} {{0xFB} {`%`_u32(6,):Bu32} {x:Btypeidx}} => `ARRAY.NEW`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:162.5-162.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:171.5-171.50 prod{x : idx} {{0xFB} {`%`_u32(7,):Bu32} {x:Btypeidx}} => `ARRAY.NEW_DEFAULT`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:163.5-163.57 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:172.5-172.57 prod{x : idx, n : n} {{0xFB} {`%`_u32(8,):Bu32} {x:Btypeidx} {`%`_u32(n,):Bu32}} => `ARRAY.NEW_FIXED`_instr(x, `%`_u32(n,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:164.5-164.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:173.5-173.60 prod{x : idx, y : idx} {{0xFB} {`%`_u32(9,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.NEW_DATA`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:165.5-165.61 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:174.5-174.61 prod{x : idx, y : idx} {{0xFB} {`%`_u32(10,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.NEW_ELEM`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:166.5-166.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:175.5-175.43 prod{x : idx} {{0xFB} {`%`_u32(11,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(), x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:167.5-167.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:176.5-176.45 prod{x : idx} {{0xFB} {`%`_u32(12,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(S_sx), x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:168.5-168.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:177.5-177.45 prod{x : idx} {{0xFB} {`%`_u32(13,):Bu32} {x:Btypeidx}} => `ARRAY.GET`_instr(?(U_sx), x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:169.5-169.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:178.5-178.43 prod{x : idx} {{0xFB} {`%`_u32(14,):Bu32} {x:Btypeidx}} => `ARRAY.SET`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:170.5-170.30 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:179.5-179.30 prod {{0xFB} {`%`_u32(15,):Bu32}} => `ARRAY.LEN`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:171.5-171.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:180.5-180.44 prod{x : idx} {{0xFB} {`%`_u32(16,):Bu32} {x:Btypeidx}} => `ARRAY.FILL`_instr(x) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:172.5-172.65 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:181.5-181.65 prod{x_1 : idx, x_2 : idx} {{0xFB} {`%`_u32(17,):Bu32} {x_1:Btypeidx} {x_2:Btypeidx}} => `ARRAY.COPY`_instr(x_1, x_2) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:173.5-173.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:182.5-182.62 prod{x : idx, y : idx} {{0xFB} {`%`_u32(18,):Bu32} {x:Btypeidx} {y:Bdataidx}} => `ARRAY.INIT_DATA`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:174.5-174.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:183.5-183.62 prod{x : idx, y : idx} {{0xFB} {`%`_u32(19,):Bu32} {x:Btypeidx} {y:Belemidx}} => `ARRAY.INIT_ELEM`_instr(x, y) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:178.5-178.39 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:187.5-187.39 prod {{0xFB} {`%`_u32(26,):Bu32}} => `ANY.CONVERT_EXTERN`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:179.5-179.39 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:188.5-188.39 prod {{0xFB} {`%`_u32(27,):Bu32}} => `EXTERN.CONVERT_ANY`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:183.5-183.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:192.5-192.28 prod {{0xFB} {`%`_u32(28,):Bu32}} => `REF.I31`_instr - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:184.5-184.30 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:193.5-193.30 prod {{0xFB} {`%`_u32(29,):Bu32}} => `I31.GET`_instr(S_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:185.5-185.30 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:194.5-194.30 prod {{0xFB} {`%`_u32(30,):Bu32}} => `I31.GET`_instr(U_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:192.5-192.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:201.5-201.31 prod{i : i32} {{0x41} {i:Bi32}} => CONST_instr(I32_numtype, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:193.5-193.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:202.5-202.31 prod{i : i64} {{0x42} {i:Bi64}} => CONST_instr(I64_numtype, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:194.5-194.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:203.5-203.31 prod{p : f32} {{0x43} {p:Bf32}} => CONST_instr(F32_numtype, p) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:195.5-195.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:204.5-204.31 prod{p : f64} {{0x44} {p:Bf64}} => CONST_instr(F64_numtype, p) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:199.5-199.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:208.5-208.27 prod 0x45 => TESTOP_instr(I32_numtype, EQZ_testop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:203.5-203.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:212.5-212.25 prod 0x46 => RELOP_instr(I32_numtype, EQ_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:204.5-204.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:213.5-213.25 prod 0x47 => RELOP_instr(I32_numtype, NE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:205.5-205.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:214.5-214.27 prod 0x48 => RELOP_instr(I32_numtype, LT_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:206.5-206.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:215.5-215.27 prod 0x49 => RELOP_instr(I32_numtype, LT_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:207.5-207.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:216.5-216.27 prod 0x4A => RELOP_instr(I32_numtype, GT_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:208.5-208.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:217.5-217.27 prod 0x4B => RELOP_instr(I32_numtype, GT_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:209.5-209.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:218.5-218.27 prod 0x4C => RELOP_instr(I32_numtype, LE_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:210.5-210.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:219.5-219.27 prod 0x4D => RELOP_instr(I32_numtype, LE_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:211.5-211.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:220.5-220.27 prod 0x4E => RELOP_instr(I32_numtype, GE_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:212.5-212.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:221.5-221.27 prod 0x4F => RELOP_instr(I32_numtype, GE_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:216.5-216.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:225.5-225.27 prod 0x50 => TESTOP_instr(I64_numtype, EQZ_testop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:220.5-220.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:229.5-229.25 prod 0x51 => RELOP_instr(I64_numtype, EQ_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:221.5-221.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:230.5-230.25 prod 0x52 => RELOP_instr(I64_numtype, NE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:222.5-222.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:231.5-231.27 prod 0x53 => RELOP_instr(I64_numtype, LT_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:223.5-223.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:232.5-232.27 prod 0x54 => RELOP_instr(I64_numtype, LT_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:224.5-224.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:233.5-233.27 prod 0x55 => RELOP_instr(I64_numtype, GT_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:225.5-225.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:234.5-234.27 prod 0x56 => RELOP_instr(I64_numtype, GT_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:226.5-226.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:235.5-235.27 prod 0x57 => RELOP_instr(I64_numtype, LE_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:227.5-227.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:236.5-236.27 prod 0x58 => RELOP_instr(I64_numtype, LE_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:228.5-228.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:237.5-237.27 prod 0x59 => RELOP_instr(I64_numtype, GE_relop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:229.5-229.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:238.5-238.27 prod 0x5A => RELOP_instr(I64_numtype, GE_relop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:233.5-233.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:242.5-242.25 prod 0x5B => RELOP_instr(F32_numtype, EQ_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:234.5-234.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:243.5-243.25 prod 0x5C => RELOP_instr(F32_numtype, NE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:235.5-235.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:244.5-244.25 prod 0x5D => RELOP_instr(F32_numtype, LT_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:236.5-236.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:245.5-245.25 prod 0x5E => RELOP_instr(F32_numtype, GT_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:237.5-237.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:246.5-246.25 prod 0x5F => RELOP_instr(F32_numtype, LE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:238.5-238.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:247.5-247.25 prod 0x60 => RELOP_instr(F32_numtype, GE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:242.5-242.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:251.5-251.25 prod 0x61 => RELOP_instr(F64_numtype, EQ_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:243.5-243.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:252.5-252.25 prod 0x62 => RELOP_instr(F64_numtype, NE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:244.5-244.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:253.5-253.25 prod 0x63 => RELOP_instr(F64_numtype, LT_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:245.5-245.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:254.5-254.25 prod 0x64 => RELOP_instr(F64_numtype, GT_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:246.5-246.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:255.5-255.25 prod 0x65 => RELOP_instr(F64_numtype, LE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:247.5-247.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:256.5-256.25 prod 0x66 => RELOP_instr(F64_numtype, GE_relop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:251.5-251.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:260.5-260.25 prod 0x67 => UNOP_instr(I32_numtype, CLZ_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:252.5-252.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:261.5-261.25 prod 0x68 => UNOP_instr(I32_numtype, CTZ_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:253.5-253.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:262.5-262.28 prod 0x69 => UNOP_instr(I32_numtype, POPCNT_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:257.5-257.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:266.5-266.26 prod 0x6A => BINOP_instr(I32_numtype, ADD_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:258.5-258.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:267.5-267.26 prod 0x6B => BINOP_instr(I32_numtype, SUB_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:259.5-259.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:268.5-268.26 prod 0x6C => BINOP_instr(I32_numtype, MUL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:260.5-260.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:269.5-269.28 prod 0x6D => BINOP_instr(I32_numtype, DIV_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:261.5-261.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:270.5-270.28 prod 0x6E => BINOP_instr(I32_numtype, DIV_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:262.5-262.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:271.5-271.28 prod 0x6F => BINOP_instr(I32_numtype, REM_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:263.5-263.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:272.5-272.28 prod 0x70 => BINOP_instr(I32_numtype, REM_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:264.5-264.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:273.5-273.26 prod 0x71 => BINOP_instr(I32_numtype, AND_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:265.5-265.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:274.5-274.25 prod 0x72 => BINOP_instr(I32_numtype, OR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:266.5-266.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:275.5-275.26 prod 0x73 => BINOP_instr(I32_numtype, XOR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:267.5-267.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:276.5-276.26 prod 0x74 => BINOP_instr(I32_numtype, SHL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:268.5-268.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:277.5-277.28 prod 0x75 => BINOP_instr(I32_numtype, SHR_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:269.5-269.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:278.5-278.28 prod 0x76 => BINOP_instr(I32_numtype, SHR_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:270.5-270.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:279.5-279.27 prod 0x77 => BINOP_instr(I32_numtype, ROTL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:271.5-271.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:280.5-280.27 prod 0x78 => BINOP_instr(I32_numtype, ROTR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:275.5-275.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:284.5-284.25 prod 0x79 => UNOP_instr(I64_numtype, CLZ_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:276.5-276.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:285.5-285.25 prod 0x7A => UNOP_instr(I64_numtype, CTZ_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:277.5-277.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:286.5-286.28 prod 0x7B => UNOP_instr(I64_numtype, POPCNT_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:281.5-281.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:290.5-290.31 prod 0xC0 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(8,),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:282.5-282.32 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:291.5-291.32 prod 0xC1 => UNOP_instr(I32_numtype, EXTEND_unop_(`%`_sz(16,),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:286.5-286.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:295.5-295.31 prod 0xC2 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(8,),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:287.5-287.32 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:296.5-296.32 prod 0xC3 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(16,),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:288.5-288.32 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:297.5-297.32 prod 0xC4 => UNOP_instr(I64_numtype, EXTEND_unop_(`%`_sz(32,),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:292.5-292.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:301.5-301.26 prod 0x7C => BINOP_instr(I64_numtype, ADD_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:293.5-293.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:302.5-302.26 prod 0x7D => BINOP_instr(I64_numtype, SUB_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:294.5-294.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:303.5-303.26 prod 0x7E => BINOP_instr(I64_numtype, MUL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:295.5-295.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:304.5-304.28 prod 0x7F => BINOP_instr(I64_numtype, DIV_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:296.5-296.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:305.5-305.28 prod 0x80 => BINOP_instr(I64_numtype, DIV_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:297.5-297.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:306.5-306.28 prod 0x81 => BINOP_instr(I64_numtype, REM_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:298.5-298.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:307.5-307.28 prod 0x82 => BINOP_instr(I64_numtype, REM_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:299.5-299.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:308.5-308.26 prod 0x83 => BINOP_instr(I64_numtype, AND_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:300.5-300.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:309.5-309.25 prod 0x84 => BINOP_instr(I64_numtype, OR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:301.5-301.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:310.5-310.26 prod 0x85 => BINOP_instr(I64_numtype, XOR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:302.5-302.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:311.5-311.26 prod 0x86 => BINOP_instr(I64_numtype, SHL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:303.5-303.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:312.5-312.28 prod 0x87 => BINOP_instr(I64_numtype, SHR_binop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:304.5-304.28 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:313.5-313.28 prod 0x88 => BINOP_instr(I64_numtype, SHR_binop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:305.5-305.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:314.5-314.27 prod 0x89 => BINOP_instr(I64_numtype, ROTL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:306.5-306.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:315.5-315.27 prod 0x8A => BINOP_instr(I64_numtype, ROTR_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:310.5-310.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:319.5-319.25 prod 0x8B => UNOP_instr(F32_numtype, ABS_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:311.5-311.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:320.5-320.25 prod 0x8C => UNOP_instr(F32_numtype, NEG_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:312.5-312.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:321.5-321.26 prod 0x8D => UNOP_instr(F32_numtype, CEIL_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:313.5-313.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:322.5-322.27 prod 0x8E => UNOP_instr(F32_numtype, FLOOR_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:314.5-314.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:323.5-323.27 prod 0x8F => UNOP_instr(F32_numtype, TRUNC_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:315.5-315.29 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:324.5-324.29 prod 0x90 => UNOP_instr(F32_numtype, NEAREST_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:316.5-316.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:325.5-325.26 prod 0x91 => UNOP_instr(F32_numtype, SQRT_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:320.5-320.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:329.5-329.26 prod 0x92 => BINOP_instr(F32_numtype, ADD_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:321.5-321.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:330.5-330.26 prod 0x93 => BINOP_instr(F32_numtype, SUB_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:322.5-322.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:331.5-331.26 prod 0x94 => BINOP_instr(F32_numtype, MUL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:323.5-323.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:332.5-332.26 prod 0x95 => BINOP_instr(F32_numtype, DIV_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:324.5-324.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:333.5-333.26 prod 0x96 => BINOP_instr(F32_numtype, MIN_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:325.5-325.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:334.5-334.26 prod 0x97 => BINOP_instr(F32_numtype, MAX_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:326.5-326.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:335.5-335.31 prod 0x98 => BINOP_instr(F32_numtype, COPYSIGN_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:330.5-330.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:339.5-339.25 prod 0x99 => UNOP_instr(F64_numtype, ABS_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:331.5-331.25 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:340.5-340.25 prod 0x9A => UNOP_instr(F64_numtype, NEG_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:332.5-332.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:341.5-341.26 prod 0x9B => UNOP_instr(F64_numtype, CEIL_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:333.5-333.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:342.5-342.27 prod 0x9C => UNOP_instr(F64_numtype, FLOOR_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:334.5-334.27 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:343.5-343.27 prod 0x9D => UNOP_instr(F64_numtype, TRUNC_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:335.5-335.29 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:344.5-344.29 prod 0x9E => UNOP_instr(F64_numtype, NEAREST_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:336.5-336.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:345.5-345.26 prod 0x9F => UNOP_instr(F64_numtype, SQRT_unop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:340.5-340.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:349.5-349.26 prod 0xA0 => BINOP_instr(F64_numtype, ADD_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:341.5-341.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:350.5-350.26 prod 0xA1 => BINOP_instr(F64_numtype, SUB_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:342.5-342.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:351.5-351.26 prod 0xA2 => BINOP_instr(F64_numtype, MUL_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:343.5-343.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:352.5-352.26 prod 0xA3 => BINOP_instr(F64_numtype, DIV_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:344.5-344.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:353.5-353.26 prod 0xA4 => BINOP_instr(F64_numtype, MIN_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:345.5-345.26 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:354.5-354.26 prod 0xA5 => BINOP_instr(F64_numtype, MAX_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:346.5-346.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:355.5-355.31 prod 0xA6 => BINOP_instr(F64_numtype, COPYSIGN_binop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:351.5-351.31 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:360.5-360.31 prod 0xA7 => CVTOP_instr(I32_numtype, I64_numtype, WRAP_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:352.5-352.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:361.5-361.34 prod 0xA8 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:353.5-353.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:362.5-362.34 prod 0xA9 => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:354.5-354.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:363.5-363.34 prod 0xAA => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:355.5-355.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:364.5-364.34 prod 0xAB => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:356.5-356.35 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:365.5-365.35 prod 0xAC => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:357.5-357.35 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:366.5-366.35 prod 0xAD => CVTOP_instr(I64_numtype, I32_numtype, EXTEND_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:358.5-358.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:367.5-367.34 prod 0xAE => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:359.5-359.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:368.5-368.34 prod 0xAF => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:360.5-360.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:369.5-369.34 prod 0xB0 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:361.5-361.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:370.5-370.34 prod 0xB1 => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:362.5-362.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:371.5-371.36 prod 0xB2 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:363.5-363.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:372.5-372.36 prod 0xB3 => CVTOP_instr(F32_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:364.5-364.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:373.5-373.36 prod 0xB4 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:365.5-365.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:374.5-374.36 prod 0xB5 => CVTOP_instr(F32_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:366.5-366.33 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:375.5-375.33 prod 0xB6 => CVTOP_instr(F32_numtype, F64_numtype, DEMOTE_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:367.5-367.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:376.5-376.36 prod 0xB7 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:368.5-368.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:377.5-377.36 prod 0xB8 => CVTOP_instr(F64_numtype, I32_numtype, CONVERT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:369.5-369.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:378.5-378.36 prod 0xB9 => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:370.5-370.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:379.5-379.36 prod 0xBA => CVTOP_instr(F64_numtype, I64_numtype, CONVERT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:371.5-371.34 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:380.5-380.34 prod 0xBB => CVTOP_instr(F64_numtype, F32_numtype, PROMOTE_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:372.5-372.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:381.5-381.38 prod 0xBC => CVTOP_instr(I32_numtype, F32_numtype, REINTERPRET_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:373.5-373.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:382.5-382.38 prod 0xBD => CVTOP_instr(I64_numtype, F64_numtype, REINTERPRET_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:374.5-374.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:383.5-383.38 prod 0xBE => CVTOP_instr(F32_numtype, I32_numtype, REINTERPRET_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:375.5-375.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:384.5-384.38 prod 0xBF => CVTOP_instr(F64_numtype, I64_numtype, REINTERPRET_cvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:379.5-379.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:388.5-388.45 prod {{0xFC} {`%`_u32(0,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:380.5-380.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:389.5-389.45 prod {{0xFC} {`%`_u32(1,):Bu32}} => CVTOP_instr(I32_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:381.5-381.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:390.5-390.45 prod {{0xFC} {`%`_u32(2,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:382.5-382.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:391.5-391.45 prod {{0xFC} {`%`_u32(3,):Bu32}} => CVTOP_instr(I32_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:383.5-383.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:392.5-392.45 prod {{0xFC} {`%`_u32(4,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:384.5-384.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:393.5-393.45 prod {{0xFC} {`%`_u32(5,):Bu32}} => CVTOP_instr(I64_numtype, F32_numtype, TRUNC_SAT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:385.5-385.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:394.5-394.45 prod {{0xFC} {`%`_u32(6,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:386.5-386.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:395.5-395.45 prod {{0xFC} {`%`_u32(7,):Bu32}} => CVTOP_instr(I64_numtype, F64_numtype, TRUNC_SAT_cvtop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:396.5-396.50 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:405.5-405.50 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(0,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:397.5-397.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:406.5-406.70 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(1,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:398.5-398.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:407.5-407.70 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(2,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(8,), `%`_M(8,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:399.5-399.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:408.5-408.71 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(3,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:400.5-400.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:409.5-409.71 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(4,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(16,), `%`_M(4,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:401.5-401.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:410.5-410.71 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(5,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), S_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:402.5-402.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:411.5-411.71 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(6,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(`SHAPE%X%_%`_vloadop_(`%`_sz(32,), `%`_M(2,), U_sx)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:403.5-403.61 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:412.5-412.61 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(7,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(8,))), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:404.5-404.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:413.5-413.62 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(8,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(16,))), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:405.5-405.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:414.5-414.62 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(9,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(32,))), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:406.5-406.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:415.5-415.63 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(10,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(SPLAT_vloadop_(`%`_sz(64,))), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:407.5-407.52 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:416.5-416.52 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(11,):Bu32} {(x, ao):Bmemarg}} => VSTORE_instr(V128_vectype, x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:408.5-408.72 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:417.5-417.72 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(84,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:409.5-409.73 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:418.5-418.73 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(85,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:410.5-410.73 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:419.5-419.73 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(86,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:411.5-411.73 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:420.5-420.73 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(87,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VLOAD_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:412.5-412.73 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:421.5-421.73 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(88,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(8,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:413.5-413.74 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:422.5-422.74 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(89,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(16,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:414.5-414.74 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:423.5-423.74 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(90,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(32,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:415.5-415.74 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:424.5-424.74 prod{x : idx, ao : memarg, i : laneidx} {{0xFD} {`%`_u32(91,):Bu32} {(x, ao):Bmemarg} {i:Blaneidx}} => VSTORE_LANE_instr(V128_vectype, `%`_sz(64,), x, ao, i) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:416.5-416.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:425.5-425.62 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(92,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(32,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:417.5-417.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:426.5-426.62 prod{x : idx, ao : memarg} {{0xFD} {`%`_u32(93,):Bu32} {(x, ao):Bmemarg}} => VLOAD_instr(V128_vectype, ?(ZERO_vloadop_(`%`_sz(64,),)), x, ao) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:421.5-421.72 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:430.5-430.72 prod{`b*` : byte*} {{0xFD} {`%`_u32(12,):Bu32} {b:Bbyte^16{b <- `b*`}}} => VCONST_instr(V128_vectype, $inv_ibytes_(128, b^16{b <- `b*`})) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:425.5-425.61 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:434.5-434.61 prod{`l*` : labelidx*} {{0xFD} {`%`_u32(13,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx^16{l <- `l*`}}} => VSHUFFLE_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_laneidx(l!`%`_labelidx.0,)^16{l <- `l*`}) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:426.5-426.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:435.5-435.49 prod {{0xFD} {`%`_u32(14,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SWIZZLE_vswizzlop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:427.5-427.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:436.5-436.58 prod {{0xFD} {`%`_u32(256,):Bu32}} => VSWIZZLOP_instr(`%`_bshape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_SWIZZLE_vswizzlop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:431.5-431.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:440.5-440.38 prod {{0xFD} {`%`_u32(15,):Bu32}} => VSPLAT_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:432.5-432.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:441.5-441.38 prod {{0xFD} {`%`_u32(16,):Bu32}} => VSPLAT_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:433.5-433.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:442.5-442.38 prod {{0xFD} {`%`_u32(17,):Bu32}} => VSPLAT_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:434.5-434.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:443.5-443.38 prod {{0xFD} {`%`_u32(18,):Bu32}} => VSPLAT_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:435.5-435.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:444.5-444.38 prod {{0xFD} {`%`_u32(19,):Bu32}} => VSPLAT_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:436.5-436.38 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:445.5-445.38 prod {{0xFD} {`%`_u32(20,):Bu32}} => VSPLAT_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:440.5-440.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:449.5-449.60 prod{l : labelidx} {{0xFD} {`%`_u32(21,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:441.5-441.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:450.5-450.60 prod{l : labelidx} {{0xFD} {`%`_u32(22,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:442.5-442.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:451.5-451.58 prod{l : labelidx} {{0xFD} {`%`_u32(23,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:443.5-443.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:452.5-452.60 prod{l : labelidx} {{0xFD} {`%`_u32(24,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(S_sx), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:444.5-444.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:453.5-453.60 prod{l : labelidx} {{0xFD} {`%`_u32(25,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ?(U_sx), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:445.5-445.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:454.5-454.58 prod{l : labelidx} {{0xFD} {`%`_u32(26,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:446.5-446.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:455.5-455.58 prod{l : labelidx} {{0xFD} {`%`_u32(27,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:447.5-447.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:456.5-456.58 prod{l : labelidx} {{0xFD} {`%`_u32(28,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:448.5-448.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:457.5-457.58 prod{l : labelidx} {{0xFD} {`%`_u32(29,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:449.5-449.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:458.5-458.58 prod{l : labelidx} {{0xFD} {`%`_u32(30,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:450.5-450.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:459.5-459.58 prod{l : labelidx} {{0xFD} {`%`_u32(31,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:451.5-451.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:460.5-460.58 prod{l : labelidx} {{0xFD} {`%`_u32(32,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:452.5-452.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:461.5-461.58 prod{l : labelidx} {{0xFD} {`%`_u32(33,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VEXTRACT_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ?(), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:453.5-453.58 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:462.5-462.58 prod{l : labelidx} {{0xFD} {`%`_u32(34,):Bu32} {`%`_laneidx(l!`%`_labelidx.0,):Blaneidx}} => VREPLACE_LANE_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%`_laneidx(l!`%`_labelidx.0,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:457.5-457.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:466.5-466.41 prod {{0xFD} {`%`_u32(35,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:458.5-458.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:467.5-467.41 prod {{0xFD} {`%`_u32(36,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:459.5-459.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:468.5-468.43 prod {{0xFD} {`%`_u32(37,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:460.5-460.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:469.5-469.43 prod {{0xFD} {`%`_u32(38,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:461.5-461.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:470.5-470.43 prod {{0xFD} {`%`_u32(39,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:462.5-462.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:471.5-471.43 prod {{0xFD} {`%`_u32(40,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:463.5-463.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:472.5-472.43 prod {{0xFD} {`%`_u32(41,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:464.5-464.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:473.5-473.43 prod {{0xFD} {`%`_u32(42,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), LE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:465.5-465.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:474.5-474.43 prod {{0xFD} {`%`_u32(43,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:466.5-466.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:475.5-475.43 prod {{0xFD} {`%`_u32(44,):Bu32}} => VRELOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), GE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:470.5-470.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:479.5-479.41 prod {{0xFD} {`%`_u32(45,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:471.5-471.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:480.5-480.41 prod {{0xFD} {`%`_u32(46,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:472.5-472.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:481.5-481.43 prod {{0xFD} {`%`_u32(47,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:473.5-473.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:482.5-482.43 prod {{0xFD} {`%`_u32(48,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:474.5-474.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:483.5-483.43 prod {{0xFD} {`%`_u32(49,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:475.5-475.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:484.5-484.43 prod {{0xFD} {`%`_u32(50,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:476.5-476.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:485.5-485.43 prod {{0xFD} {`%`_u32(51,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:477.5-477.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:486.5-486.43 prod {{0xFD} {`%`_u32(52,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), LE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:478.5-478.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:487.5-487.43 prod {{0xFD} {`%`_u32(53,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:479.5-479.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:488.5-488.43 prod {{0xFD} {`%`_u32(54,):Bu32}} => VRELOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), GE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:483.5-483.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:492.5-492.41 prod {{0xFD} {`%`_u32(55,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:484.5-484.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:493.5-493.41 prod {{0xFD} {`%`_u32(56,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:485.5-485.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:494.5-494.43 prod {{0xFD} {`%`_u32(57,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:486.5-486.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:495.5-495.43 prod {{0xFD} {`%`_u32(58,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:487.5-487.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:496.5-496.43 prod {{0xFD} {`%`_u32(59,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:488.5-488.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:497.5-497.43 prod {{0xFD} {`%`_u32(60,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GT_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:489.5-489.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:498.5-498.43 prod {{0xFD} {`%`_u32(61,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:490.5-490.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:499.5-499.43 prod {{0xFD} {`%`_u32(62,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), LE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:491.5-491.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:500.5-500.43 prod {{0xFD} {`%`_u32(63,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:492.5-492.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:501.5-501.43 prod {{0xFD} {`%`_u32(64,):Bu32}} => VRELOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), GE_vrelop_(U_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:496.5-496.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:505.5-505.41 prod {{0xFD} {`%`_u32(65,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:497.5-497.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:506.5-506.41 prod {{0xFD} {`%`_u32(66,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:498.5-498.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:507.5-507.41 prod {{0xFD} {`%`_u32(67,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LT_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:499.5-499.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:508.5-508.41 prod {{0xFD} {`%`_u32(68,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GT_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:500.5-500.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:509.5-509.41 prod {{0xFD} {`%`_u32(69,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), LE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:501.5-501.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:510.5-510.41 prod {{0xFD} {`%`_u32(70,):Bu32}} => VRELOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), GE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:505.5-505.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:514.5-514.41 prod {{0xFD} {`%`_u32(71,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:506.5-506.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:515.5-515.41 prod {{0xFD} {`%`_u32(72,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:507.5-507.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:516.5-516.41 prod {{0xFD} {`%`_u32(73,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LT_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:508.5-508.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:517.5-517.41 prod {{0xFD} {`%`_u32(74,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GT_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:509.5-509.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:518.5-518.41 prod {{0xFD} {`%`_u32(75,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), LE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:510.5-510.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:519.5-519.41 prod {{0xFD} {`%`_u32(76,):Bu32}} => VRELOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), GE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:514.5-514.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:523.5-523.36 prod {{0xFD} {`%`_u32(77,):Bu32}} => VVUNOP_instr(V128_vectype, NOT_vvunop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:518.5-518.37 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:527.5-527.37 prod {{0xFD} {`%`_u32(78,):Bu32}} => VVBINOP_instr(V128_vectype, AND_vvbinop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:519.5-519.40 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:528.5-528.40 prod {{0xFD} {`%`_u32(79,):Bu32}} => VVBINOP_instr(V128_vectype, ANDNOT_vvbinop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:520.5-520.36 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:529.5-529.36 prod {{0xFD} {`%`_u32(80,):Bu32}} => VVBINOP_instr(V128_vectype, OR_vvbinop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:521.5-521.37 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:530.5-530.37 prod {{0xFD} {`%`_u32(81,):Bu32}} => VVBINOP_instr(V128_vectype, XOR_vvbinop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:525.5-525.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:534.5-534.44 prod {{0xFD} {`%`_u32(82,):Bu32}} => VVTERNOP_instr(V128_vectype, BITSELECT_vvternop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:529.5-529.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:538.5-538.43 prod {{0xFD} {`%`_u32(83,):Bu32}} => VVTESTOP_instr(V128_vectype, ANY_TRUE_vvtestop) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:533.5-533.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:542.5-542.41 prod {{0xFD} {`%`_u32(96,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:534.5-534.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:543.5-543.41 prod {{0xFD} {`%`_u32(97,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:535.5-535.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:544.5-544.44 prod {{0xFD} {`%`_u32(98,):Bu32}} => VUNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), POPCNT_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:539.5-539.48 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:548.5-548.48 prod {{0xFD} {`%`_u32(99,):Bu32}} => VTESTOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ALL_TRUE_vtestop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:543.5-543.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:552.5-552.41 prod {{0xFD} {`%`_u32(100,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:547.5-547.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:556.5-556.53 prod {{0xFD} {`%`_u32(101,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), S_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:548.5-548.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:557.5-557.53 prod {{0xFD} {`%`_u32(102,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), U_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:552.5-552.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:561.5-561.45 prod {{0xFD} {`%`_u32(107,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHL_vshiftop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:553.5-553.47 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:562.5-562.47 prod {{0xFD} {`%`_u32(108,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:554.5-554.47 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:563.5-563.47 prod {{0xFD} {`%`_u32(109,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), SHR_vshiftop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:558.5-558.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:567.5-567.43 prod {{0xFD} {`%`_u32(110,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:559.5-559.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:568.5-568.49 prod {{0xFD} {`%`_u32(111,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:560.5-560.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:569.5-569.49 prod {{0xFD} {`%`_u32(112,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), ADD_SAT_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:561.5-561.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:570.5-570.43 prod {{0xFD} {`%`_u32(113,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:562.5-562.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:571.5-571.49 prod {{0xFD} {`%`_u32(114,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:563.5-563.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:572.5-572.49 prod {{0xFD} {`%`_u32(115,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), SUB_SAT_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:564.5-564.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:573.5-573.45 prod {{0xFD} {`%`_u32(118,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:565.5-565.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:574.5-574.45 prod {{0xFD} {`%`_u32(119,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MIN_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:566.5-566.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:575.5-575.45 prod {{0xFD} {`%`_u32(120,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:567.5-567.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:576.5-576.45 prod {{0xFD} {`%`_u32(121,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), MAX_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:568.5-568.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:577.5-577.46 prod {{0xFD} {`%`_u32(123,):Bu32}} => VBINOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), AVGRU_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:572.5-572.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:581.5-581.70 prod {{0xFD} {`%`_u32(124,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:573.5-573.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:582.5-582.70 prod {{0xFD} {`%`_u32(125,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:577.5-577.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:586.5-586.42 prod {{0xFD} {`%`_u32(128,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:578.5-578.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:587.5-587.42 prod {{0xFD} {`%`_u32(129,):Bu32}} => VUNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:582.5-582.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:591.5-591.53 prod {{0xFD} {`%`_u32(130,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), Q15MULR_SATS_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:583.5-583.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:592.5-592.43 prod {{0xFD} {`%`_u32(142,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:584.5-584.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:593.5-593.49 prod {{0xFD} {`%`_u32(143,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:585.5-585.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:594.5-594.49 prod {{0xFD} {`%`_u32(144,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ADD_SAT_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:586.5-586.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:595.5-595.43 prod {{0xFD} {`%`_u32(145,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:587.5-587.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:596.5-596.49 prod {{0xFD} {`%`_u32(146,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:588.5-588.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:597.5-597.49 prod {{0xFD} {`%`_u32(147,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), SUB_SAT_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:589.5-589.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:598.5-598.43 prod {{0xFD} {`%`_u32(149,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MUL_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:590.5-590.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:599.5-599.45 prod {{0xFD} {`%`_u32(150,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:591.5-591.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:600.5-600.45 prod {{0xFD} {`%`_u32(151,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MIN_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:592.5-592.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:601.5-601.45 prod {{0xFD} {`%`_u32(152,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:593.5-593.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:602.5-602.45 prod {{0xFD} {`%`_u32(153,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), MAX_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:594.5-594.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:603.5-603.46 prod {{0xFD} {`%`_u32(155,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), AVGRU_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:595.5-595.57 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:604.5-604.57 prod {{0xFD} {`%`_u32(273,):Bu32}} => VBINOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_Q15MULRS_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:599.5-599.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:608.5-608.49 prod {{0xFD} {`%`_u32(131,):Bu32}} => VTESTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), ALL_TRUE_vtestop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:603.5-603.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:612.5-612.41 prod {{0xFD} {`%`_u32(132,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:607.5-607.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:616.5-616.53 prod {{0xFD} {`%`_u32(133,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), S_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:608.5-608.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:617.5-617.53 prod {{0xFD} {`%`_u32(134,):Bu32}} => VNARROW_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), U_sx) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:612.5-612.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:621.5-621.63 prod {{0xFD} {`%`_u32(135,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:613.5-613.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:622.5-622.64 prod {{0xFD} {`%`_u32(136,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:614.5-614.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:623.5-623.63 prod {{0xFD} {`%`_u32(137,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:615.5-615.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:624.5-624.64 prod {{0xFD} {`%`_u32(138,):Bu32}} => VCVTOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), `%X%`_shape(I8_lanetype, `%`_dim(16,)), EXTEND_vcvtop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:619.5-619.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:628.5-628.45 prod {{0xFD} {`%`_u32(139,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHL_vshiftop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:620.5-620.47 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:629.5-629.47 prod {{0xFD} {`%`_u32(140,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:621.5-621.47 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:630.5-630.47 prod {{0xFD} {`%`_u32(141,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), SHR_vshiftop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:625.5-625.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:634.5-634.66 prod {{0xFD} {`%`_u32(156,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:626.5-626.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:635.5-635.67 prod {{0xFD} {`%`_u32(157,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:627.5-627.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:636.5-636.66 prod {{0xFD} {`%`_u32(158,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:628.5-628.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:637.5-637.67 prod {{0xFD} {`%`_u32(159,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:629.5-629.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:638.5-638.67 prod {{0xFD} {`%`_u32(274,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOTS_vextbinop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:633.5-633.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:642.5-642.70 prod {{0xFD} {`%`_u32(126,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:634.5-634.70 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:643.5-643.70 prod {{0xFD} {`%`_u32(127,):Bu32}} => VEXTUNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTADD_PAIRWISE_vextunop__(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:638.5-638.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:647.5-647.42 prod {{0xFD} {`%`_u32(160,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:639.5-639.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:648.5-648.42 prod {{0xFD} {`%`_u32(161,):Bu32}} => VUNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:643.5-643.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:652.5-652.49 prod {{0xFD} {`%`_u32(163,):Bu32}} => VTESTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ALL_TRUE_vtestop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:647.5-647.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:656.5-656.41 prod {{0xFD} {`%`_u32(164,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:651.5-651.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:660.5-660.63 prod {{0xFD} {`%`_u32(167,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:652.5-652.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:661.5-661.64 prod {{0xFD} {`%`_u32(168,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:653.5-653.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:662.5-662.63 prod {{0xFD} {`%`_u32(169,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:654.5-654.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:663.5-663.64 prod {{0xFD} {`%`_u32(170,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(I16_lanetype, `%`_dim(8,)), EXTEND_vcvtop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:658.5-658.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:667.5-667.45 prod {{0xFD} {`%`_u32(171,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHL_vshiftop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:659.5-659.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:668.5-668.49 prod {{0xFD} {`%`_u32(172,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:660.5-660.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:669.5-669.49 prod {{0xFD} {`%`_u32(173,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), SHR_vshiftop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:664.5-664.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:673.5-673.43 prod {{0xFD} {`%`_u32(174,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:665.5-665.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:674.5-674.43 prod {{0xFD} {`%`_u32(177,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:666.5-666.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:675.5-675.43 prod {{0xFD} {`%`_u32(181,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MUL_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:667.5-667.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:676.5-676.45 prod {{0xFD} {`%`_u32(182,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:668.5-668.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:677.5-677.45 prod {{0xFD} {`%`_u32(183,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MIN_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:669.5-669.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:678.5-678.45 prod {{0xFD} {`%`_u32(184,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:670.5-670.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:679.5-679.45 prod {{0xFD} {`%`_u32(185,):Bu32}} => VBINOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), MAX_vbinop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:674.5-674.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:683.5-683.59 prod {{0xFD} {`%`_u32(186,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), DOTS_vextbinop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:675.5-675.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:684.5-684.66 prod {{0xFD} {`%`_u32(188,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:676.5-676.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:685.5-685.67 prod {{0xFD} {`%`_u32(189,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:677.5-677.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:686.5-686.66 prod {{0xFD} {`%`_u32(190,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:678.5-678.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:687.5-687.67 prod {{0xFD} {`%`_u32(191,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I16_lanetype, `%`_dim(8,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:682.5-682.72 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:691.5-691.72 prod {{0xFD} {`%`_u32(275,):Bu32}} => VEXTTERNOP_instr(`%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), `%`_ishape(`%X%`_shape(I8_lanetype, `%`_dim(16,)),), RELAXED_DOT_ADDS_vextternop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:686.5-686.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:695.5-695.42 prod {{0xFD} {`%`_u32(192,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:687.5-687.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:696.5-696.42 prod {{0xFD} {`%`_u32(193,):Bu32}} => VUNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:691.5-691.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:700.5-700.49 prod {{0xFD} {`%`_u32(195,):Bu32}} => VTESTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ALL_TRUE_vtestop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:695.5-695.41 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:704.5-704.41 prod {{0xFD} {`%`_u32(196,):Bu32}} => VBITMASK_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:699.5-699.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:708.5-708.63 prod {{0xFD} {`%`_u32(199,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:700.5-700.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:709.5-709.64 prod {{0xFD} {`%`_u32(200,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:701.5-701.63 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:710.5-710.63 prod {{0xFD} {`%`_u32(201,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:702.5-702.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:711.5-711.64 prod {{0xFD} {`%`_u32(202,):Bu32}} => VCVTOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), EXTEND_vcvtop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:706.5-706.45 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:715.5-715.45 prod {{0xFD} {`%`_u32(203,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHL_vshiftop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:707.5-707.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:716.5-716.49 prod {{0xFD} {`%`_u32(204,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:708.5-708.49 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:717.5-717.49 prod {{0xFD} {`%`_u32(205,):Bu32}} => VSHIFTOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), SHR_vshiftop_(U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:712.5-712.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:721.5-721.43 prod {{0xFD} {`%`_u32(206,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:713.5-713.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:722.5-722.43 prod {{0xFD} {`%`_u32(209,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:714.5-714.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:723.5-723.43 prod {{0xFD} {`%`_u32(213,):Bu32}} => VBINOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), MUL_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:718.5-718.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:727.5-727.42 prod {{0xFD} {`%`_u32(214,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), EQ_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:719.5-719.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:728.5-728.42 prod {{0xFD} {`%`_u32(215,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), NE_vrelop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:720.5-720.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:729.5-729.46 prod {{0xFD} {`%`_u32(216,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:721.5-721.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:730.5-730.46 prod {{0xFD} {`%`_u32(217,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GT_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:722.5-722.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:731.5-731.46 prod {{0xFD} {`%`_u32(218,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), LE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:723.5-723.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:732.5-732.46 prod {{0xFD} {`%`_u32(219,):Bu32}} => VRELOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), GE_vrelop_(S_sx,)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:727.5-727.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:736.5-736.66 prod {{0xFD} {`%`_u32(220,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:728.5-728.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:737.5-737.67 prod {{0xFD} {`%`_u32(221,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:729.5-729.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:738.5-738.66 prod {{0xFD} {`%`_u32(222,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(LOW_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:730.5-730.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:739.5-739.67 prod {{0xFD} {`%`_u32(223,):Bu32}} => VEXTBINOP_instr(`%`_ishape(`%X%`_shape(I64_lanetype, `%`_dim(2,)),), `%`_ishape(`%X%`_shape(I32_lanetype, `%`_dim(4,)),), EXTMUL_vextbinop__(HIGH_half, U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:734.5-734.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:743.5-743.43 prod {{0xFD} {`%`_u32(103,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), CEIL_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:735.5-735.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:744.5-744.44 prod {{0xFD} {`%`_u32(104,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), FLOOR_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:736.5-736.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:745.5-745.44 prod {{0xFD} {`%`_u32(105,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:737.5-737.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:746.5-746.46 prod {{0xFD} {`%`_u32(106,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEAREST_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:738.5-738.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:747.5-747.42 prod {{0xFD} {`%`_u32(224,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:739.5-739.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:748.5-748.42 prod {{0xFD} {`%`_u32(225,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:740.5-740.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:749.5-749.43 prod {{0xFD} {`%`_u32(227,):Bu32}} => VUNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SQRT_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:744.5-744.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:753.5-753.43 prod {{0xFD} {`%`_u32(228,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:745.5-745.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:754.5-754.43 prod {{0xFD} {`%`_u32(229,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:746.5-746.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:755.5-755.43 prod {{0xFD} {`%`_u32(230,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MUL_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:747.5-747.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:756.5-756.43 prod {{0xFD} {`%`_u32(231,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), DIV_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:748.5-748.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:757.5-757.43 prod {{0xFD} {`%`_u32(232,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:749.5-749.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:758.5-758.43 prod {{0xFD} {`%`_u32(233,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), MAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:750.5-750.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:759.5-759.44 prod {{0xFD} {`%`_u32(234,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:751.5-751.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:760.5-760.44 prod {{0xFD} {`%`_u32(235,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), PMAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:752.5-752.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:761.5-761.51 prod {{0xFD} {`%`_u32(269,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:753.5-753.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:762.5-762.51 prod {{0xFD} {`%`_u32(270,):Bu32}} => VBINOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:757.5-757.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:766.5-766.53 prod {{0xFD} {`%`_u32(261,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_MADD_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:758.5-758.54 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:767.5-767.54 prod {{0xFD} {`%`_u32(262,):Bu32}} => VTERNOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_NMADD_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:762.5-762.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:771.5-771.43 prod {{0xFD} {`%`_u32(116,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), CEIL_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:763.5-763.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:772.5-772.44 prod {{0xFD} {`%`_u32(117,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), FLOOR_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:764.5-764.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:773.5-773.44 prod {{0xFD} {`%`_u32(122,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:765.5-765.46 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:774.5-774.46 prod {{0xFD} {`%`_u32(148,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEAREST_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:766.5-766.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:775.5-775.42 prod {{0xFD} {`%`_u32(236,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ABS_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:767.5-767.42 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:776.5-776.42 prod {{0xFD} {`%`_u32(237,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), NEG_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:768.5-768.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:777.5-777.43 prod {{0xFD} {`%`_u32(239,):Bu32}} => VUNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SQRT_vunop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:772.5-772.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:781.5-781.43 prod {{0xFD} {`%`_u32(240,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), ADD_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:773.5-773.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:782.5-782.43 prod {{0xFD} {`%`_u32(241,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), SUB_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:774.5-774.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:783.5-783.43 prod {{0xFD} {`%`_u32(242,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MUL_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:775.5-775.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:784.5-784.43 prod {{0xFD} {`%`_u32(243,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), DIV_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:776.5-776.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:785.5-785.43 prod {{0xFD} {`%`_u32(244,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:777.5-777.43 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:786.5-786.43 prod {{0xFD} {`%`_u32(245,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), MAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:778.5-778.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:787.5-787.44 prod {{0xFD} {`%`_u32(246,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:779.5-779.44 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:788.5-788.44 prod {{0xFD} {`%`_u32(247,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), PMAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:780.5-780.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:789.5-789.51 prod {{0xFD} {`%`_u32(271,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MIN_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:781.5-781.51 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:790.5-790.51 prod {{0xFD} {`%`_u32(272,):Bu32}} => VBINOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MAX_vbinop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:785.5-785.53 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:794.5-794.53 prod {{0xFD} {`%`_u32(263,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_MADD_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:786.5-786.54 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:795.5-795.54 prod {{0xFD} {`%`_u32(264,):Bu32}} => VTERNOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_NMADD_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:787.5-787.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:796.5-796.59 prod {{0xFD} {`%`_u32(265,):Bu32}} => VTERNOP_instr(`%X%`_shape(I8_lanetype, `%`_dim(16,)), RELAXED_LANESELECT_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:788.5-788.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:797.5-797.59 prod {{0xFD} {`%`_u32(266,):Bu32}} => VTERNOP_instr(`%X%`_shape(I16_lanetype, `%`_dim(8,)), RELAXED_LANESELECT_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:789.5-789.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:798.5-798.59 prod {{0xFD} {`%`_u32(267,):Bu32}} => VTERNOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), RELAXED_LANESELECT_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:790.5-790.59 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:799.5-799.59 prod {{0xFD} {`%`_u32(268,):Bu32}} => VTERNOP_instr(`%X%`_shape(I64_lanetype, `%`_dim(2,)), RELAXED_LANESELECT_vternop_) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:794.5-794.61 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:803.5-803.61 prod {{0xFD} {`%`_u32(94,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), DEMOTE_vcvtop__(ZERO_zero)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:795.5-795.61 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:804.5-804.61 prod {{0xFD} {`%`_u32(95,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), PROMOTELOW_vcvtop__) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:796.5-796.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:805.5-805.62 prod {{0xFD} {`%`_u32(248,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(S_sx, ?())) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:797.5-797.62 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:806.5-806.62 prod {{0xFD} {`%`_u32(249,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), TRUNC_SAT_vcvtop__(U_sx, ?())) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:798.5-798.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:807.5-807.60 prod {{0xFD} {`%`_u32(250,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:799.5-799.60 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:808.5-808.60 prod {{0xFD} {`%`_u32(251,):Bu32}} => VCVTOP_instr(`%X%`_shape(F32_lanetype, `%`_dim(4,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(), U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:800.5-800.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:809.5-809.67 prod {{0xFD} {`%`_u32(252,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(S_sx, ?(ZERO_zero))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:801.5-801.67 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:810.5-810.67 prod {{0xFD} {`%`_u32(253,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), TRUNC_SAT_vcvtop__(U_sx, ?(ZERO_zero))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:802.5-802.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:811.5-811.64 prod {{0xFD} {`%`_u32(254,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), S_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:803.5-803.64 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:812.5-812.64 prod {{0xFD} {`%`_u32(255,):Bu32}} => VCVTOP_instr(`%X%`_shape(F64_lanetype, `%`_dim(2,)), `%X%`_shape(I32_lanetype, `%`_dim(4,)), CONVERT_vcvtop__(?(LOW_half), U_sx)) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:804.5-804.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:813.5-813.66 prod {{0xFD} {`%`_u32(257,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(S_sx, ?())) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:805.5-805.66 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:814.5-814.66 prod {{0xFD} {`%`_u32(258,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F32_lanetype, `%`_dim(4,)), RELAXED_TRUNC_vcvtop__(U_sx, ?())) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:806.5-806.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:815.5-815.71 prod {{0xFD} {`%`_u32(259,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(S_sx, ?(ZERO_zero))) - ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:807.5-807.71 + ;; ../../../../specification/wasm-latest/5.3-binary.instructions.spectec:816.5-816.71 prod {{0xFD} {`%`_u32(260,):Bu32}} => VCVTOP_instr(`%X%`_shape(I32_lanetype, `%`_dim(4,)), `%X%`_shape(F64_lanetype, `%`_dim(2,)), RELAXED_TRUNC_vcvtop__(U_sx, ?(ZERO_zero))) } From a82b087847417e8b517eb728b7c2c14944e27f81 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 23 Oct 2026 15:34:42 -0700 Subject: [PATCH 22/24] [spec] Rename describestype/descriptortype to describes/descriptor Also introduce metavariables `dct` for `desctype`, `dcs` for `describes`, and `dcr` for `descriptor`. --- document/core/syntax/types.rst | 2 +- document/core/util/macros.def | 4 +- .../wasm-latest/1.2-syntax.types.spectec | 41 +-- .../2.3-validation.instructions.spectec | 16 +- spectec/test-frontend/TEST.md | 282 +++++++++--------- 5 files changed, 174 insertions(+), 171 deletions(-) diff --git a/document/core/syntax/types.rst b/document/core/syntax/types.rst index 8fcd3f995..8deceee57 100644 --- a/document/core/syntax/types.rst +++ b/document/core/syntax/types.rst @@ -325,7 +325,7 @@ Recursive Types Each type can also be declared *final*, preventing further subtyping. Each composite type can also optionally have a :ref:`described ` :ref:`type use ` and a :ref:`descriptor ` :ref:`type use `. -$${syntax: {rectype subtype describestype descriptortype desctype}} +$${syntax: {rectype subtype describes descriptor desctype}} In a :ref:`module `, each member of a recursive type is assigned a separate :ref:`type index `. diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 6f0dee713..6ade08668 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -303,8 +303,8 @@ .. |fieldtype| mathdef:: \xref{syntax/types}{syntax-fieldtype}{\X{fieldtype}} .. |storagetype| mathdef:: \xref{syntax/types}{syntax-storagetype}{\X{storagetype}} .. |comptype| mathdef:: \xref{syntax/types}{syntax-comptype}{\X{comptype}} -.. |describestype| mathdef:: \xref{syntax/types}{syntax-desctype}{\X{describestype}} -.. |descriptortype| mathdef:: \xref{syntax/types}{syntax-desctype}{\X{descriptortype}} +.. |describes| mathdef:: \xref{syntax/types}{syntax-desctype}{\X{describes}} +.. |descriptor| mathdef:: \xref{syntax/types}{syntax-desctype}{\X{descriptor}} .. |desctype| mathdef:: \xref{syntax/types}{syntax-desctype}{\X{desctype}} .. |subtype| mathdef:: \xref{syntax/types}{syntax-subtype}{\X{subtype}} .. |rectype| mathdef:: \xref{syntax/types}{syntax-rectype}{\X{rectype}} diff --git a/specification/wasm-latest/1.2-syntax.types.spectec b/specification/wasm-latest/1.2-syntax.types.spectec index 684535db7..217497a71 100644 --- a/specification/wasm-latest/1.2-syntax.types.spectec +++ b/specification/wasm-latest/1.2-syntax.types.spectec @@ -122,11 +122,11 @@ syntax comptype hint(desc "composite type") hint(macro "%" "T%") = | ARRAY fieldtype | FUNC resulttype -> resulttype -syntax describestype hint(desc "describes type") hint(macro "%" "T%") = DESCRIBES typeuse -syntax descriptortype hint(desc "descriptor type") hint(macro "%" "T%") = DESCRIPTOR typeuse +syntax describes hint(desc "describes clause") hint(macro "%" "T%") = DESCRIBES typeuse +syntax descriptor hint(desc "descriptor clause") hint(macro "%" "T%") = DESCRIPTOR typeuse syntax desctype hint(desc "descriptor type") = - | describestype? descriptortype? comptype + | describes? descriptor? comptype syntax subtype hint(desc "sub type") hint(macro "%" "T%") = | SUB final? typeuse* desctype @@ -161,6 +161,9 @@ var t : valtype var at : addrtype ;; var bt : blocktype ;; defined below var ct : comptype +var dct : desctype +var dcs : describes +var dcr : descriptor var dt : deftype var edt : exactdeftype var et : elemtype @@ -360,8 +363,8 @@ def $subst_valtype(valtype, typevar*, typeuse*) : valtype hint(show def $subst_packtype(packtype, typevar*, typeuse*) : packtype hint(show %#`[%:=%]) hint(macro "%subst") def $subst_storagetype(storagetype, typevar*, typeuse*) : storagetype hint(show %#`[%:=%]) hint(macro "%subst") def $subst_fieldtype(fieldtype, typevar*, typeuse*) : fieldtype hint(show %#`[%:=%]) hint(macro "%subst") -def $subst_describestype(describestype, typevar*, typeuse*) : describestype hint(show %#`[%:=%]) hint(macro "%subst") -def $subst_descriptortype(descriptortype, typevar*, typeuse*) : descriptortype hint(show %#`[%:=%]) hint(macro "%subst") +def $subst_describes(describes, typevar*, typeuse*) : describes hint(show %#`[%:=%]) hint(macro "%subst") +def $subst_descriptor(descriptor, typevar*, typeuse*) : descriptor hint(show %#`[%:=%]) hint(macro "%subst") def $subst_comptype(comptype, typevar*, typeuse*) : comptype hint(show %#`[%:=%]) hint(macro "%subst") def $subst_desctype(desctype, typevar*, typeuse*) : desctype hint(show %#`[%:=%]) hint(macro "%subst") @@ -411,14 +414,14 @@ def $subst_comptype((STRUCT ft*), tv*, tu*) = STRUCT $subst_fieldtype(ft, tv*, t def $subst_comptype((ARRAY ft), tv*, tu*) = ARRAY $subst_fieldtype(ft, tv*, tu*) def $subst_comptype((FUNC t_1* -> t_2*), tv*, tu*) = FUNC $subst_valtype(t_1, tv*, tu*)* -> $subst_valtype(t_2, tv*, tu*)* -def $subst_describestype(DESCRIBES tu', tv*, tu*) = DESCRIBES $subst_typeuse(tu', tv*, tu*) -def $subst_descriptortype(DESCRIPTOR tu', tv*, tu*) = DESCRIPTOR $subst_typeuse(tu', tv*, tu*) +def $subst_describes(DESCRIBES tu', tv*, tu*) = DESCRIBES $subst_typeuse(tu', tv*, tu*) +def $subst_descriptor(DESCRIPTOR tu', tv*, tu*) = DESCRIPTOR $subst_typeuse(tu', tv*, tu*) -def $subst_desctype(dc1? dc2? ct, tv*, tu*) = - $subst_describestype(dc1, tv*, tu*)? $subst_descriptortype(dc2, tv*, tu*)? $subst_comptype(ct, tv*, tu*) +def $subst_desctype(dcs? dcr? ct, tv*, tu*) = + $subst_describes(dcs, tv*, tu*)? $subst_descriptor(dcr, tv*, tu*)? $subst_comptype(ct, tv*, tu*) -def $subst_subtype((SUB final? tu'* desctype), tv*, tu*) = - SUB final? $subst_typeuse(tu', tv*, tu*)* $subst_desctype(desctype, tv*, tu*) +def $subst_subtype((SUB final? tu'* dct), tv*, tu*) = + SUB final? $subst_typeuse(tu', tv*, tu*)* $subst_desctype(dct, tv*, tu*) def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) def $minus_recs(eps, eps) = (eps, eps) @@ -510,8 +513,8 @@ def $free_resulttype(resulttype) : free def $free_storagetype(storagetype) : free def $free_fieldtype(fieldtype) : free def $free_comptype(comptype) : free -def $free_describestype(describestype) : free -def $free_descriptortype(descriptortype) : free +def $free_describes(describes) : free +def $free_descriptor(descriptor) : free def $free_desctype(desctype) : free def $free_subtype(subtype) : free def $free_rectype(rectype) : free @@ -572,14 +575,14 @@ def $free_comptype(STRUCT fieldtype*) = $free_list($free_fieldtype(fieldtype)*) def $free_comptype(ARRAY fieldtype) = $free_fieldtype(fieldtype) def $free_comptype(FUNC resulttype_1 -> resulttype_2) = $free_resulttype(resulttype_1) ++ $free_resulttype(resulttype_2) -def $free_describestype(DESCRIBES tu) = $free_typeuse(tu) -def $free_descriptortype(DESCRIPTOR tu) = $free_typeuse(tu) +def $free_describes(DESCRIBES tu) = $free_typeuse(tu) +def $free_descriptor(DESCRIPTOR tu) = $free_typeuse(tu) -def $free_desctype(dc1? dc2? ct) = - $free_opt($free_describestype(dc1)?) ++ $free_opt($free_descriptortype(dc2)?) ++ $free_comptype(ct) +def $free_desctype(dcs? dcr? ct) = + $free_opt($free_describes(dcs)?) ++ $free_opt($free_descriptor(dcr)?) ++ $free_comptype(ct) -def $free_subtype(SUB final? typeuse* desctype) = - $free_list($free_typeuse(typeuse)*) ++ $free_desctype(desctype) +def $free_subtype(SUB final? typeuse* dct) = + $free_list($free_typeuse(typeuse)*) ++ $free_desctype(dct) def $free_rectype(REC subtype*) = $free_list($free_subtype(subtype)*) diff --git a/specification/wasm-latest/2.3-validation.instructions.spectec b/specification/wasm-latest/2.3-validation.instructions.spectec index 5f534b803..f13539c41 100644 --- a/specification/wasm-latest/2.3-validation.instructions.spectec +++ b/specification/wasm-latest/2.3-validation.instructions.spectec @@ -119,7 +119,7 @@ rule Instr_ok/br_on_cast_desc_eq: C |- BR_ON_CAST_DESC_EQ l rt_1 rt_2 : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* ($diffrt(rt_1, rt_2)) -- if C.LABELS[l] = t* rt -- if rt_2 = (REF null? (_HT exact? _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) ct ---- -- Reftype_ok: C |- rt_1 : OK -- Reftype_ok: C |- rt_3 : OK @@ -131,7 +131,7 @@ rule Instr_ok/br_on_cast_desc_eq_fail: C |- BR_ON_CAST_DESC_EQ_FAIL l rt_1 rt_2 : t* rt_1 (REF NULL (_HT exact? _IDX y)) -> t* rt_2 -- if C.LABELS[l] = t* rt -- if rt_2 = (REF null? (_HT exact? _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) ct ---- -- Reftype_ok: C |- rt_1 : OK -- Reftype_ok: C |- rt_3 : OK @@ -256,7 +256,7 @@ rule Instr_ok/ref.eq: rule Instr_ok/ref.get_desc: C |- REF.GET_DESC x : (REF NULL (_HT exact? _IDX x)) -> (REF (_HT exact? _IDX y)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) ct rule Instr_ok/ref.test: C |- REF.TEST rt : rt' -> I32 @@ -273,7 +273,7 @@ rule Instr_ok/ref.cast: rule Instr_ok/ref.cast_desc_eq: C |- REF.CAST_DESC_EQ rt : (REF NULL ht) (REF NULL (_HT exact? _IDX y)) -> rt -- if rt = (REF null? (_HT exact? _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) ct + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) ct ---- -- Heaptype_ok: C |- ht : OK -- Heaptype_sub: C |- (_HT exact? _IDX x) <: ht @@ -289,20 +289,20 @@ rule Instr_ok/i31.get: rule Instr_ok/struct.new: C |- STRUCT.NEW x : $unpack(zt)* -> (REF (_HT EXACT _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? eps STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~ dcs? eps STRUCT (mut? zt)* rule Instr_ok/struct.new_default: C |- STRUCT.NEW_DEFAULT x : eps -> (REF (_HT EXACT _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? eps STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~ dcs? eps STRUCT (mut? zt)* -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* rule Instr_ok/struct.new_desc: C |- STRUCT.NEW_DESC x : $unpack(zt)* (REF NULL (_HT EXACT _IDX y)) -> (REF (_HT EXACT _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) STRUCT (mut? zt)* rule Instr_ok/struct.new_default_desc: C |- STRUCT.NEW_DEFAULT_DESC x : (REF NULL (_HT EXACT _IDX y)) -> (REF (_HT EXACT _IDX x)) - -- Expand_desc: C.TYPES[x] ~ describestype? (DESCRIPTOR (_IDX y)) STRUCT (mut? zt)* + -- Expand_desc: C.TYPES[x] ~ dcs? (DESCRIPTOR (_IDX y)) STRUCT (mut? zt)* -- (Defaultable: |- $unpack(zt) DEFAULTABLE)* def $is_packtype(storagetype) : bool hint(show %1 =/= $unpack(%1)) hint(prose "%1 is a packed type") diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index bd76d4a58..d41be2e68 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -1144,17 +1144,17 @@ syntax comptype = | ARRAY(fieldtype) | `FUNC%->%`(resulttype : resulttype, resulttype : resulttype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:125.1-125.90 -syntax describestype = +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:125.1-125.88 +syntax describes = | DESCRIBES(typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:126.1-126.93 -syntax descriptortype = +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:126.1-126.91 +syntax descriptor = | DESCRIPTOR(typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:128.1-129.44 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:128.1-129.36 syntax desctype = - | `%%%`(`describestype?` : describestype?, `descriptortype?` : descriptortype?, comptype : comptype) + | `%%%`(`describes?` : describes?, `descriptor?` : descriptor?, comptype : comptype) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:131.1-132.33 syntax subtype = @@ -1546,13 +1546,13 @@ def $as_deftype(typeuse : typeuse) : deftype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:321.1-321.87 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:324.1-324.87 def $tagsxt(externtype*) : tagtype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:327.1-327.23 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:330.1-330.23 def $tagsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:328.1-328.44 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:331.1-331.44 def $tagsxt{jt : tagtype, `xt*` : externtype*}([TAG_externtype(jt)] ++ xt*{xt <- `xt*`}) = [jt] ++ $tagsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:329.1-329.57 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:332.1-332.57 def $tagsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tagsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1560,13 +1560,13 @@ def $tagsxt(externtype*) : tagtype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:322.1-322.90 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:325.1-325.90 def $globalsxt(externtype*) : globaltype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:331.1-331.26 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:334.1-334.26 def $globalsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:332.1-332.53 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:335.1-335.53 def $globalsxt{gt : globaltype, `xt*` : externtype*}([GLOBAL_externtype(gt)] ++ xt*{xt <- `xt*`}) = [gt] ++ $globalsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:333.1-333.63 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:336.1-336.63 def $globalsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $globalsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1574,13 +1574,13 @@ def $globalsxt(externtype*) : globaltype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:323.1-323.87 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:326.1-326.87 def $memsxt(externtype*) : memtype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:335.1-335.23 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:338.1-338.23 def $memsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:336.1-336.44 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:339.1-339.44 def $memsxt{mt : memtype, `xt*` : externtype*}([MEM_externtype(mt)] ++ xt*{xt <- `xt*`}) = [mt] ++ $memsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:337.1-337.57 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:340.1-340.57 def $memsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $memsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1588,13 +1588,13 @@ def $memsxt(externtype*) : memtype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:324.1-324.89 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:327.1-327.89 def $tablesxt(externtype*) : tabletype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:339.1-339.25 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:342.1-342.25 def $tablesxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:340.1-340.50 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:343.1-343.50 def $tablesxt{tt : tabletype, `xt*` : externtype*}([TABLE_externtype(tt)] ++ xt*{xt <- `xt*`}) = [tt] ++ $tablesxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:341.1-341.61 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:344.1-344.61 def $tablesxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $tablesxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1602,13 +1602,13 @@ def $tablesxt(externtype*) : tabletype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:325.1-325.88 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:328.1-328.88 def $funcsxt(externtype*) : exactdeftype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:343.1-343.24 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:346.1-346.24 def $funcsxt([]) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:344.1-344.49 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:347.1-347.49 def $funcsxt{edt : exactdeftype, `xt*` : externtype*}([FUNC_externtype(edt : exactdeftype <: exacttypeuse)] ++ xt*{xt <- `xt*`}) = [edt] ++ $funcsxt(xt*{xt <- `xt*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:345.1-345.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:348.1-348.59 def $funcsxt{externtype : externtype, `xt*` : externtype*}([externtype] ++ xt*{xt <- `xt*`}) = $funcsxt(xt*{xt <- `xt*`}) -- otherwise } @@ -1616,14 +1616,14 @@ def $funcsxt(externtype*) : exactdeftype* ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:350.1-350.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:353.1-353.112 def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:381.1-381.38 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:384.1-384.38 def $subst_typevar{tv : typevar}(tv, [], []) = (tv : typevar <: typeuse) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:382.1-382.95 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:385.1-385.95 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = tu_1 -- if (tv = tv_1) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:383.1-383.92 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:386.1-386.92 def $subst_typevar{tv : typevar, tv_1 : typevar, `tv'*` : typevar*, tu_1 : typeuse, `tu'*` : typeuse*}(tv, [tv_1] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) = $subst_typevar(tv, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) -- otherwise } @@ -1631,13 +1631,13 @@ def $subst_typevar(typevar : typevar, typevar*, typeuse*) : typeuse ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:423.1-423.59 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:426.1-426.59 def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:424.1-424.39 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:427.1-427.39 def $minus_recs([], []) = ([], []) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:425.1-425.63 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:428.1-428.63 def $minus_recs{n : n, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*}([REC_typevar(n)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:426.1-427.45 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:429.1-430.45 def $minus_recs{x : idx, `tv*` : typevar*, tu_1 : typeuse, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}([_IDX_typevar(x)] ++ tv*{tv <- `tv*`}, [tu_1] ++ tu*{tu <- `tu*`}) = ([_IDX_typevar(x)] ++ tv'*{tv' <- `tv'*`}, [tu_1] ++ tu'*{tu' <- `tu'*`}) -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) } @@ -1660,89 +1660,89 @@ def $subst_vectype(vectype : vectype, typevar*, typeuse*) : vectype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:351.1-351.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:354.1-354.112 def $subst_typeuse(typeuse : typeuse, typevar*, typeuse*) : typeuse - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:385.1-385.66 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:388.1-388.66 def $subst_typeuse{tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}((tv' : typevar <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:386.1-386.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:389.1-389.64 def $subst_typeuse{dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}((dt : deftype <: typeuse), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:356.1-356.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:359.1-359.112 def $subst_heaptype(heaptype : heaptype, typevar*, typeuse*) : heaptype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:392.1-392.89 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:395.1-395.89 def $subst_heaptype{`exact?` : exact?, tv' : typevar, `tv*` : typevar*, `tu*` : typeuse*}(_HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, (tv' : typevar <: typeuse))), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, $subst_typevar(tv', tv*{tv <- `tv*`}, tu*{tu <- `tu*`}))) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:393.1-393.87 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:396.1-396.87 def $subst_heaptype{`exact?` : exact?, dt : deftype, `tv*` : typevar*, `tu*` : typeuse*}(_HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, (dt : deftype <: typeuse))), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, ($subst_deftype(dt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : deftype <: typeuse))) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:394.1-394.53 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:397.1-397.53 def $subst_heaptype{ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ht -- otherwise -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:357.1-357.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:360.1-360.112 def $subst_reftype(reftype : reftype, typevar*, typeuse*) : reftype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:396.1-396.87 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:399.1-399.87 def $subst_reftype{`null?` : null?, ht : heaptype, `tv*` : typevar*, `tu*` : typeuse*}(REF_reftype(null?{null <- `null?`}, ht), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REF_reftype(null?{null <- `null?`}, $subst_heaptype(ht, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:358.1-358.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:361.1-361.112 def $subst_valtype(valtype : valtype, typevar*, typeuse*) : valtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:398.1-398.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.64 def $subst_valtype{nt : numtype, `tv*` : typevar*, `tu*` : typeuse*}((nt : numtype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_numtype(nt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : numtype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:399.1-399.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:402.1-402.64 def $subst_valtype{vt : vectype, `tv*` : typevar*, `tu*` : typeuse*}((vt : vectype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_vectype(vt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : vectype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:400.1-400.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:403.1-403.64 def $subst_valtype{rt : reftype, `tv*` : typevar*, `tu*` : typeuse*}((rt : reftype <: valtype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_reftype(rt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : reftype <: valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.40 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:404.1-404.40 def $subst_valtype{`tv*` : typevar*, `tu*` : typeuse*}(BOT_valtype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = BOT_valtype -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:361.1-361.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:364.1-364.112 def $subst_storagetype(storagetype : storagetype, typevar*, typeuse*) : storagetype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:405.1-405.66 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:408.1-408.66 def $subst_storagetype{t : valtype, `tv*` : typevar*, `tu*` : typeuse*}((t : valtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_valtype(t, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : valtype <: storagetype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:406.1-406.69 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:409.1-409.69 def $subst_storagetype{pt : packtype, `tv*` : typevar*, `tu*` : typeuse*}((pt : packtype <: storagetype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ($subst_packtype(pt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) : packtype <: storagetype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:362.1-362.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:365.1-365.112 def $subst_fieldtype(fieldtype : fieldtype, typevar*, typeuse*) : fieldtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:408.1-408.82 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:411.1-411.82 def $subst_fieldtype{`mut?` : mut?, zt : storagetype, `tv*` : typevar*, `tu*` : typeuse*}(`%%`_fieldtype(mut?{mut <- `mut?`}, zt), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%`_fieldtype(mut?{mut <- `mut?`}, $subst_storagetype(zt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:363.1-363.122 -def $subst_describestype(describestype : describestype, typevar*, typeuse*) : describestype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:414.1-414.92 - def $subst_describestype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIBES_describestype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIBES_describestype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:366.1-366.112 +def $subst_describes(describes : describes, typevar*, typeuse*) : describes + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:417.1-417.88 + def $subst_describes{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIBES_describes(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIBES_describes($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:364.1-364.122 -def $subst_descriptortype(descriptortype : descriptortype, typevar*, typeuse*) : descriptortype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:415.1-415.95 - def $subst_descriptortype{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIPTOR_descriptortype(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIPTOR_descriptortype($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:367.1-367.112 +def $subst_descriptor(descriptor : descriptor, typevar*, typeuse*) : descriptor + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:418.1-418.91 + def $subst_descriptor{tu' : typeuse, `tv*` : typevar*, `tu*` : typeuse*}(DESCRIPTOR_descriptor(tu'), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = DESCRIPTOR_descriptor($subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:366.1-366.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:369.1-369.112 def $subst_comptype(comptype : comptype, typevar*, typeuse*) : comptype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:410.1-410.85 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:413.1-413.85 def $subst_comptype{`ft*` : fieldtype*, `tv*` : typevar*, `tu*` : typeuse*}(STRUCT_comptype(`%`_list(ft*{ft <- `ft*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = STRUCT_comptype(`%`_list($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{ft <- `ft*`},)) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:411.1-411.81 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:414.1-414.81 def $subst_comptype{ft : fieldtype, `tv*` : typevar*, `tu*` : typeuse*}(ARRAY_comptype(ft), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = ARRAY_comptype($subst_fieldtype(ft, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:412.1-412.123 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:415.1-415.123 def $subst_comptype{`t_1*` : valtype*, `t_2*` : valtype*, `tv*` : typevar*, `tu*` : typeuse*}(`FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `FUNC%->%`_comptype(`%`_resulttype($subst_valtype(t_1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_1 <- `t_1*`},), `%`_resulttype($subst_valtype(t_2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{t_2 <- `t_2*`},)) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:367.1-367.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:370.1-370.112 def $subst_desctype(desctype : desctype, typevar*, typeuse*) : desctype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:417.1-418.107 - def $subst_desctype{`dc1?` : describestype?, `dc2?` : descriptortype?, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_desctype(dc1?{dc1 <- `dc1?`}, dc2?{dc2 <- `dc2?`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_desctype($subst_describestype(dc1, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dc1 <- `dc1?`}, $subst_descriptortype(dc2, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dc2 <- `dc2?`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:420.1-421.99 + def $subst_desctype{`dcs?` : describes?, `dcr?` : descriptor?, ct : comptype, `tv*` : typevar*, `tu*` : typeuse*}(`%%%`_desctype(dcs?{dcs <- `dcs?`}, dcr?{dcr <- `dcr?`}, ct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = `%%%`_desctype($subst_describes(dcs, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dcs <- `dcs?`}, $subst_descriptor(dcr, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})?{dcr <- `dcr?`}, $subst_comptype(ct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:368.1-368.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:371.1-371.112 def $subst_subtype(subtype : subtype, typevar*, typeuse*) : subtype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:420.1-421.80 - def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, desctype : desctype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, desctype), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_desctype(desctype, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:423.1-424.75 + def $subst_subtype{`final?` : final?, `tu'*` : typeuse*, dct : desctype, `tv*` : typevar*, `tu*` : typeuse*}(SUB_subtype(final?{final <- `final?`}, tu'*{tu' <- `tu'*`}, dct), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = SUB_subtype(final?{final <- `final?`}, $subst_typeuse(tu', tv*{tv <- `tv*`}, tu*{tu <- `tu*`})*{tu' <- `tu'*`}, $subst_desctype(dct, tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:369.1-369.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:372.1-372.112 def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:429.1-430.45 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:432.1-433.45 def $subst_rectype{`st*` : subtype*, `tv*` : typevar*, `tu*` : typeuse*, `tv'*` : typevar*, `tu'*` : typeuse*}(REC_rectype(`%`_list(st*{st <- `st*`},)), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = REC_rectype(`%`_list($subst_subtype(st, tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`})*{st <- `st*`},)) -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = $minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`})) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:370.1-370.112 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:373.1-373.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:435.1-435.80 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:438.1-438.80 def $subst_deftype{qt : rectype, i : n, `tv*` : typevar*, `tu*` : typeuse*}(_DEF_deftype(qt, i), tv*{tv <- `tv*`}, tu*{tu <- `tu*`}) = _DEF_deftype($subst_rectype(qt, tv*{tv <- `tv*`}, tu*{tu <- `tu*`}), i) } @@ -1837,11 +1837,11 @@ def $subst_all_moduletype(moduletype : moduletype, typeuse*) : moduletype ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:473.1-473.97 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:476.1-476.97 def $subst_all_deftypes(deftype*, typeuse*) : deftype* - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:474.1-474.40 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:477.1-477.40 def $subst_all_deftypes{`tu*` : typeuse*}([], tu*{tu <- `tu*`}) = [] - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:475.1-475.101 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:478.1-478.101 def $subst_all_deftypes{dt_1 : deftype, `dt*` : deftype*, `tu*` : typeuse*}([dt_1] ++ dt*{dt <- `dt*`}, tu*{tu <- `tu*`}) = [$subst_all_deftype(dt_1, tu*{tu <- `tu*`})] ++ $subst_all_deftypes(dt*{dt <- `dt*`}, tu*{tu <- `tu*`}) } @@ -1918,90 +1918,90 @@ def $free_typevar(typevar : typevar) : free ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:503.1-503.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:506.1-506.36 def $free_heaptype(heaptype : heaptype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:554.1-554.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:557.1-557.65 def $free_heaptype{absheaptype : absheaptype}((absheaptype : absheaptype <: heaptype)) = $free_absheaptype(absheaptype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:555.1-555.64 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:558.1-558.64 def $free_heaptype{typeuse : typeuse}(_HT_heaptype(`%%`_exacttypeuse(EXACT_exact?{}, typeuse))) = $free_typeuse(typeuse) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:504.1-504.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:507.1-507.34 def $free_reftype(reftype : reftype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:557.1-557.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:560.1-560.65 def $free_reftype{`null?` : null?, heaptype : heaptype}(REF_reftype(null?{null <- `null?`}, heaptype)) = $free_heaptype(heaptype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:506.1-506.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:509.1-509.34 def $free_typeuse(typeuse : typeuse) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:551.1-551.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:554.1-554.52 def $free_typeuse{typevar : typevar}((typevar : typevar <: typeuse)) = $free_typevar(typevar) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:552.1-552.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:555.1-555.52 def $free_typeuse{deftype : deftype}((deftype : deftype <: typeuse)) = $free_deftype(deftype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:507.1-507.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:510.1-510.34 def $free_valtype(valtype : valtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:559.1-559.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:562.1-562.52 def $free_valtype{numtype : numtype}((numtype : numtype <: valtype)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:560.1-560.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:563.1-563.52 def $free_valtype{vectype : vectype}((vectype : vectype <: valtype)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:561.1-561.52 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:564.1-564.52 def $free_valtype{reftype : reftype}((reftype : reftype <: valtype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:562.1-562.28 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:565.1-565.28 def $free_valtype(BOT_valtype) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:509.1-509.40 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:512.1-512.40 def $free_resulttype(resulttype : resulttype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:564.1-564.69 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:567.1-567.69 def $free_resulttype{`valtype*` : valtype*}(`%`_resulttype(valtype*{valtype <- `valtype*`},)) = $free_list($free_valtype(valtype)*{valtype <- `valtype*`}) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:510.1-510.42 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:513.1-513.42 def $free_storagetype(storagetype : storagetype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:566.1-566.56 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:569.1-569.56 def $free_storagetype{valtype : valtype}((valtype : valtype <: storagetype)) = $free_valtype(valtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:567.1-567.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:570.1-570.59 def $free_storagetype{packtype : packtype}((packtype : packtype <: storagetype)) = $free_packtype(packtype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:511.1-511.38 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:514.1-514.38 def $free_fieldtype(fieldtype : fieldtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:569.1-569.71 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:572.1-572.71 def $free_fieldtype{`mut?` : mut?, storagetype : storagetype}(`%%`_fieldtype(mut?{mut <- `mut?`}, storagetype)) = $free_storagetype(storagetype) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:512.1-512.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:515.1-515.36 def $free_comptype(comptype : comptype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:571.1-571.80 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:574.1-574.80 def $free_comptype{`fieldtype*` : fieldtype*}(STRUCT_comptype(`%`_list(fieldtype*{fieldtype <- `fieldtype*`},))) = $free_list($free_fieldtype(fieldtype)*{fieldtype <- `fieldtype*`}) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:572.1-572.65 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:575.1-575.65 def $free_comptype{fieldtype : fieldtype}(ARRAY_comptype(fieldtype)) = $free_fieldtype(fieldtype) - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:573.1-573.121 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:576.1-576.121 def $free_comptype{resulttype_1 : resulttype, resulttype_2 : resulttype}(`FUNC%->%`_comptype(resulttype_1, resulttype_2)) = $free_resulttype(resulttype_1) +++ $free_resulttype(resulttype_2) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:513.1-513.46 -def $free_describestype(describestype : describestype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:575.1-575.58 - def $free_describestype{tu : typeuse}(DESCRIBES_describestype(tu)) = $free_typeuse(tu) +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:516.1-516.38 +def $free_describes(describes : describes) : free + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:578.1-578.54 + def $free_describes{tu : typeuse}(DESCRIBES_describes(tu)) = $free_typeuse(tu) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:514.1-514.48 -def $free_descriptortype(descriptortype : descriptortype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:576.1-576.60 - def $free_descriptortype{tu : typeuse}(DESCRIPTOR_descriptortype(tu)) = $free_typeuse(tu) +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:517.1-517.40 +def $free_descriptor(descriptor : descriptor) : free + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:579.1-579.56 + def $free_descriptor{tu : typeuse}(DESCRIPTOR_descriptor(tu)) = $free_typeuse(tu) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:515.1-515.36 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:518.1-518.36 def $free_desctype(desctype : desctype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:578.1-579.102 - def $free_desctype{`dc1?` : describestype?, `dc2?` : descriptortype?, ct : comptype}(`%%%`_desctype(dc1?{dc1 <- `dc1?`}, dc2?{dc2 <- `dc2?`}, ct)) = $free_opt($free_describestype(dc1)?{dc1 <- `dc1?`}) +++ $free_opt($free_descriptortype(dc2)?{dc2 <- `dc2?`}) +++ $free_comptype(ct) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:581.1-582.94 + def $free_desctype{`dcs?` : describes?, `dcr?` : descriptor?, ct : comptype}(`%%%`_desctype(dcs?{dcs <- `dcs?`}, dcr?{dcr <- `dcr?`}, ct)) = $free_opt($free_describes(dcs)?{dcs <- `dcs?`}) +++ $free_opt($free_descriptor(dcr)?{dcr <- `dcr?`}) +++ $free_comptype(ct) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:516.1-516.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:519.1-519.34 def $free_subtype(subtype : subtype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:581.1-582.66 - def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, desctype : desctype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, desctype)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_desctype(desctype) + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:584.1-585.61 + def $free_subtype{`final?` : final?, `typeuse*` : typeuse*, dct : desctype}(SUB_subtype(final?{final <- `final?`}, typeuse*{typeuse <- `typeuse*`}, dct)) = $free_list($free_typeuse(typeuse)*{typeuse <- `typeuse*`}) +++ $free_desctype(dct) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:517.1-517.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:520.1-520.34 def $free_rectype(rectype : rectype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:584.1-584.70 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:587.1-587.70 def $free_rectype{`subtype*` : subtype*}(REC_rectype(`%`_list(subtype*{subtype <- `subtype*`},))) = $free_list($free_subtype(subtype)*{subtype <- `subtype*`}) -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:545.1-545.34 +;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:548.1-548.34 def $free_deftype(deftype : deftype) : free - ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:546.1-546.59 + ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:549.1-549.59 def $free_deftype{rectype : rectype, n : n}(_DEF_deftype(rectype, n)) = $free_rectype(rectype) } @@ -3415,7 +3415,7 @@ relation Comptype_ok: `%|-%:OK`(context, comptype) relation Desctype_ok: `%|-%:OK`(context, desctype) ;; ../../../../specification/wasm-latest/2.1-validation.types.spectec:157.1-161.31 rule _{C : context, `tu_1?` : typeuse?, `tu_2?` : typeuse?, ct : comptype}: - `%|-%:OK`(C, `%%%`_desctype(DESCRIBES_describestype(tu_1)?{tu_1 <- `tu_1?`}, DESCRIPTOR_descriptortype(tu_2)?{tu_2 <- `tu_2?`}, ct)) + `%|-%:OK`(C, `%%%`_desctype(DESCRIBES_describes(tu_1)?{tu_1 <- `tu_1?`}, DESCRIPTOR_descriptor(tu_2)?{tu_2 <- `tu_2?`}, ct)) -- (Typeuse_ok: `%|-%:OK`(C, tu_1))?{tu_1 <- `tu_1?`} -- (Typeuse_ok: `%|-%:OK`(C, tu_2))?{tu_2 <- `tu_2?`} -- Comptype_ok: `%|-%:OK`(C, ct) @@ -3475,7 +3475,7 @@ relation Comptype_sub: `%|-%<:%`(context, comptype, comptype) relation Desctype_sub: `%|-%<:%`(context, desctype, desctype) ;; ../../../../specification/wasm-latest/2.2-validation.subtyping.spectec:202.1-206.37 rule _{C : context, tu_11 : typeuse, tu_12 : typeuse, ct_1 : comptype, tu_21 : typeuse, tu_22 : typeuse, ct_2 : comptype}: - `%|-%<:%`(C, `%%%`_desctype(?(DESCRIBES_describestype(tu_11)), ?(DESCRIPTOR_descriptortype(tu_12)), ct_1), `%%%`_desctype(?(DESCRIBES_describestype(tu_21)), ?(DESCRIPTOR_descriptortype(tu_22)), ct_2)) + `%|-%<:%`(C, `%%%`_desctype(?(DESCRIBES_describes(tu_11)), ?(DESCRIPTOR_descriptor(tu_12)), ct_1), `%%%`_desctype(?(DESCRIBES_describes(tu_21)), ?(DESCRIPTOR_descriptor(tu_22)), ct_2)) -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(`%%`_exacttypeuse(?(), tu_11)), _HT_heaptype(`%%`_exacttypeuse(?(), tu_21))) -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(`%%`_exacttypeuse(?(), tu_12)), _HT_heaptype(`%%`_exacttypeuse(?(), tu_22))) -- Comptype_sub: `%|-%<:%`(C, ct_1, ct_2) @@ -4061,11 +4061,11 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, $diffrt(rt_1, rt_2), rt) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:118.1-128.34 - rule br_on_cast_desc_eq{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + rule br_on_cast_desc_eq{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `dcs?` : describes?, ct : comptype, rt_3 : reftype}: `%|-%:%`(C, BR_ON_CAST_DESC_EQ_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype(t*{t <- `t*`} ++ [($diffrt(rt_1, rt_2) : reftype <: valtype)],))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) -- if (rt_2 = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), ct)) -- Reftype_ok: `%|-%:OK`(C, rt_1) -- Reftype_ok: `%|-%:OK`(C, rt_3) -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) @@ -4073,11 +4073,11 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt_2, rt) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:130.1-140.49 - rule br_on_cast_desc_eq_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype, rt_3 : reftype}: + rule br_on_cast_desc_eq_fail{C : context, l : labelidx, rt_1 : reftype, rt_2 : reftype, `t*` : valtype*, `exact?` : exact?, y : idx, rt : reftype, `null?` : null?, x : idx, `dcs?` : describes?, ct : comptype, rt_3 : reftype}: `%|-%:%`(C, BR_ON_CAST_DESC_EQ_FAIL_instr(l, rt_1, rt_2), `%->_%%`_instrtype(`%`_resulttype(t*{t <- `t*`} ++ [(rt_1 : reftype <: valtype) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype(t*{t <- `t*`} ++ [(rt_2 : reftype <: valtype)],))) -- if (C.LABELS_context[l!`%`_labelidx.0] = `%`_resulttype(t*{t <- `t*`} ++ [(rt : reftype <: valtype)],)) -- if (rt_2 = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), ct)) -- Reftype_ok: `%|-%:OK`(C, rt_1) -- Reftype_ok: `%|-%:OK`(C, rt_3) -- Reftype_sub: `%|-%<:%`(C, rt_1, rt_3) @@ -4182,10 +4182,10 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule `ref.eq`{C : context}: `%|-%:%`(C, `REF.EQ`_instr, `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), EQ_heaptype) REF_valtype(?(NULL_null), EQ_heaptype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:257.1-259.71 - rule `ref.get_desc`{C : context, x : idx, `exact?` : exact?, y : idx, `describestype?` : describestype?, ct : comptype}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:257.1-259.61 + rule `ref.get_desc`{C : context, x : idx, `exact?` : exact?, y : idx, `dcs?` : describes?, ct : comptype}: `%|-%:%`(C, `REF.GET_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), ct)) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:261.1-265.33 rule `ref.test`{C : context, rt : reftype, rt' : reftype}: @@ -4202,10 +4202,10 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) -- Reftype_sub: `%|-%<:%`(C, rt, rt') ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:273.1-279.50 - rule `ref.cast_desc_eq`{C : context, rt : reftype, ht : heaptype, `exact?` : exact?, y : idx, `null?` : null?, x : idx, `describestype?` : describestype?, ct : comptype}: + rule `ref.cast_desc_eq`{C : context, rt : reftype, ht : heaptype, `exact?` : exact?, y : idx, `null?` : null?, x : idx, `dcs?` : describes?, ct : comptype}: `%|-%:%`(C, `REF.CAST_DESC_EQ`_instr(rt), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), ht) REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(y))))],), [], `%`_resulttype([(rt : reftype <: valtype)],))) -- if (rt = REF_reftype(null?{null <- `null?`}, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), ct)) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), ct)) -- Heaptype_ok: `%|-%:OK`(C, ht) -- Heaptype_sub: `%|-%<:%`(C, _HT_heaptype(`%%`_exacttypeuse(exact?{exact <- `exact?`}, _IDX_typeuse(x))), ht) @@ -4213,26 +4213,26 @@ relation Instr_ok: `%|-%:%`(context, instr, instrtype) rule `i31.get`{C : context, sx : sx}: `%|-%:%`(C, `I31.GET`_instr(sx), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), I31_heaptype)],), [], `%`_resulttype([I32_valtype],))) - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:290.1-292.68 - rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `describestype?` : describestype?, `mut?*` : mut?*}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:290.1-292.58 + rule `struct.new`{C : context, x : idx, `zt*` : storagetype*, `dcs?` : describes?, `mut?*` : mut?*}: `%|-%:%`(C, `STRUCT.NEW`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`},), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:294.1-297.48 - rule `struct.new_default`{C : context, x : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: + rule `struct.new_default`{C : context, x : idx, `dcs?` : describes?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, `STRUCT.NEW_DEFAULT`_instr(x), `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} - ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:299.1-301.86 - rule `struct.new_desc`{C : context, x : idx, `zt*` : storagetype*, y : idx, `describestype?` : describestype?, `mut?*` : mut?*}: + ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:299.1-301.76 + rule `struct.new_desc`{C : context, x : idx, `zt*` : storagetype*, y : idx, `dcs?` : describes?, `mut?*` : mut?*}: `%|-%:%`(C, `STRUCT.NEW_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype($unpack(zt)*{zt <- `zt*`} ++ [REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(y))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:303.1-306.48 - rule `struct.new_default_desc`{C : context, x : idx, y : idx, `describestype?` : describestype?, `mut?*` : mut?*, `zt*` : storagetype*}: + rule `struct.new_default_desc`{C : context, x : idx, y : idx, `dcs?` : describes?, `mut?*` : mut?*, `zt*` : storagetype*}: `%|-%:%`(C, `STRUCT.NEW_DEFAULT_DESC`_instr(x), `%->_%%`_instrtype(`%`_resulttype([REF_valtype(?(NULL_null), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(y))))],), [], `%`_resulttype([REF_valtype(?(), _HT_heaptype(`%%`_exacttypeuse(?(EXACT_exact), _IDX_typeuse(x))))],))) - -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(describestype?{describestype <- `describestype?`}, ?(DESCRIPTOR_descriptortype(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) + -- Expand_desc: `%~%`(C.TYPES_context[x!`%`_idx.0], `%%%`_desctype(dcs?{dcs <- `dcs?`}, ?(DESCRIPTOR_descriptor(_IDX_typeuse(y))), STRUCT_comptype(`%`_list(`%%`_fieldtype(mut?{mut <- `mut?`}, zt)*{`mut?` <- `mut?*`, zt <- `zt*`},)))) -- (Defaultable: `|-%DEFAULTABLE`($unpack(zt),))*{zt <- `zt*`} ;; ../../../../specification/wasm-latest/2.3-validation.instructions.spectec:311.1-315.41 From 8c2db5ede414af797d3f0f94042c4e03e76cb518 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Sat, 24 Oct 2026 00:57:12 -0700 Subject: [PATCH 23/24] [spec] Update binary format for describes/descriptor rename --- document/core/binary/types.rst | 6 +++--- document/core/util/macros.def | 4 ++-- .../wasm-latest/5.2-binary.types.spectec | 16 +++++++-------- spectec/test-frontend/TEST.md | 20 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/document/core/binary/types.rst b/document/core/binary/types.rst index 726b13681..87357fb2c 100644 --- a/document/core/binary/types.rst +++ b/document/core/binary/types.rst @@ -125,8 +125,8 @@ $${grammar: Bmut Bcomptype Bfieldtype Bstoragetype Bpacktype} .. _binary-rectype: .. _binary-subtype: .. _binary-desctype: -.. _binary-describestype: -.. _binary-descriptortype: +.. _binary-describes: +.. _binary-descriptor: Recursive Types ~~~~~~~~~~~~~~~ @@ -135,7 +135,7 @@ Recursive Types Additional shorthands are recognized for unary recursions and sub types without super types. Each :ref:`composite type ` may be preceded by a :ref:`describes ` clause encoded by the byte ${:0x4C} and a :ref:`type index `, and a :ref:`descriptor ` clause encoded by the byte ${:0x4D} and a :ref:`type index `. -$${grammar: Brectype Bsubtype Bdesctype Bdescribestype Bdescriptortype} +$${grammar: Brectype Bsubtype Bdesctype Bdescribes Bdescriptor} .. index:: limits diff --git a/document/core/util/macros.def b/document/core/util/macros.def index 6ef870f84..a6e3cb37e 100644 --- a/document/core/util/macros.def +++ b/document/core/util/macros.def @@ -844,8 +844,8 @@ .. |Bstoragetype| mathdef:: \xref{binary/types}{binary-storagetype}{\B{storagetype}} .. |Bpacktype| mathdef:: \xref{binary/types}{binary-packtype}{\B{packtype}} .. |Bcomptype| mathdef:: \xref{binary/types}{binary-comptype}{\B{comptype}} -.. |Bdescribestype| mathdef:: \xref{binary/types}{binary-describestype}{\B{describestype}} -.. |Bdescriptortype| mathdef:: \xref{binary/types}{binary-descriptortype}{\B{descriptortype}} +.. |Bdescribes| mathdef:: \xref{binary/types}{binary-describes}{\B{describes}} +.. |Bdescriptor| mathdef:: \xref{binary/types}{binary-descriptor}{\B{descriptor}} .. |Bdesctype| mathdef:: \xref{binary/types}{binary-desctype}{\B{desctype}} .. |Bsubtype| mathdef:: \xref{binary/types}{binary-subtype}{\B{subtype}} .. |Brectype| mathdef:: \xref{binary/types}{binary-rectype}{\B{rectype}} diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index 64dcea6af..b2e571f1d 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -69,22 +69,22 @@ grammar Bcomptype : comptype = | 0x5F ft*:Blist(Bfieldtype) => STRUCT ft* | 0x60 t_1*:Bresulttype t_2*:Bresulttype => FUNC t_1* -> t_2* -grammar Bdescribestype : describestype = +grammar Bdescribes : describes = | 0x4C x:Btypeidx => DESCRIBES (_IDX x) -grammar Bdescriptortype : descriptortype = +grammar Bdescriptor : descriptor = | 0x4D x:Btypeidx => DESCRIPTOR (_IDX x) grammar Bdesctype : desctype = - | d_1:Bdescribestype d_2:Bdescriptortype ct:Bcomptype => d_1 d_2 ct - | d_1:Bdescribestype ct:Bcomptype => d_1 ct - | d_2:Bdescriptortype ct:Bcomptype => d_2 ct + | dcs:Bdescribes dcr:Bdescriptor ct:Bcomptype => dcs dcr ct + | dcs:Bdescribes ct:Bcomptype => dcs ct + | dcr:Bdescriptor ct:Bcomptype => dcr ct | ct:Bcomptype => ct grammar Bsubtype : subtype = - | 0x4F x*:Blist(Btypeidx) d:Bdesctype => SUB FINAL (_IDX x)* d - | 0x50 x*:Blist(Btypeidx) d:Bdesctype => SUB (_IDX x)* d - | d:Bdesctype => SUB FINAL eps d + | 0x4F x*:Blist(Btypeidx) dct:Bdesctype => SUB FINAL (_IDX x)* dct + | 0x50 x*:Blist(Btypeidx) dct:Bdesctype => SUB (_IDX x)* dct + | dct:Bdesctype => SUB FINAL eps dct grammar Brectype : rectype = | 0x4E st*:Blist(Bsubtype) => REC st* diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 2fd1d41ab..d7cccfa5c 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -9147,34 +9147,34 @@ grammar Bcomptype : comptype prod{`t_1*` : valtype*, `t_2*` : valtype*} {{0x60} {`%`_resulttype(t_1*{t_1 <- `t_1*`},):Bresulttype} {`%`_resulttype(t_2*{t_2 <- `t_2*`},):Bresulttype}} => `FUNC%->%`_comptype(`%`_resulttype(t_1*{t_1 <- `t_1*`},), `%`_resulttype(t_2*{t_2 <- `t_2*`},)) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec -grammar Bdescribestype : describestype +grammar Bdescribes : describes ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{x : idx} {{0x4C} {x:Btypeidx}} => DESCRIBES_describestype(_IDX_typeuse(x)) + prod{x : idx} {{0x4C} {x:Btypeidx}} => DESCRIBES_describes(_IDX_typeuse(x)) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec -grammar Bdescriptortype : descriptortype +grammar Bdescriptor : descriptor ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{x : idx} {{0x4D} {x:Btypeidx}} => DESCRIPTOR_descriptortype(_IDX_typeuse(x)) + prod{x : idx} {{0x4D} {x:Btypeidx}} => DESCRIPTOR_descriptor(_IDX_typeuse(x)) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Bdesctype : desctype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{d_1 : describestype, d_2 : descriptortype, ct : comptype} {{d_1:Bdescribestype} {d_2:Bdescriptortype} {ct:Bcomptype}} => `%%%`_desctype(?(d_1), ?(d_2), ct) + prod{dcs : describes, dcr : descriptor, ct : comptype} {{dcs:Bdescribes} {dcr:Bdescriptor} {ct:Bcomptype}} => `%%%`_desctype(?(dcs), ?(dcr), ct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{d_1 : describestype, ct : comptype} {{d_1:Bdescribestype} {ct:Bcomptype}} => `%%%`_desctype(?(d_1), ?(), ct) + prod{dcs : describes, ct : comptype} {{dcs:Bdescribes} {ct:Bcomptype}} => `%%%`_desctype(?(dcs), ?(), ct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{d_2 : descriptortype, ct : comptype} {{d_2:Bdescriptortype} {ct:Bcomptype}} => `%%%`_desctype(?(), ?(d_2), ct) + prod{dcr : descriptor, ct : comptype} {{dcr:Bdescriptor} {ct:Bcomptype}} => `%%%`_desctype(?(), ?(dcr), ct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec prod{ct : comptype} ct:Bcomptype => `%%%`_desctype(?(), ?(), ct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Bsubtype : subtype ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{`x*` : idx*, d : desctype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {d:Bdesctype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, d) + prod{`x*` : idx*, dct : desctype} {{0x4F} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {dct:Bdesctype}} => SUB_subtype(?(FINAL_final), _IDX_typeuse(x)*{x <- `x*`}, dct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{`x*` : idx*, d : desctype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {d:Bdesctype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, d) + prod{`x*` : idx*, dct : desctype} {{0x50} {x*{x <- `x*`}:Blist(syntax typeidx, grammar Btypeidx)} {dct:Bdesctype}} => SUB_subtype(?(), _IDX_typeuse(x)*{x <- `x*`}, dct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec - prod{d : desctype} d:Bdesctype => SUB_subtype(?(FINAL_final), [], d) + prod{dct : desctype} dct:Bdesctype => SUB_subtype(?(FINAL_final), [], dct) ;; ../../../../specification/wasm-latest/5.2-binary.types.spectec grammar Brectype : rectype From d1f8fce3750b400eaf4f224a6f0e751ba598aed5 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 26 Oct 2026 14:07:34 -0700 Subject: [PATCH 24/24] simplify --- specification/wasm-latest/5.2-binary.types.spectec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/wasm-latest/5.2-binary.types.spectec b/specification/wasm-latest/5.2-binary.types.spectec index b2e571f1d..e83dd8178 100644 --- a/specification/wasm-latest/5.2-binary.types.spectec +++ b/specification/wasm-latest/5.2-binary.types.spectec @@ -76,10 +76,7 @@ grammar Bdescriptor : descriptor = | 0x4D x:Btypeidx => DESCRIPTOR (_IDX x) grammar Bdesctype : desctype = - | dcs:Bdescribes dcr:Bdescriptor ct:Bcomptype => dcs dcr ct - | dcs:Bdescribes ct:Bcomptype => dcs ct - | dcr:Bdescriptor ct:Bcomptype => dcr ct - | ct:Bcomptype => ct + | (dcs:Bdescribes)? (dcr:Bdescriptor)? ct:Bcomptype => dcs? dcr? ct grammar Bsubtype : subtype = | 0x4F x*:Blist(Btypeidx) dct:Bdesctype => SUB FINAL (_IDX x)* dct