From d6fbf0c00e913ab2726f98f70b3026aafb7fcdc6 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 27 Oct 2013 11:25:18 +0100 Subject: [PATCH] Fix toplevel-ref with named modules before boot in stack VM * libguile/vm.c (resolve_variable): Fix, as in e23f9e4423bbbe8521d13e1c9a223612a5e86762. --- libguile/vm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libguile/vm.c b/libguile/vm.c index ff9ea35d3..5a2aef7b9 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -641,7 +641,17 @@ resolve_variable (SCM what, SCM module) sym = SCM_CADR (what); public = SCM_CADDR (what); - if (scm_is_true (public)) + if (!scm_module_system_booted_p) + { +#ifdef VM_ENABLE_PARANOID_ASSERTIONS + ASSERT (scm_is_false (public)); + ASSERT (scm_is_true + (scm_equal_p (modname, + scm_list_1 (scm_from_utf8_symbol ("guile"))))); +#endif + return scm_lookup (sym); + } + else if (scm_is_true (public)) return scm_public_lookup (modname, sym); else return scm_private_lookup (modname, sym);