bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36649: 27.0.50; pure space and pdumper


From: Pip Cet
Subject: bug#36649: 27.0.50; pure space and pdumper
Date: Fri, 5 Mar 2021 03:00:03 +0000

On Thu, Mar 4, 2021 at 9:52 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 3/4/21 6:56 AM, Robert Pluim wrote:
> >      Pip> - zero vector handling depends on Qnil being all zero in memory
> >
> > I think Emacs already assumes Qnil == 0, since there are places that
> > use ! to check for Qnil rather than using NILP.
>
> The convention is to put a "verify (NIL_IS_ZERO);" near the rare bits of
> code that assume Qnil is all-bits-zero.

That would be nice, but I'm quite certain there are places in the code
that rely on this identity without doing that...

> This is to help out any
> hypothetical future developer who wants to change Qnil to be some other
> value. Currently there are only two such locations. (There is one other
> location that uses NIL_IS_ZERO for an optimization.)

When I did the NaN boxing thing, I remember seeing quite a few 0.0s
popping up where I was expecting nil :-)

Anyway, it's easy enough to remove the assumption. Here's the current patch.

Pip

Attachment: 0001-Remove-pure-space-Bug-36649.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]