GNU bug report logs -
#54990
Byte compiler bug
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sun, 17 Apr 2022 12:59:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Mattias.
On Mon, May 02, 2022 at 15:45:25 +0200, Mattias EngdegÄrd wrote:
> 21 apr. 2022 kl. 11.49 skrev Alan Mackenzie <acm <at> muc.de>:
> > This is now clear. byte-compile is compiling a form, not source code,
> > so unless the form was read with symbol positions, it won't have them.
> > In byte-compile-file, symbol positions are stripped as the byte code
> > gets output to the file.elc. So the symbol positions were not in the
> > ..elc.
> > Only in compile-defun were there positions, and they "survived".
> Thank you for dealing with this. My next question would be why the bug
> only affected switch hash table keys and no other constants. Do you
> know?
The handling of a cond form which compiles to a hash table is anamolous.
This table is essentially byte code, yet is created in an early phase of
the compilation, when symbols still have their positions. So these
positions have to be handled specially. Other forms are converted to
byte code in a later phase of the compiler, when (nearly) all symbols
have their positions stripped.
> And why did you decide to strip the keys at that point (lowering from
> LAP), and not where other constants are stripped?
To be honest, I can't really remember; I might not have been aware of any
anomaly, here. As a general principle, the positions on symbols are
preserved as long as possible, in case a warning message is yet to be
output.
> I see that you have committed more corrections since; were these
> related?
No, they were not. They were to do with other problems.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 3 years and 81 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.