From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: "simplifications" Date: Mon, 19 Nov 2007 22:59:05 -0500 Message-ID: References: <86ejem1pig.fsf@lola.quinscape.zz> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1195531162 31318 80.91.229.12 (20 Nov 2007 03:59:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2007 03:59:22 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 20 04:59:28 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IuKGj-0001hy-VH for ged-emacs-devel@m.gmane.org; Tue, 20 Nov 2007 04:59:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuKGW-00012c-BM for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2007 22:59:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IuKGS-00010S-LO for emacs-devel@gnu.org; Mon, 19 Nov 2007 22:59:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IuKGR-0000xs-E3 for emacs-devel@gnu.org; Mon, 19 Nov 2007 22:59:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuKGR-0000xQ-3q for emacs-devel@gnu.org; Mon, 19 Nov 2007 22:59:07 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IuKGQ-0007Jk-G3 for emacs-devel@gnu.org; Mon, 19 Nov 2007 22:59:06 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1IuKGP-0008OY-IT; Mon, 19 Nov 2007 22:59:05 -0500 In-reply-to: <86ejem1pig.fsf@lola.quinscape.zz> (message from David Kastrup on Mon, 19 Nov 2007 11:46:47 +0100) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83697 Archived-At: Personally, I think that we should make the byte compiler optimize the unnecessary binding away. But until that is the case, please don't gratuitously replace (car (cdr ...)) with (cadr ...). Maybe we could improve the handling of defsubst to recognize that that binding is unnecessary. To handle simple cases like this, it is enough to scan the bytecode instructions and see that they don't call any functions or refer to that variable. I think the place to do this is in `byte-compile-unfold-lambda'. Is someone interested?