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: Thoughts on getting correct line numbers in the byte compiler's warning messages Date: Tue, 6 Nov 2018 08:53:09 +0000 Message-ID: <20181106085309.GA4030@ACM> References: <20181101175953.GC4504@ACM> <20181105105302.GA10520@ACM> <83y3a7cya8.fsf@gnu.org> <20181105165137.GB10520@ACM> <9501281ffee54511aa682d04a5b01e11@lanl.gov> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1541494337 8149 195.159.176.226 (6 Nov 2018 08:52:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2018 08:52:17 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Eli Zaretskii , "monnier@iro.umontreal.ca" , "emacs-devel@gnu.org" To: "Herring, Davis" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 06 09:52:13 2018 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 1gJx5o-0001zY-KO for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2018 09:52:12 +0100 Original-Received: from localhost ([::1]:39693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJx7v-0006eo-4p for ged-emacs-devel@m.gmane.org; Tue, 06 Nov 2018 03:54:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJx7i-0006dP-5K for emacs-devel@gnu.org; Tue, 06 Nov 2018 03:54:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJx7d-0006UI-U5 for emacs-devel@gnu.org; Tue, 06 Nov 2018 03:54:10 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:27170 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gJx7d-0006TZ-Lc for emacs-devel@gnu.org; Tue, 06 Nov 2018 03:54:05 -0500 Original-Received: (qmail 72292 invoked by uid 3782); 6 Nov 2018 08:54:04 -0000 Original-Received: from acm.muc.de (p5B14799F.dip0.t-ipconnect.de [91.20.121.159]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 06 Nov 2018 09:54:03 +0100 Original-Received: (qmail 4034 invoked by uid 1000); 6 Nov 2018 08:53:09 -0000 Content-Disposition: inline In-Reply-To: <9501281ffee54511aa682d04a5b01e11@lanl.gov> 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.1 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:231039 Archived-At: Hello, Davis. On Tue, Nov 06, 2018 at 04:34:30 +0000, Herring, Davis wrote: > > I've spend many hours at my PC, trying to figure out a neat way of > > solving this problem. The above is the best I've been able to come up > > with, so far. > Considering patterns like AoS vs. SoA, could the reader produce (on > demand) a pair: the expression read and a parallel structure of > position information? For example, > '(foo > bar [baz]) > => > ((quote (foo bar)) . > (0 (2 6 [11]))) > where the numbers are character offsets from the beginning of the > read? This loses information on the opening delimiter for each > list/cons/vector; it could be added with certain obvious alterations > to the location structure if that's a problem. Such a structure could be generated easily. But how are we going to use it? The problem is how do we associate a particular piece of the main structure with the pertinent bit of the auxiliary structure? For example, at the time we're compiling baz, the byte compiler has just baz itself. How do we get to the 11 in the offsets structure? This is the essence of the problem - associating data with the elements of an arbitrary structure of lisp objects. My proposal from yesterday does this rigorously. > Davis -- Alan Mackenzie (Nuremberg, Germany).