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.devel Subject: Re: Correct byte compiler error/warning positions. The solution! Date: Thu, 2 Dec 2021 11:21:13 +0000 Message-ID: References: <83ilwcyc6o.fsf@gnu.org> <8335nfw2pe.fsf@gnu.org> <838rx4s224.fsf@gnu.org> <834k7ss172.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 02 12:22:24 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mskAR-0003e4-O0 for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 12:22:23 +0100 Original-Received: from localhost ([::1]:33688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mskAQ-0008Dw-Fz for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Dec 2021 06:22:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msk9W-0006ul-9K for emacs-devel@gnu.org; Thu, 02 Dec 2021 06:21:26 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:17292 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1msk9N-0007fl-24 for emacs-devel@gnu.org; Thu, 02 Dec 2021 06:21:23 -0500 Original-Received: (qmail 94877 invoked by uid 3782); 2 Dec 2021 11:21:14 -0000 Original-Received: from acm.muc.de (p4fe154df.dip0.t-ipconnect.de [79.225.84.223]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 02 Dec 2021 12:21:14 +0100 Original-Received: (qmail 4977 invoked by uid 1000); 2 Dec 2021 11:21:13 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280747 Archived-At: Hello, Andrea. On Wed, Dec 01, 2021 at 17:53:03 +0000, Andrea Corallo wrote: > Eli Zaretskii writes: > [...] > > If all the benchmarks show a slowdown <= 1%, I'm okay with merging it. > > Thanks. > Another quick note, I think we should evaluate the impact not only with > different benchmarks but also using a native compiled build (ATM the > branch has no support for that). The change to the scratch/correct-warning-pos branch to work with native compilation is probably quite small, but I don't know the native code compiler (comp.el, etc.) at all. Would you help me with it, please. The mechanism of the change was introducing @dfn{symbols with position}. These are embodied in src/lisp.h with a new type tag PVEC_SYMBOL_WITH_POS, and the type struct Lisp_Symbol_With_Pos. The most pertinent changes in the branch are likewise those in src/lisp.h. There, there's a new flag variable, symbols_with_pos_enabled, which is tested in the macros lisp_h_EQ, lisp_h_SYMBOLP, and in the inline function XSYMBOL. There are new "primitive" macros, lisp_h_BASE_EQ, lisp_h_BARE_SYMBOL_P, and the inline function XBARE_SYMBOL. There are a few other things too, like lisp_h_SYMBOL_WITH_POS_P. All these changes can be seen with a git diff between the branch head and the branch point in the master branch. Thanks in advance for the help! > Thanks > Andrea -- Alan Mackenzie (Nuremberg, Germany).