From 95df1fda8c6635165ecadff1950f10e5e6f8ed70 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Wed, 29 Jan 2020 09:48:08 -0800 Subject: [PATCH] Cons. I should research Lisp compilers... I think I should emit high-level code and reduce it to actual machine code later under whatever model (cons cell heap, etc.) --- thun/thun.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thun/thun.pl b/thun/thun.pl index 9484c01..3040008 100644 --- a/thun/thun.pl +++ b/thun/thun.pl @@ -747,6 +747,9 @@ func_compile(pop, E, [A|S], So, FP0, FP) --> !, free_reg(A, FP0, FP1), thun_compile(E, S, So, FP1, FP). +func_compile(cons, E, [List, Item|S], So, FP0, FP) --> !, + % allocate a cons cell + thun_compile(E, S, So, FP0, FP). func_compile(_Func, E, Si, So, FP0, FP) --> % look up function, compile it...