unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Question regarding Lisp_Object representation of symbols
Date: Wed, 06 Mar 2024 16:41:16 +0800	[thread overview]
Message-ID: <87msrbzr9v.fsf@yahoo.com> (raw)
In-Reply-To: <m2ttljg8jk.fsf@Pro.fritz.box> ("Gerd Möllmann"'s message of "Wed, 06 Mar 2024 07:48:31 +0100")

Gerd Möllmann <gerd.moellmann@gmail.com> 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.



  reply	other threads:[~2024-03-06  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  6:48 Question regarding Lisp_Object representation of symbols Gerd Möllmann
2024-03-06  8:41 ` Po Lu [this message]
2024-03-06  8:56   ` Gerd Möllmann
2024-03-06 12:14 ` Eli Zaretskii
2024-03-06 20:32   ` Paul Eggert
2024-03-07  4:28     ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msrbzr9v.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).