Skip to content

Commit

Permalink
deploy: c29d540
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg committed Jun 1, 2024
1 parent ddf419c commit ca33e1f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Binary file modified core/_download/WebAssembly.pdf
Binary file not shown.
9 changes: 7 additions & 2 deletions core/exec/types.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,20 @@ <h3 id="searchlabel">Quick search</h3>

<section id="types">
<span id="exec-type"></span><span id="index-0"></span><h1>Types<a class="headerlink" href="#types" title="Permalink to this heading"></a></h1>
<p>Execution has to check and compare <a class="reference internal" href="../syntax/modules.html#syntax-type"><span class="std std-ref">types</span></a> in a few places, such as <a class="reference internal" href="instructions.html#exec-call-indirect"><span class="std std-ref">executing</span></a> <span class="math notranslate nohighlight">\(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_indirect}}\)</span> or <a class="reference internal" href="modules.html#exec-instantiation"><span class="std std-ref">instantiating</span></a> <a class="reference internal" href="../syntax/modules.html#syntax-module"><span class="std std-ref">modules</span></a>.</p>
<p>Execution has to check and compare <a class="reference internal" href="../syntax/modules.html#syntax-type"><span class="std std-ref">types</span></a> in a few places, such as <a class="reference internal" href="instructions.html#exec-call-indirect"><span class="std std-ref">executing</span></a> <span class="math notranslate nohighlight">\(\mathsf{call\_indirect}\)</span> or <a class="reference internal" href="modules.html#exec-instantiation"><span class="std std-ref">instantiating</span></a> <a class="reference internal" href="../syntax/modules.html#syntax-module"><span class="std std-ref">modules</span></a>.</p>
<p>It is an invariant of the semantics that all types occurring during execution are <a class="reference internal" href="../valid/conventions.html#type-closed"><span class="std std-ref">closed</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Runtime type checks generally involve types from multiple modules or types not defined by a module at all, such that module-local <a class="reference internal" href="../syntax/modules.html#syntax-typeidx"><span class="std std-ref">type indices</span></a> are not meaningful.</p>
</div>
<section id="instantiation">
<span id="type-inst"></span><span id="index-1"></span><h2>Instantiation<a class="headerlink" href="#instantiation" title="Permalink to this heading"></a></h2>
<p>Any form of <a class="reference internal" href="../syntax/modules.html#syntax-type"><span class="std std-ref">type</span></a> can be <em>instantiated</em> into a <a class="reference internal" href="../valid/conventions.html#type-closed"><span class="std std-ref">closed</span></a> type inside a <a class="reference internal" href="runtime.html#syntax-moduleinst"><span class="std std-ref">module instance</span></a> by <a class="reference internal" href="../valid/conventions.html#notation-subst"><span class="std std-ref">substituting</span></a> each <a class="reference internal" href="../syntax/modules.html#syntax-typeidx"><span class="std std-ref">type index</span></a> <span class="math notranslate nohighlight">\(x\)</span> occurring in it with the corresponding <a class="reference internal" href="../valid/conventions.html#syntax-deftype"><span class="std std-ref">defined type</span></a> <span class="math notranslate nohighlight">\(\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{types}}[x]\)</span>.</p>
<p>Any form of <a class="reference internal" href="../syntax/modules.html#syntax-type"><span class="std std-ref">type</span></a> can be <em>instantiated</em> into a <a class="reference internal" href="../valid/conventions.html#type-closed"><span class="std std-ref">closed</span></a> type inside a <a class="reference internal" href="runtime.html#syntax-moduleinst"><span class="std std-ref">module instance</span></a> by <a class="reference internal" href="../valid/conventions.html#notation-subst"><span class="std std-ref">substituting</span></a> each <a class="reference internal" href="../syntax/modules.html#syntax-typeidx"><span class="std std-ref">type index</span></a> <span class="math notranslate nohighlight">\(x\)</span> occurring in it with the corresponding <a class="reference internal" href="../valid/conventions.html#syntax-deftype"><span class="std std-ref">defined type</span></a> <span class="math notranslate nohighlight">\({\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}}{.}\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{types}}{}[x]\)</span>.</p>
<div class="math notranslate nohighlight">
\[\begin{split}\begin{array}{&#64;{}lcl&#64;{}l&#64;{}}
{{\href{../exec/types.html#type-inst}{\mathrm{clos}}}}_{{\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}}}(t) &amp;=&amp; {t}{{}[ { \href{../valid/conventions.html#notation-subst}{\mathrel{:=}} }\;{{\mathit{dt}}^\ast} ]}
&amp;\qquad \mbox{if}~{{\mathit{dt}}^\ast} = {\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}}{.}\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{types}} \\
\end{array}\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\href{../exec/types.html#type-inst}{\mathrm{clos}}_{\href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}}(t) = t[\href{../valid/conventions.html#notation-subst}{\mathrel{\mathbf{:=}}} \href{../exec/runtime.html#syntax-moduleinst}{\mathit{moduleinst}}.\href{../exec/runtime.html#syntax-moduleinst}{\mathsf{types}}]\]</div>
<div class="admonition note">
Expand Down
2 changes: 1 addition & 1 deletion core/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta content="ED" name="w3c-status">
<meta content="Bikeshed version 4afc1fdf9, updated Tue May 28 15:43:17 2024 -0700" name="generator">
<link href="https://www.w3.org/TR/wasm-js-api-2/" rel="canonical">
<meta content="3e65eb8c1d4480e8163e139c05e77ed0bf53be26" name="revision">
<meta content="c29d540cfb4c8adcf5d7f0e84152d62374cea3b4" name="revision">
<meta content="dark light" name="color-scheme">
<style>
emu-const {
Expand Down
2 changes: 1 addition & 1 deletion web-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta content="ED" name="w3c-status">
<meta content="Bikeshed version 4afc1fdf9, updated Tue May 28 15:43:17 2024 -0700" name="generator">
<link href="https://www.w3.org/TR/wasm-web-api-2/" rel="canonical">
<meta content="3e65eb8c1d4480e8163e139c05e77ed0bf53be26" name="revision">
<meta content="c29d540cfb4c8adcf5d7f0e84152d62374cea3b4" name="revision">
<meta content="dark light" name="color-scheme">
<style>/* Boilerplate: style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
Expand Down

0 comments on commit ca33e1f

Please sign in to comment.