* alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 10 Oct 2012 15:31:21 +0000 (19:31 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Wed, 10 Oct 2012 15:31:21 +0000 (19:31 +0400)
* lisp.h (enum pvec_type): Adjust comments and omit explicit
initializer for PVEC_NORMAL_VECTOR.

src/ChangeLog
src/alloc.c
src/lisp.h

index b1aea73..9843349 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
+       * lisp.h (enum pvec_type): Adjust comments and omit explicit
+       initializer for PVEC_NORMAL_VECTOR.
+
 2012-10-10  Paul Eggert  <eggert@cs.ucla.edu>
 
        Clean out old termopts cruft.
index 0cbdef8..95be8db 100644 (file)
@@ -5689,7 +5689,7 @@ mark_object (Lisp_Object arg)
          pvectype = ((ptr->header.size & PVEC_TYPE_MASK)
                      >> PSEUDOVECTOR_SIZE_BITS);
        else
-         pvectype = 0;
+         pvectype = PVEC_NORMAL_VECTOR;
 
        if (pvectype != PVEC_SUBR && pvectype != PVEC_BUFFER)
          CHECK_LIVE (live_vector_p);
index 2a647e5..71e542c 100644 (file)
@@ -345,15 +345,11 @@ static ptrdiff_t const PSEUDOVECTOR_FLAG
       = PSEUDOVECTOR_FLAG;
 
 /* In a pseudovector, the size field actually contains a word with one
-   PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
-   indicate the actual type.
-   We use a bitset, even tho only one of the bits can be set at any
-   particular time just so as to be able to use micro-optimizations such as
-   testing membership of a particular subset of pseudovectors in Fequal.
-   It is not crucial, but there are plenty of bits here, so why not do it?  */
+   PSEUDOVECTOR_FLAG bit set, and one of the following values extracted
+   with PVEC_TYPE_MASK to indicate the actual type.  */
 enum pvec_type
 {
-  PVEC_NORMAL_VECTOR = 0,      /* Unused!  */
+  PVEC_NORMAL_VECTOR,
   PVEC_FREE,
   PVEC_PROCESS,
   PVEC_FRAME,