From: Mark H Weaver <mhw@netris.org>
To: Marko Rauhamaa <marko@pacujo.net>
Cc: guile-user@gnu.org
Subject: Re: Guile 2.0 interpretation vs compilation
Date: Mon, 06 Oct 2014 00:22:07 -0400 [thread overview]
Message-ID: <87d2a5esk0.fsf@netris.org> (raw)
In-Reply-To: <87d2a693st.fsf@elektro.pacujo.net> (Marko Rauhamaa's message of "Sun, 05 Oct 2014 14:03:30 +0300")
Marko Rauhamaa <marko@pacujo.net> 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
next prev parent reply other threads:[~2014-10-06 4:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-05 11:03 Guile 2.0 interpretation vs compilation Marko Rauhamaa
2014-10-06 4:22 ` Mark H Weaver [this message]
2014-10-06 6:33 ` Marko Rauhamaa
2014-10-06 6:52 ` Mark H Weaver
2014-10-06 7:58 ` Mark H Weaver
2014-10-06 19:05 ` Marko Rauhamaa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2a5esk0.fsf@netris.org \
--to=mhw@netris.org \
--cc=guile-user@gnu.org \
--cc=marko@pacujo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).