From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.devel Subject: Re: Nonsensical byte compiler warning. Date: Wed, 04 Apr 2007 23:45:44 +0200 Message-ID: <87ps6jq0dz.fsf@gmx.at> References: <85ps6okoe5.fsf@lola.goethe.zz> <87lkhcj791.fsf@stupidchicken.com> <87tzvwvj6c.fsf@gmx.at> <861wj04qcq.fsf@lola.quinscape.zz> <873b3gpn4u.fsf@gmx.at> <20070404212752.GA2717@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175723160 5391 80.91.229.12 (4 Apr 2007 21:46:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2007 21:46:00 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 04 23:45:57 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 1HZDIh-0005b9-AC for ged-emacs-devel@m.gmane.org; Wed, 04 Apr 2007 23:45:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZDLz-0000vb-Jc for ged-emacs-devel@m.gmane.org; Wed, 04 Apr 2007 17:49:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZDLw-0000vH-92 for emacs-devel@gnu.org; Wed, 04 Apr 2007 17:49:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZDLu-0000v2-Ag for emacs-devel@gnu.org; Wed, 04 Apr 2007 17:49:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZDLu-0000uz-40 for emacs-devel@gnu.org; Wed, 04 Apr 2007 17:49:14 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HZDIa-000651-Mt for emacs-devel@gnu.org; Wed, 04 Apr 2007 17:45:49 -0400 Original-Received: (qmail invoked by alias); 04 Apr 2007 21:45:47 -0000 Original-Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO enterprise) [62.178.240.212] by mail.gmx.net (mp056) with SMTP; 04 Apr 2007 23:45:47 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX18R9ERcJmoRaNtr/Eeem8sKbDQ9Z7vcAPuAaLc6Pd ww3NyVJruij2oP In-Reply-To: <20070404212752.GA2717@muc.de> (Alan Mackenzie's message of "4 Apr 2007 22\:08\:54 +0200\, Wed\, 4 Apr 2007 22\:27\:52 +0100") X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6 (newer, 1) 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:69073 Archived-At: Alan Mackenzie writes: > Would it be easy to make this change to the byte compiler? Alas, no. The optimiser hasn't got the positioning information, and the byte-code emitter potentially doesn't see such calls at all: Conceptually, the optimiser is capable of totally removing unneeded function calls (the code is there, and disabled). Conversely, the positioning code is fragile enough already to warrant keeping it well separated from the optimiser, and limited to the emitter. Now, since unnecessary function calls are currently kept, detection logic from the optimiser could be used in the emitter, but that would duplicate a lot of code, is error-prone, and can, in my view, not yield more useful results than byte-compiling with byte-optimize-log set to t. On top of that, it would result in the same char-before/after confusion, since that rewriting is performed by the optimiser, not the emitter.