[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thoughts on getting correct line numbers in the byte compiler's warn
From: |
Alan Mackenzie |
Subject: |
Re: Thoughts on getting correct line numbers in the byte compiler's warning messages |
Date: |
Mon, 12 Nov 2018 15:44:48 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Stefan and Eli.
A snag.....
On Thu, Nov 08, 2018 at 14:08:43 +0000, Alan Mackenzie wrote:
[ .... ]
> One thing we'd need to watch out for is using equal, not eq, when we
> compare symbols. (eq 'foo #<symbol foo with position 73>) will surely
> be nil, but (equal ....) would be t. Same with member and memq.
Unfortunately, this isn't going to work. There will be macros which do
things like:
(cond ((eq (car form) 'bar) ....) .....)
Here, (car form) is going to be #<symbol bar at 42>, so the eq is going
to return nil.
The only way out of this I can see at the moment is to amend eq (and
memq, assq, delq, ....) so that it recognises a symbol with position as
being eq to the bare symbol.
At least when the flag variable symbols-with-pos-enabled is currently
non-nil. At the implementation level, when that variable is nil (i.e.
for normal running), there would be a cost of one comparison of an
in-cache variable with zero on each eq operation which returns nil.
This isn't pretty. If this modification of eq, memq, .... is too much
to take, then I think the current approach is doomed to failure.
What do you think?
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, (continued)
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/08
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Stefan Monnier, 2018/11/08
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/08
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/11
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Eli Zaretskii, 2018/11/11
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/11
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Stefan Monnier, 2018/11/11
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Eli Zaretskii, 2018/11/11
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Eli Zaretskii, 2018/11/12
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/12
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages,
Alan Mackenzie <=
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Stefan Monnier, 2018/11/12
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/12
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Stefan Monnier, 2018/11/14
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/15
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Stefan Monnier, 2018/11/15
- Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Alan Mackenzie, 2018/11/16
Re: Thoughts on getting correct line numbers in the byte compiler's warning messages, Michael Heerdegen, 2018/11/07