[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile 2.0 interpretation vs compilation
From: |
Mark H Weaver |
Subject: |
Re: Guile 2.0 interpretation vs compilation |
Date: |
Mon, 06 Oct 2014 00:22:07 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux) |
Marko Rauhamaa <address@hidden> writes:
> Consider this program:
>
> ===begin test.scm=======================================================
> (define (hello) #f)
> (format #t "~S\n" (procedure-name hello))
>
> (define (xyz)
> (define (hello) #f)
> (format #t "~S\n" (procedure-name hello)))
>
> (xyz)
> ===end test.scm=========================================================
>
> If I run:
>
> $ guile --no-auto-compile test.scm
> hello
> #f
> $ guile --no-auto-compile test.scm
> hello
> #f
This is expected but not ideal. Our primitive evaluator does not
preserve non-toplevel variable names, and therefore the associated
procedure names are lost. Maybe we can fix this in Guile 2.2.
> $ guile test.scm
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> [...]
> hello
> hello
> $ guile test.scm
> hello
> hello
> $ guile --no-auto-compile test.scm
> hello
> hello
The reason this last one works is because the .go file was created in
the preceding compiled runs, and --no-auto-compile does not inhibit the
use of pre-existing .go files (unless the .scm file is newer, of
course).
Regards,
Mark