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.)
This commit is contained in:
Simon Forman 2020-01-29 09:48:08 -08:00
parent 26c92e9a48
commit 95df1fda8c
1 changed files with 3 additions and 0 deletions

View File

@ -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...