From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: expression Date: Thu, 24 Jun 2010 15:05:38 +0200 Message-ID: References: <867048CD-FB59-4D61-A944-03E4BE4D2960@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1277384661 13886 80.91.229.12 (24 Jun 2010 13:04:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Jun 2010 13:04:21 +0000 (UTC) Cc: Ken Raeburn , guile-devel@gnu.org To: Michael Lucy Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Jun 24 15:04:19 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ORm6M-00061V-IA for guile-devel@m.gmane.org; Thu, 24 Jun 2010 15:04:18 +0200 Original-Received: from localhost ([127.0.0.1]:47211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORm6M-0004Dq-3P for guile-devel@m.gmane.org; Thu, 24 Jun 2010 09:04:18 -0400 Original-Received: from [140.186.70.92] (port=36490 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORm6E-0004BN-4T for guile-devel@gnu.org; Thu, 24 Jun 2010 09:04:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORm6C-0000wM-Po for guile-devel@gnu.org; Thu, 24 Jun 2010 09:04:09 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:65022 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORm6C-0000wF-Md for guile-devel@gnu.org; Thu, 24 Jun 2010 09:04:08 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 8AE2DBE516; Thu, 24 Jun 2010 09:04:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=r8RGRMJGcsRaauKL42p6CQNOVQ8=; b=HrjuZO y3nUBo7ENhUENBtQ6V9YCcchwV8P71gnF/Tsu5fjF823KmN8aqt98tSQT3V/DLD1 85HulwkagaTbAaNjXQcLMQd1lUVtA/z1ls5XMpZsWAUoQw2Ic5QkhjajYcXFTw1b 1y5RGCerfF5Q8MYpp2zoImOvpJeG3wDVOJVDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=uHhiQUNbwVa7EXLPtQtUHVIXPgBzDihp ACi80xJMiWB1d4b8r4NGifB9iBsyYHP4+6jeFSFaSM4F8Qpsk6OMGTHr+Lk8gji4 35glOIHtt3CAuA/0jbMmbdlb1o/GKJMMKW7OTITDADAvy9T12nXkcOaaP+fNB5iM WYf6rANhw54= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 4E135BE515; Thu, 24 Jun 2010 09:04:06 -0400 (EDT) Original-Received: from unquote (unknown [83.32.68.226]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 8101EBE514; Thu, 24 Jun 2010 09:04:03 -0400 (EDT) In-Reply-To: (Michael Lucy's message of "Thu, 24 Jun 2010 02:52:26 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: F857E56A-7F90-11DF-BD7F-9056EE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10564 Archived-At: Hi, On Thu 24 Jun 2010 09:52, Michael Lucy writes: > scheme@(guile-user)> ,c (begin a b 1) > Disassembly of #: > > 0 (assert-nargs-ee/locals 0) > 2 (load-symbol "a") ;; a > 7 (link-now) > 8 (variable-ref) > 9 (drop) > 10 (load-symbol "b") ;; b > 15 (link-now) > 16 (variable-ref) > 17 (drop) > 18 (make-int8:1) ;; 1 > 19 (return) > > Out of curiosity, why are variables left in? Are there situations > where evaluating a variable will have side-effects? Global variable references can cause side effects (exceptions, module autoloads, binders, duplicates handlers, etc) so they are not optimized out. Lexical references cannot cause side effects, so they are optimized out. Andy -- http://wingolog.org/