From 0ddb8fb300b916605baa2552eec3dc77b4e6e154 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 29 Jul 2022 16:42:27 -0700 Subject: Fix some compilation errors in the compiler. --- csc/cps.csc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'csc/cps.csc') diff --git a/csc/cps.csc b/csc/cps.csc index 9e1721c..cdd6611 100644 --- a/csc/cps.csc +++ b/csc/cps.csc @@ -56,7 +56,9 @@ %branch %fix %primitive + %tail *globals* + *tail* branch-atom closure-arguments closure-body @@ -69,7 +71,8 @@ make-label make-label make-primitive - make-variable) + make-variable + tail?) (only (csc loop) loop return) @@ -341,6 +344,8 @@ (get-boxed false))) ((% %apply proc args) (make-ref-map)) + ((% %tail) + (make-ref-map)) ((% %fix funs body) (loop with m = (get-boxed body) for fun in funs @@ -404,6 +409,8 @@ do (set! new-expr (make-primitive 'peek (list p (make-constant 0)) (list var) new-expr)) finally (return new-expr))) + ((% %tail) + *tail*) ((% %fix funs body) (define-values (new-names boxed-names temp-names) (convert-arg-list (loop for fun in funs collect (closure-name fun)))) @@ -468,6 +475,8 @@ if (free? arg) do (set! m (insert m arg #t)) finally (return m))) + ((% %tail) + (make-ref-map)) ((% %fix funs body) (loop for fun in funs for name = (closure-name fun) @@ -521,6 +530,8 @@ (fn (make-variable (gensym)))) (make-primitive 'peek (list p (make-constant 0)) (list fn) (make-apply fn (cons p (map translate args)))))) + ((% %tail) + *tail*) ((% %fix functions body) (define frees (map free-vars functions)) (define fn-ptrs (loop for fun in functions -- cgit v1.3.1