ref: bbfee60f6716dce8cf7a802c044cf7d0fe8bb6f2
dir: /tools/mkboot0.sl/
(def update-compiler (let ((C ())) (with-bindings ((eval (λ (x) (set! C (cons (compile-thunk (macroexpand x)) C))))) (begin (load "instructions.sl") (load "compiler.sl"))) (λ () (begin (for-each (λ (x) (x)) (reverse! C)) (set! update-compiler (λ () ())))))) (def (compile-file inf) (let ((in (file inf :read))) (let next ((E (read in))) (if (not (io-eof? in)) (begin (print (compile-thunk (macroexpand E))) (newline) (next (read in))))) (io-close in))) (def (do-boot0) (for-each (λ (file) (compile-file file)) (cdr *argv*))) (update-compiler) (do-boot0)