unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* autocompile issues
@ 2010-01-15 17:51 Daniel Llorens del Río
  0 siblings, 0 replies; only message in thread
From: Daniel Llorens del Río @ 2010-01-15 17:51 UTC (permalink / raw)
  To: guile-devel

		
Hello,

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…

Thanks,

	Daniel





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-15 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 17:51 autocompile issues Daniel Llorens del Río

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).