From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#54990: Byte compiler bug Date: Mon, 2 May 2022 18:46:45 +0000 Message-ID: References: <1417691E-D86C-4318-9320-BA5B0E162C55@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Lars Ingebrigtsen , 54990@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 02 20:47:22 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlb4s-0001bj-Cn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 20:47:22 +0200 Original-Received: from localhost ([::1]:51776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlb4q-0001db-TC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 May 2022 14:47:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlb4Y-0001bN-E7 for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 14:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlb4Y-00044G-3e for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 14:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlb4X-0003ya-S6 for bug-gnu-emacs@gnu.org; Mon, 02 May 2022 14:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 May 2022 18:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54990 X-GNU-PR-Package: emacs Original-Received: via spool by 54990-submit@debbugs.gnu.org id=B54990.165151721415267 (code B ref 54990); Mon, 02 May 2022 18:47:01 +0000 Original-Received: (at 54990) by debbugs.gnu.org; 2 May 2022 18:46:54 +0000 Original-Received: from localhost ([127.0.0.1]:38004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlb4Q-0003yB-H5 for submit@debbugs.gnu.org; Mon, 02 May 2022 14:46:54 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:29014 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1nlb4P-0003xn-6R for 54990@debbugs.gnu.org; Mon, 02 May 2022 14:46:53 -0400 Original-Received: (qmail 43514 invoked by uid 3782); 2 May 2022 18:46:46 -0000 Original-Received: from acm.muc.de (p4fe15a64.dip0.t-ipconnect.de [79.225.90.100]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 02 May 2022 20:46:45 +0200 Original-Received: (qmail 3320 invoked by uid 1000); 2 May 2022 18:46:45 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:231279 Archived-At: 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 : > > 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).