News for hackers. Stuff that matters.
Re:Emacs internals: Deconstructing Lisp_Object in C (Part 2) by birdgoose on Sunday March 08, 2026 @01:03PM (#47298902)
The sibling comment explains why we prefer to use the lower bits as a tag (these are guaranteed to be zero if the value is a pointer on a 64-bit system).

Another reason why we wouldn’t want to use the top bit is that, as the parent comment suggested, the tagged pointer representation of a fixnum integer isn’t a pointer at all but is instead twice the number it represents. Generally speaking, we represent integers in twos-complement representation which uses that top bit to determine if the value is positive or negative.

There are no comments on this comment yet.