[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

autocompile issues

From: Daniel Llorens del Río
Subject: autocompile issues
Date: Fri, 15 Jan 2010 18:51:35 +0100


I'm having some problems with autocompilation in the latest Guile.

First, scm_primitive_load_path() triggers autocompilation but scm_primitive_load() does not.

Looking at libguile/load.c and 9591a2b016c5c11d2cd92ff0d43cd511f28bc07f, this seems intentional, but I can't see the logic of it. Programs that were using scm_primitive_load() with 1.8 will suffer with this behavior, since the interpreter in 1.9 is much slower.

Second, if I load a file with scm_primitive_load_path() and that file has (use-modules (mod mod)), (mod mod) is not autocompiled. However, if the compiled file exists, it is used. The same line in the REPL does trigger autocompilation.

It seems that this happens because %load-should-autocompile is turned on (or not) in scm_shell(), and it is always false before.

It might be reasonable to apply --autocompile and --no-autocompile in scm_shell(), but shouldn't GUILE_AUTO_COMPILE at least be in effect from the very beginning? Or at least before loading any user file. If I try to define scm_loc_load_should_autocompile from GUILE_AUTO_COMPILE in [scm_init_load()], however, some of the tests in bit-operations.test fail, and I have not looked into that…



reply via email to

[Prev in Thread] Current Thread [Next in Thread]