From 13e380cadd4ceb2efbc9e7256ca4609f4ed04133 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Tue, 9 Aug 2022 21:50:36 -0700 Subject: Fix a few small bugs. N lines of code will have about 2N bugs. --- lib/csc/compiler.csc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csc/compiler.csc') diff --git a/lib/csc/compiler.csc b/lib/csc/compiler.csc index d18c373..e2e682e 100644 --- a/lib/csc/compiler.csc +++ b/lib/csc/compiler.csc @@ -131,7 +131,6 @@ (define (ir1->bytecode expr) - (printf "ir1 =\n{}\n" expr) (define c (closure-convert (ir1->ir2 expr (lambda (x) *tail*)))) (printf "ir2 =\n{}\n" c) (define b (ir2->ir3 c)) @@ -198,8 +197,9 @@ (match program ((('import . imports1) ('import . imports2) . rest) - (compile (cons (list 'import (append imports1 imports2)) rest))) + (compile (cons (cons 'import (append imports1 imports2)) rest))) ((('import . imports) . body) + (printf "imports {}\n" imports) (define compiled-body (ir1->bytecode (expand-body 'main body (make-import-map imports)))) (encode (link (revappend library-code (list compiled-body (list (list 'exit (list 'const 0)))))))) (_ (error "unexpected form in compile" program)))))) -- cgit v1.3.1