aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-22 09:45:35 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-22 09:45:35 -0400
commit92034d1fae881139c5ce034eab9a86662bef5485 (patch)
tree153804dacf45f93b043fb944fc0254631b00de3a
parentaad346321153a7ec8c1492e30446e59a5cdc6b53 (diff)
dzaima/BQN block types changed from f/m/d to 0/1/2 to match self-hosted
-rwxr-xr-xdc.bqn2
-rw-r--r--docs/implementation/vm.html1
-rw-r--r--implementation/vm.md2
3 files changed, 1 insertions, 4 deletions
diff --git a/dc.bqn b/dc.bqn
index bb2c9568..4f1c544b 100755
--- a/dc.bqn
+++ b/dc.bqn
@@ -19,7 +19,7 @@ DRun←{
blk ↩ {
⟨t,i,l,n⟩←𝕩
s←(3×i)↓(t⊑3‿5‿6)↑special
- ⟨t⊑"fmd",i,l,s∾⥊¨'a'+↕n-≠s⟩
+ ⟨t,i,l,s∾⥊¨'a'+↕n-≠s⟩
}¨blk
•COMP ⟨bc,o,⟨⟩,blk⟩
}
diff --git a/docs/implementation/vm.html b/docs/implementation/vm.html
index 778a9179..cd45b4e2 100644
--- a/docs/implementation/vm.html
+++ b/docs/implementation/vm.html
@@ -26,7 +26,6 @@
<li>Block starting index in <code><span class='Value'>bytes</span></code></li>
</ul>
<p>Compilation separates blocks so that they are not nested in bytecode. All compiled code is contained in some block. The self-hosted compiler compiles the entire program into an immediate block, and the program is run by evaluating this block. Blocks are terminated with the RETN instruction.</p>
-<p>In dzaima/BQN, the block type is one of <code><span class='String'>'f'</span></code> <code><span class='String'>'m'</span></code> <code><span class='String'>'d'</span></code> rather than 0, 1, or 2.</p>
<p>The starting index refers to the position where execution starts in order to evaluate the block. When the block is evaluated depends on its type and immediateness. An immediate block (0,1) is evaluated as soon as it is pushed; a function (0,0) is evaluated when called on arguments, an immediate modifier (1 or 2, 1) is evaluated when called on operands, and a deferred modifier (1 or 2, 0) creates a derived function when called on operands and is evaluated when this derived function is called on arguments.</p>
<h3 id="instructions">Instructions</h3>
<p>The following instructions are defined by dzaima/BQN. The ones emitted by the self-hosted BQN compiler are marked in the &quot;used&quot; column.</p>
diff --git a/implementation/vm.md b/implementation/vm.md
index 6812071e..cd1777b9 100644
--- a/implementation/vm.md
+++ b/implementation/vm.md
@@ -28,8 +28,6 @@ Each block in `blocks` is a list of the following properties:
Compilation separates blocks so that they are not nested in bytecode. All compiled code is contained in some block. The self-hosted compiler compiles the entire program into an immediate block, and the program is run by evaluating this block. Blocks are terminated with the RETN instruction.
-In dzaima/BQN, the block type is one of `'f'` `'m'` `'d'` rather than 0, 1, or 2.
-
The starting index refers to the position where execution starts in order to evaluate the block. When the block is evaluated depends on its type and immediateness. An immediate block (0,1) is evaluated as soon as it is pushed; a function (0,0) is evaluated when called on arguments, an immediate modifier (1 or 2, 1) is evaluated when called on operands, and a deferred modifier (1 or 2, 0) creates a derived function when called on operands and is evaluated when this derived function is called on arguments.
### Instructions