aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csc/cps.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-08-05 21:04:49 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-08-05 21:04:49 -0700
commit83a18a658ac925b589d36e37ae150ec986d5eba8 (patch)
treeecea56f73087903aae129bf5b88f8bf2acac6a49 /lib/csc/cps.csc
parentAdd call-with-values. (diff)
downloadchromatopelma-83a18a658ac925b589d36e37ae150ec986d5eba8.tar.zst
Add more of the standard library.
Diffstat (limited to 'lib/csc/cps.csc')
-rw-r--r--lib/csc/cps.csc4
1 files changed, 3 insertions, 1 deletions
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)