unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: emacs-devel@gnu.org
Subject: Question regarding Lisp_Object representation of symbols
Date: Wed, 06 Mar 2024 07:48:31 +0100	[thread overview]
Message-ID: <m2ttljg8jk.fsf@Pro.fritz.box> (raw)

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?

Thanks!



             reply	other threads:[~2024-03-06  6:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  6:48 Gerd Möllmann [this message]
2024-03-06  8:41 ` Question regarding Lisp_Object representation of symbols Po Lu
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=m2ttljg8jk.fsf@Pro.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).