1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

compile all of base/; some arbitrary changes; more "fixes" to `link'

* module/language/scheme/translate.scm (lookup-transformer): When
  expanding syncase macros, use the eval closure from the ghil-env.
  Probably doesn't make any difference whatsoever.

* module/system/base/Makefile.am (SOURCES): Compile pmatch.scm, now that
  it works :-))

* module/system/base/compile.scm (compile-in): Compile inside a
  save-module-excursion, so that side effects of evaluation don't leak
  out.

* module/system/base/pmatch.scm: Change from :use-syntax/:export-syntax
  to simply :use-modules/:export. Also probably has no effect.

* module/system/il/ghil.scm (fix-ghil-mod!): Suppress warnings resulting
  from compilation of define-module.

* src/vm_loader.c (link): So, referencing variables defined but not
  exported from the current module didn't work. Fixed that, but it's
  hacky. There are still some uncaught cases.
This commit is contained in:
Andy Wingo 2008-05-19 12:57:48 +02:00
parent 8f43eb2b42
commit 1b8abe5514
6 changed files with 42 additions and 30 deletions

View file

@ -115,20 +115,22 @@
(call-with-input-file file (language-read-file lang)))
(define (compile-in x e lang . opts)
(catch 'result
(lambda ()
;; expand
(set! x ((language-expander lang) x e))
(if (memq :e opts) (throw 'result x))
;; translate
(set! x ((language-translator lang) x e))
(if (memq :t opts) (throw 'result x))
;; compile
(set! x (apply compile x e opts))
(if (memq :c opts) (throw 'result x))
;; assemble
(apply assemble x e opts))
(lambda (key val) val)))
(save-module-excursion
(lambda ()
(catch 'result
(lambda ()
;; expand
(set! x ((language-expander lang) x e))
(if (memq :e opts) (throw 'result x))
;; translate
(set! x ((language-translator lang) x e))
(if (memq :t opts) (throw 'result x))
;; compile
(set! x (apply compile x e opts))
(if (memq :c opts) (throw 'result x))
;; assemble
(apply assemble x e opts))
(lambda (key val) val)))))
;;;
;;;