From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.user Subject: Re: Guile 2.0 interpretation vs compilation Date: Mon, 06 Oct 2014 00:22:07 -0400 Message-ID: <87d2a5esk0.fsf@netris.org> References: <87d2a693st.fsf@elektro.pacujo.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412569363 3179 80.91.229.3 (6 Oct 2014 04:22:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Oct 2014 04:22:43 +0000 (UTC) Cc: guile-user@gnu.org To: Marko Rauhamaa Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Oct 06 06:22:36 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xazog-0006Ko-LF for guile-user@m.gmane.org; Mon, 06 Oct 2014 06:22:34 +0200 Original-Received: from localhost ([::1]:49911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xazog-00030Y-8m for guile-user@m.gmane.org; Mon, 06 Oct 2014 00:22:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XazoS-00030K-Kc for guile-user@gnu.org; Mon, 06 Oct 2014 00:22:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XazoM-000481-IM for guile-user@gnu.org; Mon, 06 Oct 2014 00:22:20 -0400 Original-Received: from world.peace.net ([96.39.62.75]:55818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XazoM-00047t-Eh for guile-user@gnu.org; Mon, 06 Oct 2014 00:22:14 -0400 Original-Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XazoF-00018G-An; Mon, 06 Oct 2014 00:22:07 -0400 In-Reply-To: <87d2a693st.fsf@elektro.pacujo.net> (Marko Rauhamaa's message of "Sun, 05 Oct 2014 14:03:30 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11566 Archived-At: Marko Rauhamaa 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