diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-08-09 21:50:36 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-08-09 21:50:36 -0700 |
| commit | 13e380cadd4ceb2efbc9e7256ca4609f4ed04133 (patch) | |
| tree | ac7c5d3ef9254f59fc24f49178151d4553270d2b /lib/csc/compiler.csc | |
| parent | 1317d29d0e4ac9cedd682bc43bca5e30a647244b (diff) | |
| download | chromatopelma-13e380cadd4ceb2efbc9e7256ca4609f4ed04133.tar.zst | |
Fix a few small bugs.
N lines of code will have about 2N bugs.
Diffstat (limited to 'lib/csc/compiler.csc')
| -rw-r--r-- | lib/csc/compiler.csc | 4 |
1 files changed, 2 insertions, 2 deletions
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)))))) |
