From: BT Templeton Date: Thu, 5 Jul 2012 00:38:52 +0000 (-0400) Subject: remove ARRAY_MARK_FLAG X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/f2b0b0d1abf9eb532cbcb7ee9d422882c41a4ab3 remove ARRAY_MARK_FLAG * 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. --- diff --git a/src/.gdbinit b/src/.gdbinit index fd2e871ff3..963d8e94c0 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -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) diff --git a/src/lisp.h b/src/lisp.h index 10e7be1d13..59bb19e976 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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; } diff --git a/src/lread.c b/src/lread.c index a9bb431e2c..3142d5a990 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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;