aboutsummaryrefslogtreecommitdiffstats
path: root/csc/compiler.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-28 19:55:37 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-28 19:55:37 -0700
commitf6cccfb501175ba15a1bd529c7228c22c57152a9 (patch)
treee161f8660dcb725aa1f244eb6e2f72eb484aa06c /csc/compiler.csc
parentAdd the compiler frontend. (diff)
downloadchromatopelma-f6cccfb501175ba15a1bd529c7228c22c57152a9.tar.zst
Improve the strings API.
I'm just copying the go strings library API.
Diffstat (limited to 'csc/compiler.csc')
-rw-r--r--csc/compiler.csc10
1 files changed, 6 insertions, 4 deletions
diff --git a/csc/compiler.csc b/csc/compiler.csc
index 4f1cafc..728b8c5 100644
--- a/csc/compiler.csc
+++ b/csc/compiler.csc
@@ -3,6 +3,8 @@
*library-search-dir*
compile)
(import (scheme base)
+ (only (scheme file)
+ file-exists?)
(only (csc codegen)
ir2->ir3)
(only (csc config)
@@ -10,6 +12,8 @@
(only (csc cps)
closure-convert
ir1->ir2)
+ (only (csc encoding)
+ encode)
(only (csc format)
sprintf)
(only (csc hash-map)
@@ -22,9 +26,7 @@
(only (csc list)
revappend)
(only (csc match)
- match)
- (only (scheme file)
- file-exists?))
+ match))
(begin
@@ -131,5 +133,5 @@
(compile (cons (list 'import (append imports1 imports2)) rest)))
((('import . imports) . body)
(define compiled-body (ir1->bytecode (expand-body 'main body (make-import-map imports))))
- (link (revappend library-code (list compiled-body)))
+ (encode (link (revappend library-code (list compiled-body)))))
(_ (error "unexpected form in compile" program))))))