emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal: block-based vector allocator


From: Paul Eggert
Subject: Re: Proposal: block-based vector allocator
Date: Fri, 01 Jun 2012 17:32:54 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/01/2012 10:36 AM, Stefan Monnier wrote:
> with lisp-union-type the C code doesn't really care or know
> whether the tags are on LSB or MSB anyway

True, but USE_LSB_TAG doesn't mean "the internal
representation of Emacs objects uses low-order tag bits".
It means "when tagging, ignore the low order
bits of pointers because it's safe to assume they're zero".
This is not quite the same thing (and perhaps suggests that
USE_LSB_TAG is a poorly-chosen name...).

To put it another way, lisp.h has code in the
USE_LISP_UNION_TYPE case that behaves differently
depending on whether USE_LSB_TAG is set.  Also, the
comment that Dmitry noted is out of date: USE_LSB_TAG does
work when combined with USE_LISP_UNION_TYPE.

This whole area is in a bit of a mess.  It's not just
that comment.  While looking into this and cleaning it up
I also found the following:

 * The union data structure depends on WORDS_BIGENDIAN
   for no particularly good reason nowadays, and this just
   confuses things.

 * The w32heap code is confused about this, and thinks that
   USE_LISP_UNION_TYPE invalidates USE_LSB_TAG, which maybe
   used to be true but is no longer true.

 * There's no way for the builder to force a build
   without USE_LSB_TAG (Dmitry's point).

 * There are a few annoying warnings if you compile unions
   with gcc -Wall.

You can find the patch for all this at
<http://bugs.gnu.org/11604>.  I'll CC: Eli
since this affects w32 code.



reply via email to

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