diff --git a/interpreter/exec/eval.ml b/interpreter/exec/eval.ml index 33ffa9a029..ab78027fed 100644 --- a/interpreter/exec/eval.ml +++ b/interpreter/exec/eval.ml @@ -1122,8 +1122,7 @@ let rec step (c : config) : config = | Func.AstFunc (_, inst', func) -> let Func (_x, ls, es) = func.it in let m = Lib.Promise.value inst' in - let s = subst_of m in - let ts = List.map (fun {it = Local t; _} -> subst_valtype s t) ls in + let ts = List.map (fun {it = Local t; _} -> t) ls in let lvs = List.(rev (map Option.some args) @ map default_value ts) in let frame' = {inst = m; locals = List.map ref lvs} in let instr' = [Label (n2, [], ([], List.map plain es)) @@ func.at] in diff --git a/specification/wasm-3.0/4.2-execution.types.spectec b/specification/wasm-3.0/4.2-execution.types.spectec index 5f9f9c881e..2b29f46613 100644 --- a/specification/wasm-3.0/4.2-execution.types.spectec +++ b/specification/wasm-3.0/4.2-execution.types.spectec @@ -8,14 +8,8 @@ def $inst_globaltype(moduleinst, globaltype) : globaltype hint(show $inst_(%,%) def $inst_memtype(moduleinst, memtype) : memtype hint(show $inst_(%,%)) hint(macro "insttype") def $inst_tabletype(moduleinst, tabletype) : tabletype hint(show $inst_(%,%)) hint(macro "insttype") -;; TODO(3, rossberg): make inlining moduleinst.TYPES work -def $inst_valtype(moduleinst, t) = $subst_all_valtype(t, dt*) - -- if dt* = moduleinst.TYPES -def $inst_reftype(moduleinst, rt) = $subst_all_reftype(rt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_globaltype(moduleinst, gt) = $subst_all_globaltype(gt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_memtype(moduleinst, mt) = $subst_all_memtype(mt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_tabletype(moduleinst, tt) = $subst_all_tabletype(tt, dt*) - -- if dt* = moduleinst.TYPES +def $inst_valtype(moduleinst, t) = $subst_all_valtype(t, moduleinst.TYPES) +def $inst_reftype(moduleinst, rt) = $subst_all_reftype(rt, moduleinst.TYPES) +def $inst_globaltype(moduleinst, gt) = $subst_all_globaltype(gt, moduleinst.TYPES) +def $inst_memtype(moduleinst, mt) = $subst_all_memtype(mt, moduleinst.TYPES) +def $inst_tabletype(moduleinst, tt) = $subst_all_tabletype(tt, moduleinst.TYPES) diff --git a/specification/wasm-latest/4.2-execution.types.spectec b/specification/wasm-latest/4.2-execution.types.spectec index 5f9f9c881e..2b29f46613 100644 --- a/specification/wasm-latest/4.2-execution.types.spectec +++ b/specification/wasm-latest/4.2-execution.types.spectec @@ -8,14 +8,8 @@ def $inst_globaltype(moduleinst, globaltype) : globaltype hint(show $inst_(%,%) def $inst_memtype(moduleinst, memtype) : memtype hint(show $inst_(%,%)) hint(macro "insttype") def $inst_tabletype(moduleinst, tabletype) : tabletype hint(show $inst_(%,%)) hint(macro "insttype") -;; TODO(3, rossberg): make inlining moduleinst.TYPES work -def $inst_valtype(moduleinst, t) = $subst_all_valtype(t, dt*) - -- if dt* = moduleinst.TYPES -def $inst_reftype(moduleinst, rt) = $subst_all_reftype(rt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_globaltype(moduleinst, gt) = $subst_all_globaltype(gt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_memtype(moduleinst, mt) = $subst_all_memtype(mt, dt*) - -- if dt* = moduleinst.TYPES -def $inst_tabletype(moduleinst, tt) = $subst_all_tabletype(tt, dt*) - -- if dt* = moduleinst.TYPES +def $inst_valtype(moduleinst, t) = $subst_all_valtype(t, moduleinst.TYPES) +def $inst_reftype(moduleinst, rt) = $subst_all_reftype(rt, moduleinst.TYPES) +def $inst_globaltype(moduleinst, gt) = $subst_all_globaltype(gt, moduleinst.TYPES) +def $inst_memtype(moduleinst, mt) = $subst_all_memtype(mt, moduleinst.TYPES) +def $inst_tabletype(moduleinst, tt) = $subst_all_tabletype(tt, moduleinst.TYPES) diff --git a/spectec/doc/example/output/NanoWasm.pdf b/spectec/doc/example/output/NanoWasm.pdf index e68ccc1d9c..6f82a5bffa 100644 Binary files a/spectec/doc/example/output/NanoWasm.pdf and b/spectec/doc/example/output/NanoWasm.pdf differ diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 5aae8c8475..c801a47769 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -5955,32 +5955,27 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_valtype{moduleinst : moduleinst, t : valtype, `dt*` : deftype*}(moduleinst, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_reftype{moduleinst : moduleinst, rt : reftype, `dt*` : deftype*}(moduleinst, rt) = $subst_all_reftype(rt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_globaltype{moduleinst : moduleinst, gt : globaltype, `dt*` : deftype*}(moduleinst, gt) = $subst_all_globaltype(gt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_memtype{moduleinst : moduleinst, mt : memtype, `dt*` : deftype*}(moduleinst, mt) = $subst_all_memtype(mt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_tabletype{moduleinst : moduleinst, tt : tabletype, `dt*` : deftype*}(moduleinst, tt) = $subst_all_tabletype(tt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec relation Step_pure: `%~>%`(instr*, instr*) diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index 07faa4f442..d6d5e0903b 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md @@ -9608,31 +9608,31 @@ $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{inst}}}_{{\mathit{moduleinst}}}(t) & = & {t}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]} & \quad \mbox{if}~ {{\mathit{dt}}^\ast} = {\mathit{moduleinst}}{.}\mathsf{types} \\ +{{\mathrm{inst}}}_{{\mathit{moduleinst}}}(t) & = & {t}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{rt}}) & = & {{\mathit{rt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]} & \quad \mbox{if}~ {{\mathit{dt}}^\ast} = {\mathit{moduleinst}}{.}\mathsf{types} \\ +{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{rt}}) & = & {{\mathit{rt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{gt}}) & = & {{\mathit{gt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]} & \quad \mbox{if}~ {{\mathit{dt}}^\ast} = {\mathit{moduleinst}}{.}\mathsf{types} \\ +{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{gt}}) & = & {{\mathit{gt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{mt}}) & = & {{\mathit{mt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]} & \quad \mbox{if}~ {{\mathit{dt}}^\ast} = {\mathit{moduleinst}}{.}\mathsf{types} \\ +{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{mt}}) & = & {{\mathit{mt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]} \\ \end{array} $$ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{tt}}) & = & {{\mathit{tt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]} & \quad \mbox{if}~ {{\mathit{dt}}^\ast} = {\mathit{moduleinst}}{.}\mathsf{types} \\ +{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{tt}}) & = & {{\mathit{tt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]} \\ \end{array} $$ diff --git a/spectec/test-middlend/TEST.md b/spectec/test-middlend/TEST.md index 52de5c986f..bb0a518af2 100644 --- a/spectec/test-middlend/TEST.md +++ b/spectec/test-middlend/TEST.md @@ -5945,32 +5945,27 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_valtype{moduleinst : moduleinst, t : valtype, `dt*` : deftype*}(moduleinst, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_reftype{moduleinst : moduleinst, rt : reftype, `dt*` : deftype*}(moduleinst, rt) = $subst_all_reftype(rt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_globaltype{moduleinst : moduleinst, gt : globaltype, `dt*` : deftype*}(moduleinst, gt) = $subst_all_globaltype(gt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_memtype{moduleinst : moduleinst, mt : memtype, `dt*` : deftype*}(moduleinst, mt) = $subst_all_memtype(mt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_tabletype{moduleinst : moduleinst, tt : tabletype, `dt*` : deftype*}(moduleinst, tt) = $subst_all_tabletype(tt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec relation Step_pure: `%~>%`(instr*, instr*) @@ -17371,32 +17366,27 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_valtype{moduleinst : moduleinst, t : valtype, `dt*` : deftype*}(moduleinst, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_reftype{moduleinst : moduleinst, rt : reftype, `dt*` : deftype*}(moduleinst, rt) = $subst_all_reftype(rt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_globaltype{moduleinst : moduleinst, gt : globaltype, `dt*` : deftype*}(moduleinst, gt) = $subst_all_globaltype(gt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_memtype{moduleinst : moduleinst, mt : memtype, `dt*` : deftype*}(moduleinst, mt) = $subst_all_memtype(mt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_tabletype{moduleinst : moduleinst, tt : tabletype, `dt*` : deftype*}(moduleinst, tt) = $subst_all_tabletype(tt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec relation Step_pure: `%~>%`(instr*, instr*) @@ -28930,32 +28920,27 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_valtype(moduleinst : moduleinst, valtype : valtype) : valtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_valtype{moduleinst : moduleinst, t : valtype, `dt*` : deftype*}(moduleinst, t) = $subst_all_valtype(t, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_valtype{moduleinst : moduleinst, t : valtype}(moduleinst, t) = $subst_all_valtype(t, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_reftype(moduleinst : moduleinst, reftype : reftype) : reftype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_reftype{moduleinst : moduleinst, rt : reftype, `dt*` : deftype*}(moduleinst, rt) = $subst_all_reftype(rt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_reftype{moduleinst : moduleinst, rt : reftype}(moduleinst, rt) = $subst_all_reftype(rt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_globaltype(moduleinst : moduleinst, globaltype : globaltype) : globaltype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_globaltype{moduleinst : moduleinst, gt : globaltype, `dt*` : deftype*}(moduleinst, gt) = $subst_all_globaltype(gt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_globaltype{moduleinst : moduleinst, gt : globaltype}(moduleinst, gt) = $subst_all_globaltype(gt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_memtype(moduleinst : moduleinst, memtype : memtype) : memtype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_memtype{moduleinst : moduleinst, mt : memtype, `dt*` : deftype*}(moduleinst, mt) = $subst_all_memtype(mt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_memtype{moduleinst : moduleinst, mt : memtype}(moduleinst, mt) = $subst_all_memtype(mt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec def $inst_tabletype(moduleinst : moduleinst, tabletype : tabletype) : tabletype ;; ../../../../specification/wasm-latest/4.2-execution.types.spectec - def $inst_tabletype{moduleinst : moduleinst, tt : tabletype, `dt*` : deftype*}(moduleinst, tt) = $subst_all_tabletype(tt, (dt : deftype <: typeuse)*{dt <- `dt*`}) - -- if (dt*{dt <- `dt*`} = moduleinst.TYPES_moduleinst) + def $inst_tabletype{moduleinst : moduleinst, tt : tabletype}(moduleinst, tt) = $subst_all_tabletype(tt, (moduleinst.TYPES_moduleinst : deftype* <: typeuse*)) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec relation Step_pure: `%~>%`(instr*, instr*) diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index 1671b3b180..b7183fb062 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -25884,45 +25884,35 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i .................................................... -1. Let :math:`{{\mathit{dt}}^\ast}` be :math:`{\mathit{moduleinst}}{.}\mathsf{types}`. - -#. Return :math:`{t}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]}`. +1. Return :math:`{t}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]}`. :math:`{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{rt}})` ................................................................ -1. Let :math:`{{\mathit{dt}}^\ast}` be :math:`{\mathit{moduleinst}}{.}\mathsf{types}`. - -#. Return :math:`{{\mathit{rt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]}`. +1. Return :math:`{{\mathit{rt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]}`. :math:`{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{gt}})` ................................................................ -1. Let :math:`{{\mathit{dt}}^\ast}` be :math:`{\mathit{moduleinst}}{.}\mathsf{types}`. - -#. Return :math:`{{\mathit{gt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]}`. +1. Return :math:`{{\mathit{gt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]}`. :math:`{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{mt}})` ................................................................ -1. Let :math:`{{\mathit{dt}}^\ast}` be :math:`{\mathit{moduleinst}}{.}\mathsf{types}`. - -#. Return :math:`{{\mathit{mt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]}`. +1. Return :math:`{{\mathit{mt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]}`. :math:`{{\mathrm{inst}}}_{{\mathit{moduleinst}}}({\mathit{tt}})` ................................................................ -1. Let :math:`{{\mathit{dt}}^\ast}` be :math:`{\mathit{moduleinst}}{.}\mathsf{types}`. - -#. Return :math:`{{\mathit{tt}}}{{}[ {:=}\, {{\mathit{dt}}^\ast} ]}`. +1. Return :math:`{{\mathit{tt}}}{{}[ {:=}\, {\mathit{moduleinst}}{.}\mathsf{types} ]}`. :math:`{{\mathrm{blocktype}}}_{z}({\mathit{blocktype}})` @@ -32762,24 +32752,19 @@ growmem meminst n 5. Fail. inst_valtype moduleinst t -1. Let dt* be moduleinst.TYPES. -2. Return $subst_all_valtype(t, dt*). +1. Return $subst_all_valtype(t, moduleinst.TYPES). inst_reftype moduleinst rt -1. Let dt* be moduleinst.TYPES. -2. Return $subst_all_reftype(rt, dt*). +1. Return $subst_all_reftype(rt, moduleinst.TYPES). inst_globaltype moduleinst gt -1. Let dt* be moduleinst.TYPES. -2. Return $subst_all_globaltype(gt, dt*). +1. Return $subst_all_globaltype(gt, moduleinst.TYPES). inst_memtype moduleinst mt -1. Let dt* be moduleinst.TYPES. -2. Return $subst_all_memtype(mt, dt*). +1. Return $subst_all_memtype(mt, moduleinst.TYPES). inst_tabletype moduleinst tt -1. Let dt* be moduleinst.TYPES. -2. Return $subst_all_tabletype(tt, dt*). +1. Return $subst_all_tabletype(tt, moduleinst.TYPES). blocktype_ z blocktype 1. If blocktype is some _IDX, then: