From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Question regarding Lisp_Object representation of symbols Date: Wed, 06 Mar 2024 09:56:33 +0100 Message-ID: References: <87msrbzr9v.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31998"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 06 09:57:30 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 1rhn5d-0008Ao-NQ for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Mar 2024 09:57:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhn4s-0006mz-Lb; Wed, 06 Mar 2024 03:56:42 -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 1rhn4q-0006mQ-ON for emacs-devel@gnu.org; Wed, 06 Mar 2024 03:56:40 -0500 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhn4o-0000rR-4G for emacs-devel@gnu.org; Wed, 06 Mar 2024 03:56:40 -0500 Original-Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a441d7c6125so169075266b.2 for ; Wed, 06 Mar 2024 00:56:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709715395; x=1710320195; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tz7wECTYej2zMA7dqHXUH0EhdLI15KKNcVF5eZoDcYo=; b=IjHDFy+8fdcoTZfMfZYRwle/nqcQA3fdu4HRYhh2dmbbKRwPAgS6IHsyl7Vso44nT+ 9mXWNZERQW1k+jIzRr7qryp7HnQKq7cawlfuvMzpbFZIaAB0CUwnVaLyvXnpGx2+2ZSD qs9fx+iSmioQ21E+71u/Dc9BLcwEXTbtiMjPwzxvInWFE/wgfV6cwPA0q0SU0eFnwOST kXPxpGiYS16OrevIqiPdnCyWCARcINh1gZFu6zRabO5hR6kx/n656s6V8WeF/w4/rKrc dyKx/YlPyFkwXmrrqnAue0z8ZbtYEhGGumozETm7NNQbWZ189ZujhXrsMdzeluOtnU8t MhZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709715395; x=1710320195; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tz7wECTYej2zMA7dqHXUH0EhdLI15KKNcVF5eZoDcYo=; b=FYg2EBLTL7KnP2D5B/wEv560LG8uWE6cFr1tewNia/f82yvawyOkGiRulkrASzYP9x D+MDsorEF7amNS0XdUYEpQMuph2SmgEBr6b2dI5K+j5J/DU4LI2FfYsF06AtYgc9FeuH ElQOmC9vuKInvqZP9Mkov4gIvlre9ls94K/4fhoTM19mzQEUjygl/S8YSWSRZcNoMKAr yhbINPKQdz5HFDC6x54Udhecl2/TapgSzsjiT1Xn6bfKPWBpfF4vWPc7YDbQu9GiiPZz eCr1d568XBFb4dcJRKVr6LMDcFdO2PM4lQ3MxkdR6SvHDeLH3pZW2a1gIo4qJiZEKiv9 us1Q== X-Gm-Message-State: AOJu0YyAhG2Wm02Timy+bESk6ZCQew3wMxN9ECHfTGxgQfN+ddbGwZOd 3De60w2zINxmZwnR4gFBWFY6gjvixDmvMYAOn55jsAbtOHMFxvZzpJPzKYZE X-Google-Smtp-Source: AGHT+IGkApD128T1AQlzSlsvcww4y1Po13reOWett2/lDzs4MQ32+lIPt4fSMHOY1h1Vu/X6N19Axw== X-Received: by 2002:a17:906:4081:b0:a44:c7ed:e53c with SMTP id u1-20020a170906408100b00a44c7ede53cmr8381446ejj.68.1709715394928; Wed, 06 Mar 2024 00:56:34 -0800 (PST) Original-Received: from Pro.fritz.box (pd9e36636.dip0.t-ipconnect.de. [217.227.102.54]) by smtp.gmail.com with ESMTPSA id js18-20020a170906ca9200b00a45be04f00fsm310409ejb.171.2024.03.06.00.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 00:56:34 -0800 (PST) In-Reply-To: <87msrbzr9v.fsf@yahoo.com> (Po Lu's message of "Wed, 06 Mar 2024 16:41:16 +0800") Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316850 Archived-At: Po Lu writes: > Gerd M=C3=B6llmann writes: > >> - Does someone remember the reasons why this has been done? > > To speed up comparisons between objects and Qnil, I think. > >> - Is there something that relies on this? Maybe something that >> relies on 0x0 being a valid Lisp_Object? > > Yes, in the many places where memset/memclear is invoked to initialize > Lisp_Object fields or variables, for instance. It's supposed to be the > case that these instances are marked with NIL_IS_ZERO for easy locating > if the representation of Qnil is ever to be changed, but that convention > is not observed in practice, or is actively circumvented, as by callers > of memclear, which defeat the purpose of that marker by calling this one > of its bearers to initialize a variety of structures that may or may not > comprise only Lisp_Objects, greatly inflating the number of callers that > must be examined before such a change in object representation. Thank you very much, that was really helpful!