2009-08-02 00:06:07 -04:00
|
|
|
(if (not (bound? 'top-level-value)) (set! top-level-value %eval))
|
|
|
|
(if (not (bound? 'set-top-level-value!)) (set! set-top-level-value! set))
|
2009-08-12 00:56:32 -04:00
|
|
|
(if (not (bound? 'eof-object?)) (set! eof-object? (lambda (x) #f)))
|
2009-04-22 20:55:03 -04:00
|
|
|
|
2019-08-13 16:07:44 -04:00
|
|
|
(load "dump.scm")
|
2019-08-09 08:21:56 -04:00
|
|
|
;(load "compiler.scm")
|
2009-04-22 20:55:03 -04:00
|
|
|
|
2019-08-13 16:07:44 -04:00
|
|
|
(define (compile-file->buffer inf)
|
|
|
|
(let ((in (file inf :read))
|
|
|
|
(out (buffer)))
|
2009-04-22 20:55:03 -04:00
|
|
|
(let next ((E (read in)))
|
|
|
|
(if (not (io.eof? in))
|
2019-08-25 15:57:31 -04:00
|
|
|
(begin (writeln (compile-thunk (expand E)) out)
|
2019-08-09 10:18:36 -04:00
|
|
|
(next (read in)))))
|
2019-08-13 16:07:44 -04:00
|
|
|
(io.close in)
|
|
|
|
(io.seek out 0)
|
|
|
|
out))
|
2009-04-22 20:55:03 -04:00
|
|
|
|
2019-08-13 17:44:24 -04:00
|
|
|
(dump-buffers-as-c-literal
|
|
|
|
(compile-file->buffer "system.scm")
|
2019-08-15 16:05:23 -04:00
|
|
|
(compile-file->buffer "aliases.scm")
|
2019-08-13 17:44:24 -04:00
|
|
|
(compile-file->buffer "compiler.scm"))
|