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: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Fri, 4 Feb 2022 21:24:56 +0000 Message-ID: References: <6a5bb5a08b6337d733c5@heytings.org> <83leyq3kfk.fsf@gnu.org> <83a6f631k3.fsf@gnu.org> <838ruq2z5t.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="6415"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, mattiase@acm.org, gregory@heytings.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 04 22:27:33 2022 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 1nG67A-0001Ty-Sl for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 22:27:32 +0100 Original-Received: from localhost ([::1]:46054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nG679-0004Gn-E5 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 16:27:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG64l-0001x7-R8 for emacs-devel@gnu.org; Fri, 04 Feb 2022 16:25:03 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:21745 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nG64i-00055o-F3 for emacs-devel@gnu.org; Fri, 04 Feb 2022 16:25:03 -0500 Original-Received: (qmail 26379 invoked by uid 3782); 4 Feb 2022 21:24:56 -0000 Original-Received: from acm.muc.de (p4fe1584b.dip0.t-ipconnect.de [79.225.88.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 04 Feb 2022 22:24:56 +0100 Original-Received: (qmail 7496 invoked by uid 1000); 4 Feb 2022 21:24:56 -0000 Content-Disposition: inline In-Reply-To: <838ruq2z5t.fsf@gnu.org> 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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:285874 Archived-At: Hello, Eli. On Fri, Feb 04, 2022 at 21:46:06 +0200, Eli Zaretskii wrote: > > Date: Fri, 4 Feb 2022 19:33:28 +0000 > > Cc: gregory@heytings.org, monnier@iro.umontreal.ca, mattiase@acm.org, > > larsi@gnus.org, emacs-devel@gnu.org > > From: Alan Mackenzie > > > > > . comparison of a symbol and symbol-with-pos should only compare the > > > > > symbol part, and disregard the "pos" part, right? > > Yes. > > > > > . if so, couldn't we implement symbol-with-pos as a struct that has > > > > > the symbol at its beginning, and then use memcmp to compare only > > > > > that part? > > > > > Or what am I missing? > > > > I don't think we can get anywhere that way. What gets compared in EQ > > > > are the Lisp_Object's, which are typically already in processor > > > > registers. I don't think we typically have a pointer to memory > > > > containing the symbol with position. > > > Sorry, I don't understand how this answers my questions. > > OK, I don't think we can improve the performance by the use of a struct > > containing the symbol followed by the position. I'm not sure what more I > > can add. > Then let me ask guiding questions. > First, are symbols-with-pos supposed to happen in bytecode that > doesn't deal with byte compilation? Symbols with pos are intended to be used only in compilation, native- as well as byte-. They mustn't be output to .elc files. > If yes, why/when would such objects appear in GP bytecode? What does "GP" mean here, please? > > We cannot extend struct Lisp_Symbol with the position, since a single > > symbol typically occurs several times in different positions. > So? That would just mean there could be several different Lisp > objects whose "symbol parts" are identical, but the position parts are > different. Right? I suppose so, yes. > > > What is there in a symbol-with-pos except the symbol and the position? > > There is the symbol, the position, and a pseudovector header. > The pseudovector part is not needed if we just extend Lisp_Symbol to > have an additional field 'position'. Yes. I'm not sure we can do this, though. -- Alan Mackenzie (Nuremberg, Germany).