From f6cccfb501175ba15a1bd529c7228c22c57152a9 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Thu, 28 Jul 2022 19:55:37 -0700 Subject: Improve the strings API. I'm just copying the go strings library API. --- csc/compiler.csc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'csc/compiler.csc') 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)))))) -- cgit v1.3.1