summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-27 09:14:04 +0100
committerAndy Wingo <wingo@pobox.com>2013-10-27 09:14:04 +0100
commitc450b47723438ad9e517b02a45b577b7f7fd848b (patch)
tree9c7f30240c4eb36e6024b89d4c19fe6aa0e6d969
parentd422f3167e37f045d768430565a2b77c3253a5af (diff)
downloadguile-c450b47723438ad9e517b02a45b577b7f7fd848b.tar.gz
Tree-IL->GLIL: Fix primitive-ref reification bug
* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Fix a bug whereby a primitive that is present in the compilation module but not at runtime was getting compiled as a toplevel-ref. This was causing current-module to fail to resolve in R6RS modules.
-rw-r--r--module/language/tree-il/compile-glil.scm3
1 files changed, 1 insertions, 2 deletions
diff --git a/module/language/tree-il/compile-glil.scm b/module/language/tree-il/compile-glil.scm
index 34855b9bd..60df2451e 100644
--- a/module/language/tree-il/compile-glil.scm
+++ b/module/language/tree-il/compile-glil.scm
@@ -595,8 +595,7 @@
((<primitive-ref> src name)
(cond
- ((eq? (module-variable (fluid-ref *comp-module*) name)
- (module-variable the-root-module name))
+ ((eq? (fluid-ref *comp-module*) the-root-module)
(case context
((tail push vals)
(emit-code src (make-glil-toplevel 'ref name))))