From: Andy Wingo Date: Wed, 3 Jun 2009 21:59:58 +0000 (+0200) Subject: fix error autocompiling parts of the compiler; make check works X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/c2521a212417b095475148e321daaf6e59ef5b3d fix error autocompiling parts of the compiler; make check works * libguile/load.c (scm_try_autocompile): Punt if compiled-file-name does not resolve, which would indicate that the file in question is part of the compiler itself. * test-suite/tests/elisp.test: Today I was an evil one -- disable autocompilation for the elisp tests, as they are meant only for the memoizer's eyes. Hopefully Daniel will fix this :-) --- diff --git a/libguile/load.c b/libguile/load.c index ac9cc7dad..4e127d68c 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -641,7 +641,19 @@ scm_try_autocompile (SCM source, SCM stale_compiled) } comp_mod = scm_c_resolve_module ("system base compile"); - compiled_file_name = scm_c_module_lookup (comp_mod, "compiled-file-name"); + compiled_file_name = + scm_module_variable (comp_mod, + scm_from_locale_symbol ("compiled-file-name")); + + if (scm_is_false (compiled_file_name)) + { + scm_puts (";;; it seems ", scm_current_error_port ()); + scm_display (source, scm_current_error_port ()); + scm_puts ("\n;;; is part of the compiler; skipping autocompilation\n", + scm_current_error_port ()); + return SCM_BOOL_F; + } + new_compiled = scm_call_1 (scm_variable_ref (compiled_file_name), source); if (scm_is_false (new_compiled)) diff --git a/test-suite/tests/elisp.test b/test-suite/tests/elisp.test index eaf6dbbff..9e0997087 100644 --- a/test-suite/tests/elisp.test +++ b/test-suite/tests/elisp.test @@ -23,6 +23,9 @@ (if *old-stack-level* (debug-set! stack (* 2 *old-stack-level*))) +(define *old-%load-should-autocompile* %load-should-autocompile) +(set! %load-should-autocompile #f) + ;;; ;;; elisp ;;; @@ -350,6 +353,7 @@ )) +(set! %load-should-autocompile *old-%load-should-autocompile*) (debug-set! stack *old-stack-level*) ;;; elisp.test ends here