From 89c58d4f5a1d370f170b56c17194618e0876f21d Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Tue, 12 Nov 2019 09:23:31 -0800 Subject: [PATCH] dup cons i --- thun/asm-dump.txt | 1 + thun/compiler.markII.pl | 7 ++++--- thun/joy_asmii.bin | Bin 648 -> 652 bytes 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/thun/asm-dump.txt b/thun/asm-dump.txt index 93593fb..2db71c5 100644 --- a/thun/asm-dump.txt +++ b/thun/asm-dump.txt @@ -187,4 +187,5 @@ store_word(6, 0, 0), do_offset(H), label(I1), expr_cell(R, 4), +expr_cell(J, 4), expr_cell(S, 0)]. \ No newline at end of file diff --git a/thun/compiler.markII.pl b/thun/compiler.markII.pl index e454588..926cc38 100644 --- a/thun/compiler.markII.pl +++ b/thun/compiler.markII.pl @@ -162,9 +162,9 @@ Mark II % ====================================== - label(Expression) -]), - dexpr([Dup, I]). + label(Expression), + dexpr([Dup, Cons, I]) +]). /* @@ -200,6 +200,7 @@ language. ⟐(load(From, To)) --> [load_word(From, To, 0)]. ⟐(label(L)) --> [label(L)]. % Pass through. +⟐(dexpr(L)) --> dexpr(L). % Pass through. ⟐(jump(To)) --> [do_offset(To)]. % Pass through. diff --git a/thun/joy_asmii.bin b/thun/joy_asmii.bin index 99cb57ecba2302e100884cb09988e4aab9d12502..1cdbbe6cf1f7aafe51c726ab22171ea311743eeb 100644 GIT binary patch delta 23 ccmeBR?O|nX*vMGV#KXd%@}GgB42T&R07v)*djJ3c delta 19 YcmeBS?O