From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Skipping unexec via a big .elc file Date: Sat, 14 Jan 2017 11:26:58 +0000 Message-ID: <20170114112658.GA4824@acm.fritz.box> References: <83tw9bb42m.fsf@gnu.org> <349ED8B9-C34B-495B-9FB5-E72CE6EFCA38@raeburn.org> <87inpni6xa.fsf@linux-m68k.org> <8360lmesso.fsf@gnu.org> <3B044D64-7C94-42D7-BE1B-7A9CA76C5A67@raeburn.org> <83k29xc49v.fsf@gnu.org> <83eg05c32y.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1484393253 11789 195.159.176.226 (14 Jan 2017 11:27:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 14 Jan 2017 11:27:33 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: raeburn@raeburn.org, Andreas Schwab , monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 14 12:27:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cSMUT-00022H-Q5 for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 12:27:21 +0100 Original-Received: from localhost ([::1]:47446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSMUY-0004V5-3R for ged-emacs-devel@m.gmane.org; Sat, 14 Jan 2017 06:27:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSMUR-0004RM-RH for emacs-devel@gnu.org; Sat, 14 Jan 2017 06:27:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSMUN-0003JT-DY for emacs-devel@gnu.org; Sat, 14 Jan 2017 06:27:19 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:24869 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1cSMUN-0003J3-7a for emacs-devel@gnu.org; Sat, 14 Jan 2017 06:27:15 -0500 Original-Received: (qmail 65258 invoked by uid 3782); 14 Jan 2017 11:27:13 -0000 Original-Received: from acm.muc.de (p548C6A03.dip0.t-ipconnect.de [84.140.106.3]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 14 Jan 2017 12:27:12 +0100 Original-Received: (qmail 4868 invoked by uid 1000); 14 Jan 2017 11:26:58 -0000 Content-Disposition: inline In-Reply-To: <83eg05c32y.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211273 Archived-At: Hello, Eli. On Sat, Jan 14, 2017 at 01:07:17PM +0200, Eli Zaretskii wrote: > > From: Andreas Schwab > > Cc: Ken Raeburn , monnier@iro.umontreal.ca, emacs-devel@gnu.org > > Date: Sat, 14 Jan 2017 11:55:42 +0100 > > On Jan 14 2017, Eli Zaretskii wrote: > > > The line number in the error message is bogus, it points to a require > > > line (that's a known issue with byte-compiler error reporting, I > > > think). > > It's not bogus, since the error was raised while the byte-compiler > > evaluated the form there. > It's "bogus" in the sense that it isn't useful for finding the code > which triggered the error. Just as a matter of interest, I spent quite a bit of time in the summer trying to fix this. My approach was this: (i) The modified reader created an association list between each cons it creates and the source code position. (ii) Each time a compiler function transformed such a cons, instead of the function returning the transformed form, it did setcar/setcdr into the original cons to preserve the mapping in the association table. (iii) On emitting an error/warning, the compiler would look up the source code position in the association list. I'm confident that such an approach would work. However, it was an enormous amount of work to adapt the compiler, and I got distracted by other things, so haven't managed to produce anything workable, yet. At least there's already a reliable test suite for this, namely make bootstrap. :-) -- Alan Mackenzie (Nuremberg, Germany).