summaryrefslogtreecommitdiff
path: root/module/language/scheme/compile-ghil.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-03-29 10:41:27 -0700
committerAndy Wingo <wingo@pobox.com>2009-04-17 15:20:15 +0200
commit9d80c15649e21fd3798eae06e15a120839a9e14e (patch)
tree9f79b2b61e3ba5caf3b0d671c17b24b19bff426c /module/language/scheme/compile-ghil.scm
parent17df23e324eec8b8541bdd283e361c19a4159fa3 (diff)
downloadguile-9d80c15649e21fd3798eae06e15a120839a9e14e.tar.gz
serialize module information into syncase's output -- getting ready for hygiene
* module/ice-9/Makefile.am: Replace annotate.scm with expand-support.scm. * module/ice-9/annotate.scm: Removed; subsumed into expand-support.scm. * module/ice-9/compile-psyntax.scm: Strip out expansion structures before writing to disk. * module/ice-9/expand-support.scm: New file. Provides annotation support, and other compound data types for use by the expander. Currently the only one that is used is the toplevel reference, <module-ref>, but we will record lexicals this way soon. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/psyntax.scm (build-global-reference) (build-global-assignment): Instead of expanding out global references as symbols, expand them as <module-ref> structures, with space to record the module that they should be scoped against. This is in anticipation of us actually threading the module info through the syntax transformation, so that we can get hygiene with respect to modules. * module/ice-9/syncase.scm: Replace eval-when. Since sc-expand will give us something that isn't Scheme because we put the <module-ref> structures in it, strip that info whenever we actually do need scheme. * module/language/scheme/compile-ghil.scm (lookup-transformer): Strip expansion structures here too. * module/language/scheme/expand.scm (language): Swap annotate for expand-support. But this file will die soon, I think.
Diffstat (limited to 'module/language/scheme/compile-ghil.scm')
-rw-r--r--module/language/scheme/compile-ghil.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/scheme/compile-ghil.scm b/module/language/scheme/compile-ghil.scm
index fcca8a940..d622c277b 100644
--- a/module/language/scheme/compile-ghil.scm
+++ b/module/language/scheme/compile-ghil.scm
@@ -27,6 +27,7 @@
#:use-module (system vm objcode)
#:use-module (ice-9 receive)
#:use-module (ice-9 optargs)
+ #:use-module (ice-9 expand-support)
#:use-module ((ice-9 syncase) #:select (sc-macro))
#:use-module ((system base compile) #:select (syntax-error))
#:export (compile-ghil translate-1
@@ -119,7 +120,8 @@
(lambda (env loc exp)
(retrans
(with-fluids ((eec (module-eval-closure mod)))
- (sc-expand3 exp 'c '(compile load eval)))))))
+ (strip-expansion-structures
+ (sc-expand3 exp 'c '(compile load eval))))))))
((primitive-macro? val)
(syntax-error #f "unhandled primitive macro" head))