From 83a18a658ac925b589d36e37ae150ec986d5eba8 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 5 Aug 2022 21:04:49 -0700 Subject: Add more of the standard library. --- lib/csc/cps.csc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/csc/cps.csc') diff --git a/lib/csc/cps.csc b/lib/csc/cps.csc index a3e829b..4fed47c 100644 --- a/lib/csc/cps.csc +++ b/lib/csc/cps.csc @@ -151,7 +151,7 @@ (define argvec (new-ref)) (define nargs (length args)) (make-lambda (list argvec) #f - (make-if (make-call-builtin 'int=? (list (make-call-builtin 'peek (list argvec (make-constant 1))) + (make-if (make-call-builtin 'eq? (list (make-call-builtin 'peek (list argvec (make-constant 1))) (make-constant nargs))) (loop for arg in (reverse args) for i downfrom (+ 1 nargs) @@ -294,6 +294,8 @@ (to-cps producer (lambda (p) (make-apply p (list consumer-func argvec))))))))) + ((% %call-builtin 'apply (proc args)) + (to-cps (make-call proc (list args)) continuation)) ((% %call-builtin op args) (define returns-value? (not (memq op '(poke exit)))) (loop for arg in (reverse args) -- cgit v1.3.1