diff --git a/core/_download/WebAssembly.pdf b/core/_download/WebAssembly.pdf index f95cd7fe4e..47c66eb628 100644 Binary files a/core/_download/WebAssembly.pdf and b/core/_download/WebAssembly.pdf differ diff --git a/core/exec/instructions.html b/core/exec/instructions.html index a2eeda04f9..ff9ac8a6d6 100644 --- a/core/exec/instructions.html +++ b/core/exec/instructions.html @@ -630,8 +630,8 @@
Let \(z\) be the current state.
Let \(a\) be \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}|}\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^{n}}\) be \({\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^{n}})\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^{n}}\) be \({{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^{n}}\).
Assert: Due to validation, there are at least \(n\) values on the top of the stack.
Pop the values \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^{n}}\) from the stack.
Let \({\mathit{si}}\) be \(\{ \begin{array}[t]{@{}l@{}}\href{../exec/runtime.html#syntax-structinst}{\mathsf{type}}~z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x],\; \href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}~{{{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{\mathit{zt}}}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})^{n}} \}\end{array}\).
Let \(z\) be the current state.
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast})\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast}\).
Assert: Due to validation, \({|{\mathit{mut*}}|}\) is \({|{\mathit{zt*}}|}\).
Assert: Due to validation, for all \({({\href{../exec/runtime.html#syntax-val}{\mathit{val}}}, {\mathit{zt}})^\ast}\), \({{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}\) is defined.
Let \({{\href{../exec/runtime.html#syntax-val}{\mathit{val}}}^\ast}\) be \({{{\href{../exec/runtime.html#default-val}{\mathrm{default}}}}_{{\href{../syntax/types.html#aux-unpack}{\mathrm{unpack}}}({\mathit{zt}})}^\ast}\).
If \(i\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}|}\) and \(a\) is less than \({|z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}|}\), then:
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast})\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast}\).
If \({|{\mathit{mut*}}|}\) is \({|{\mathit{zt*}}|}\) and \(i\) is less than \({|{{\mathit{zt}}^\ast}|}\), then:
Push the value \({{{{\href{../exec/runtime.html#aux-unpackfield}{\mathrm{unpack}}}}_{{{\mathit{zt}}^\ast}{}[i]}^{{{\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}}^?}}}}{(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}{}[i])}\) to the stack.
Let \((\href{../exec/runtime.html#syntax-ref}{\mathsf{ref{.}struct}}~a)\) be \({\href{../syntax/instructions.html#syntax-instr}{\mathit{instr}}}_{\mathit{u{\kern-0.1em\scriptstyle 0}}}\).
Assert: Due to validation, \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\) is of the case \(\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0)\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0\).
Let \((\href{../syntax/types.html#syntax-comptype}{\mathsf{struct}}~{{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast})\) be \({\href{../valid/conventions.html#aux-expand-deftype}{\mathrm{expand}}}(z{.}\href{../exec/runtime.html#syntax-store}{\mathsf{types}}{}[x])\).
Let \({({\href{../syntax/types.html#syntax-mut}{\mathsf{mut}}^?}, {\mathit{zt}})^\ast}\) be \({{\href{../syntax/types.html#syntax-fieldtype}{\mathit{fieldtype}}}_0^\ast}\).
If \({|{\mathit{mut*}}|}\) is \({|{\mathit{zt*}}|}\) and \(i\) is less than \({|{{\mathit{zt}}^\ast}|}\), then:
Perform \(z{}[{.}\href{../exec/runtime.html#syntax-store}{\mathsf{structs}}{}[a]{.}\href{../exec/runtime.html#syntax-structinst}{\mathsf{fields}}{}[i] = {{\href{../exec/runtime.html#aux-packfield}{\mathrm{pack}}}}_{{{\mathit{zt}}^\ast}{}[i]}({\href{../exec/runtime.html#syntax-val}{\mathit{val}}})]\).