mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
guile-vm is completely self-compiling now!
* module/language/scheme/translate.scm (*the-compile-toplevel-symbol*): Reset to compile-toplevel, which requires a patch to guile. * module/system/base/compile.scm (compile-file): Some foo so that we load up the scheme language before call-with-output-file. Fixes compilation of (language scheme) modules. * module/system/base/language.scm (define-language): Don't unquote in make-language; refer to it by name instead, and export it. * module/system/repl/Makefile.am (vm_DATA): Don't compile describe.scm, because we really can't deal with goops yet. * module/system/repl/repl.scm (compile-toplevel): If we're compiling, put in a stub definition of start-stack, which is closely tied to the interpreter. * src/vm_loader.c (load-program): Fix a very tricky corruption bug!
This commit is contained in:
parent
5163e95138
commit
d79d908ef0
6 changed files with 20 additions and 12 deletions
|
@ -58,16 +58,17 @@
|
|||
(define (scheme) (lookup-language 'scheme))
|
||||
|
||||
(define (compile-file file . opts)
|
||||
(let ((comp (compiled-file-name file)))
|
||||
(let ((comp (compiled-file-name file))
|
||||
(scheme (scheme)))
|
||||
(catch 'nothing-at-all
|
||||
(lambda ()
|
||||
(call-with-compile-error-catch
|
||||
(lambda ()
|
||||
(call-with-output-file comp
|
||||
(lambda (port)
|
||||
(let* ((source (read-file-in file (scheme)))
|
||||
(let* ((source (read-file-in file scheme))
|
||||
(objcode (apply compile-in source (current-module)
|
||||
(scheme) opts)))
|
||||
scheme opts)))
|
||||
(if (memq :c opts)
|
||||
(pprint-glil objcode port)
|
||||
(uniform-vector-write (objcode->u8vector objcode) port)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue