[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstr

From: Alan Mackenzie
Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps.
Date: Thu, 29 Nov 2018 22:05:52 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Paul.

On Thu, Nov 29, 2018 at 13:28:06 -0800, Paul Eggert wrote:
> On 11/28/18 4:04 AM, Alan Mackenzie wrote:

> > Assuming the macro is compiled, just where are these cons positions
> > going to be stored?

> The same place we store the rest of compiled output. That is, when we 
> byte-compile macros, we store the uncompiled macros (with source-pos 
> info) into the .elc file. Then, any code that wants accurate line number 
> or similar debugging information for the macro can use the uncompiled 
> version. It's pretty common to bloat object files to support debugging 
> in this way.

> This approach wouldn't work for .elc files generated by older versions 
> of Emacs, but that's OK; the old macros should still work, it's just 
> that the byte-compiler's diagnostics will be just as bad as before.

The above is completely irrelevant to the question at hand.  We're not
talking about macros generating messages for invalid input.  we're
talking about generating message positions for the source being

[ .... ]

> > You're wrong, here.  Symbols-with-pos works on the output from macros.
> > Conses-with-pos will only do so for some "nice" macros, ones which
> > preserve their input conses.

> I'm afraid we'll have to disagree here, as I can see examples where 
> symbols-with-pos fails ....

I can't.  Please give an example, so I can see what you're talking about.

> .... and conses-with-pos works (as well as vice versa). The only good
> way I see to resolve the disagreement would be to build it both ways
> and see which typically works better in the real world. A daunting
> prospect, admittedly.

Symbols-with-pos exists, works, and works well.

Conses-with-pos doesn't exist, hence doesn't work.  I doubt it can work.
Can you create it?

To create scratch/accurate-warning-pos took a fair amount of work, but
not that much.  You can work much faster than I can, so why don't you
hack up a version of the byte-compiler which uses positions of conses to
track source positions?  Bring it to the point where it can successfully
bootstrap Emacs.  Then we can compare the two approaches.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]