From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Question regarding Lisp_Object representation of symbols Date: Wed, 06 Mar 2024 14:14:24 +0200 Message-ID: <8634t3lfq7.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1188"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= , Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 06 13:14:55 2024 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 1rhqAg-00006A-VM for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Mar 2024 13:14:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhqAI-0003oW-5p; Wed, 06 Mar 2024 07:14:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhqAG-0003nx-Cm for emacs-devel@gnu.org; Wed, 06 Mar 2024 07:14:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhqAG-0003z5-4E; Wed, 06 Mar 2024 07:14:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ppXDsZdcqcpktOBA6sVkIRK/dgniBkv0OXZtbDWXIFc=; b=iNYzb3fdmpVUVUHFzMoy 6ZJKMYsEw3EKGEi1PfGrUSReoI6i3/ZpdNSg7Pu1n+Gq/xCVRg+ChSDp42/gR9BXZU/f0cs7FB95s tHBvgKNCD6AayIoiLBOyvyKkcPTRIgPx5rIQbdoI6lvgYBDrq0xins0qyyaCZ5VIb503eVlUYr933 WvEMBxukUUpX9DON0zt2xKROHM+MXXkjR/mPT0Ca4ZaITm9xNCT5ziCIW3P9zvforpM80suLe5N2R XlMdoJ9Qyrk0z0j9KqimTgqq9m+eJama754Adfr0lLSZQ4OoMc3NbILoe9+9Z+qSI31UndaunzL6u suMUDVEFagnbyA==; In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Wed, 06 Mar 2024 07:48:31 +0100) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316855 Archived-At: > From: Gerd Möllmann > Date: Wed, 06 Mar 2024 07:48:31 +0100 > > Symbols are currently encoded as words with tag = 0 (= Lisp_Symbol > enumerator), that when untagged are an offset from lispsym (the array of > built-in symbols), not a pointer to some structure like it is done for > other Lisp types. That makes the word 0x0 = Qnil, 0x1 = Qt, and so on. > > My question comes from playing with another GC library, where this > unique encoding is, well, quite inconvenient. So, I'd like to ask two > questions: > > - Does someone remember the reasons why this has been done? > > - Is there something that relies on this? Maybe something that > relies on 0x0 being a valid Lisp_Object? Paul, can you help us answer these questions?