aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-20 21:10:57 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-11-20 21:10:57 -0500
commitfda88ea22112626a3fb8a25a510f49b40fb457a8 (patch)
tree4eed910bb4aca0b63116827e635fd22dfe9b3e38
parent0d3029f8539f03232f54bf8794bc76d07c3703e6 (diff)
Mention SetInv in VM docs
-rw-r--r--docs/implementation/vm.html3
-rw-r--r--implementation/vm.md3
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/implementation/vm.html b/docs/implementation/vm.html
index 90a37177..2fbbe788 100644
--- a/docs/implementation/vm.html
+++ b/docs/implementation/vm.html
@@ -732,8 +732,9 @@
<h3 id="structure"><a class="header" href="#structure">Structure</a></h3>
<p>The following steps give a working BQN system, assuming a working VM and core runtime:</p>
<ul>
-<li>Evaluate the bytecode <code><span class='Value'>$</span> <span class='Value'>src</span><span class='Function'>/</span><span class='Value'>cjs.bqn</span> <span class='Value'>r</span></code>, passing the core runtime <code><span class='Value'>provide</span></code> in the constants array. The result is a BQN list of a full runtime, and a function <code><span class='Function'>SetPrims</span></code>.</li>
+<li>Evaluate the bytecode <code><span class='Value'>$</span> <span class='Value'>src</span><span class='Function'>/</span><span class='Value'>cjs.bqn</span> <span class='Value'>r</span></code>, passing the core runtime <code><span class='Value'>provide</span></code> in the constants array. The result is a BQN list of a full runtime, a function <code><span class='Function'>SetPrims</span></code>, and a function <code><span class='Function'>SetInv</span></code>.</li>
<li>Optionally, call <code><span class='Function'>SetPrims</span></code> on a two-element list <code><span class='Bracket'>⟨</span><span class='Function'>Decompose</span><span class='Separator'>,</span> <span class='Function'>PrimInd</span><span class='Bracket'>⟩</span></code>.</li>
+<li>Optionally, call <code><span class='Function'>SetInv</span></code> with a function <code><span class='Value'>𝕩</span></code> that updates <code><span class='Function'>Inverse</span></code> and (more optionally) a function <code><span class='Value'>𝕨</span></code> that updates <code><span class='Function'>SwapInverse</span></code>.</li>
<li>Evaluate the bytecode <code><span class='Value'>$</span> <span class='Value'>src</span><span class='Function'>/</span><span class='Value'>cjs.bqn</span> <span class='Value'>c</span></code>, which uses primitives from the runtime in its constants array. This is the compiler.</li>
<li>Evaluate the bytecode <code><span class='Value'>$</span> <span class='Value'>src</span><span class='Function'>/</span><span class='Value'>cjs.bqn</span> <span class='Value'>f</span></code>. This returns a function. Then call it on a four-element list <code><span class='Bracket'>⟨</span><span class='Function'>Type</span><span class='Separator'>,</span> <span class='Function'>Decompose</span><span class='Separator'>,</span> <span class='Function'>Glyph</span><span class='Separator'>,</span> <span class='Function'>FmtNum</span><span class='Bracket'>⟩</span></code> to obtain the two-element list <code><span class='Bracket'>⟨</span><span class='Function'>•Fmt</span><span class='Separator'>,</span> <span class='Function'>•Repr</span><span class='Bracket'>⟩</span></code>.</li>
</ul>
diff --git a/implementation/vm.md b/implementation/vm.md
index e54f4265..2ebd08cd 100644
--- a/implementation/vm.md
+++ b/implementation/vm.md
@@ -252,8 +252,9 @@ BQN sources are compiled with [cjs.bqn](../src/cjs.bqn), which runs under [dzaim
### Structure
The following steps give a working BQN system, assuming a working VM and core runtime:
-* Evaluate the bytecode `$ src/cjs.bqn r`, passing the core runtime `provide` in the constants array. The result is a BQN list of a full runtime, and a function `SetPrims`.
+* Evaluate the bytecode `$ src/cjs.bqn r`, passing the core runtime `provide` in the constants array. The result is a BQN list of a full runtime, a function `SetPrims`, and a function `SetInv`.
* Optionally, call `SetPrims` on a two-element list `⟨Decompose, PrimInd⟩`.
+* Optionally, call `SetInv` with a function `𝕩` that updates `Inverse` and (more optionally) a function `𝕨` that updates `SwapInverse`.
* Evaluate the bytecode `$ src/cjs.bqn c`, which uses primitives from the runtime in its constants array. This is the compiler.
* Evaluate the bytecode `$ src/cjs.bqn f`. This returns a function. Then call it on a four-element list `⟨Type, Decompose, Glyph, FmtNum⟩` to obtain the two-element list `⟨•Fmt, •Repr⟩`.