aboutsummaryrefslogtreecommitdiff
path: root/vm.bqn
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-13 18:21:04 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-13 18:21:04 -0400
commit7e86736d2b312324658c496a85f8b517569c3cb4 (patch)
tree68a5f7e5c7c500fb8b170a2a8d0e17b7eb7fec18 /vm.bqn
parent316ae01c16db690a972fcba9ce735818a31773ac (diff)
Fuse merge instruction with array-forming instructions so there are 4 total
Diffstat (limited to 'vm.bqn')
-rw-r--r--vm.bqn3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm.bqn b/vm.bqn
index 2c0c059b..f00f7fb9 100644
--- a/vm.bqn
+++ b/vm.bqn
@@ -136,7 +136,8 @@ ops ← ((!∘"Unknown opcode")˙⊣´⊢)¨ ⊔˝ ⍉> ⟨
# Arrays
11‿{i←𝕏@ ⋄ {s𝕊e: s.Push ⌽s.Pop i } }
12‿{i←𝕏@ ⋄ {s𝕊e: s.Push ref.Array ⌽s.Pop i } }
- 14‿( {s𝕊e: s.Push =◶{𝕩.Merge@}‿> ⊑s.Pop 1 }˙)
+ 13‿{i←𝕏@ ⋄ {s𝕊e: s.Push > ⌽s.Pop i } }
+ 14‿{i←𝕏@ ⋄ {s𝕊e: s.Push {𝕩.Merge@} ref.Array ⌽s.Pop i } }
# Application
16‿( {s𝕊e: s.Push { f‿x: F x } s.Pop 2 }˙)
17‿( {s𝕊e: s.Push { w‿f‿x: w F x } s.Pop 3 }˙)