remove ARRAY_MARK_FLAG
authorBT Templeton <bpt@hcoop.net>
Thu, 5 Jul 2012 00:38:52 +0000 (20:38 -0400)
committerRobin Templeton <robin@terpri.org>
Sat, 18 Apr 2015 22:49:08 +0000 (18:49 -0400)
* src/lisp.h (ARRAY_MARK_FLAG):
* src/emacs.c (gdb_array_mark_flag): Remove variables not used with the
  new GC. All uses changed.
* src/.gdbinit: Update.

src/.gdbinit
src/lisp.h
src/lread.c

index fd2e871..963d8e9 100644 (file)
@@ -678,7 +678,7 @@ define pvecsize
     echo \n
     output (($size & PSEUDOVECTOR_REST_MASK) >> PSEUDOVECTOR_SIZE_BITS)
   else
-    output ($size & ~ARRAY_MARK_FLAG)
+    output $size
   end
   echo \n
 end
@@ -774,7 +774,7 @@ end
 define xvector
   xgetptr $
   print (struct Lisp_Vector *) $ptr
-  output ($->header.size > 50) ? 0 : ($->contents[0])@($->header.size & ~ARRAY_MARK_FLAG)
+  output ($->header.size > 50) ? 0 : ($->contents[0])@($->header.size)
 echo \n
 end
 document xvector
@@ -1072,7 +1072,7 @@ end
 
 define xprintstr
   set $data = (char *) $arg0->data
-  set $strsize = ($arg0->size_byte < 0) ? ($arg0->size & ~ARRAY_MARK_FLAG) : $arg0->size_byte
+  set $strsize = ($arg0->size_byte < 0) ? $arg0->size : $arg0->size_byte
   # GDB doesn't like zero repetition counts
   if $strsize == 0
     output ""
@@ -1172,7 +1172,7 @@ define xbacktrace
         if ($size & PSEUDOVECTOR_FLAG)
          output (enum pvec_type) (($size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS)
        else
-         output $size & ~ARRAY_MARK_FLAG
+         output $size
        end
       else
         printf "Lisp type %d", $type
@@ -1190,7 +1190,7 @@ end
 
 define xprintbytestr
   set $data = (char *) $arg0->data
-  set $bstrsize = ($arg0->size_byte < 0) ? ($arg0->size & ~ARRAY_MARK_FLAG) : $arg0->size_byte
+  set $bstrsize = ($arg0->size_byte < 0) ? $arg0->size : $arg0->size_byte
   printf "Bytecode: "
   if $bstrsize > 0
     output/u ($arg0->size > 1000) ? 0 : ($data[0])@($bvsize)
index 10e7be1..59bb19e 100644 (file)
@@ -570,17 +570,6 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = false };
 LISP_MACRO_DEFUN (XLI, EMACS_INT, (Lisp_Object o), (o))
 LISP_MACRO_DEFUN (XIL, Lisp_Object, (EMACS_INT i), (i))
 
-/* In the size word of a vector, this bit means the vector has been marked.  */
-
-#define ARRAY_MARK_FLAG_val PTRDIFF_MIN
-#if ENUMABLE (ARRAY_MARK_FLAG_val)
-DEFINE_GDB_SYMBOL_ENUM (ARRAY_MARK_FLAG)
-#else
-DEFINE_GDB_SYMBOL_BEGIN (ptrdiff_t, ARRAY_MARK_FLAG)
-# define ARRAY_MARK_FLAG ARRAY_MARK_FLAG_val
-DEFINE_GDB_SYMBOL_END (ARRAY_MARK_FLAG)
-#endif
-
 /* In the size word of a struct Lisp_Vector, this bit means it's really
    some other vector-like object.  */
 #define PSEUDOVECTOR_FLAG_val (PTRDIFF_MAX - PTRDIFF_MAX / 2)
@@ -1346,7 +1335,7 @@ gc_aset (Lisp_Object array, ptrdiff_t idx, Lisp_Object val)
 {
   /* Like ASET, but also can be used in the garbage collector:
      sweep_weak_table calls set_hash_key etc. while the table is marked.  */
-  eassert (0 <= idx && idx < (ASIZE (array) & ~ARRAY_MARK_FLAG));
+  eassert (0 <= idx && idx < (ASIZE (array)));
   XVECTOR (array)->contents[idx] = val;
 }
 
index a9bb431..3142d5a 100644 (file)
@@ -3976,9 +3976,6 @@ oblookup (Lisp_Object obarray, register const char *ptr, ptrdiff_t size, ptrdiff
 
   obarray = check_obarray (obarray);
   obsize = ASIZE (obarray);
-
-  /* This is sometimes needed in the middle of GC.  */
-  obsize &= ~ARRAY_MARK_FLAG;
   hash = hash_string (ptr, size_byte) % obsize;
   bucket = AREF (obarray, hash);
   oblookup_last_bucket_number = hash;