aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-11-03 11:19:50 -0700
committerPaul Eggert2012-11-03 11:19:50 -0700
commit0d879dca4648aa15bd3c9ae4ff8b6c39e0c07326 (patch)
tree6dde5e70008e5c4ae3d50f0aa520ec11f65fd89b /src
parent85fabcb7ee546bf689727fb7b26f33414f55b46d (diff)
downloademacs-0d879dca4648aa15bd3c9ae4ff8b6c39e0c07326.tar.gz
emacs-0d879dca4648aa15bd3c9ae4ff8b6c39e0c07326.zip
Omit duplicate definitions no longer needed with gcc -g3.
* lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG) (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM): Define only as macros. There's no longer any need to also define these symbols as enums or as constants, since we now assume gcc -g3 when debugging.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/lisp.h28
2 files changed, 15 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 193246c4fad..3a88b9c7ce2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12012-11-03 Paul Eggert <eggert@cs.ucla.edu>
2
3 Omit duplicate definitions no longer needed with gcc -g3.
4 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
5 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
6 Define only as macros. There's no longer any need to also define
7 these symbols as enums or as constants, since we now assume
8 gcc -g3 when debugging.
9
12012-11-03 Chong Yidong <cyd@gnu.org> 102012-11-03 Chong Yidong <cyd@gnu.org>
2 11
3 * process.c (wait_reading_process_output): Clean up the last 12 * process.c (wait_reading_process_output): Clean up the last
diff --git a/src/lisp.h b/src/lisp.h
index 61671bdaf21..e9f47f4ed27 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -152,20 +152,15 @@ extern bool suppress_checking EXTERNALLY_VISIBLE;
152 on the few static Lisp_Objects used: all the defsubr as well 152 on the few static Lisp_Objects used: all the defsubr as well
153 as the two special buffers buffer_defaults and buffer_local_symbols. */ 153 as the two special buffers buffer_defaults and buffer_local_symbols. */
154 154
155enum Lisp_Bits 155/* Number of bits in a Lisp_Object tag. This can be used in #if. */
156 {
157 /* Number of bits in a Lisp_Object tag. This can be used in #if,
158 and for GDB's sake also as a regular symbol. */
159 GCTYPEBITS =
160#define GCTYPEBITS 3 156#define GCTYPEBITS 3
161 GCTYPEBITS,
162 157
163 /* 2**GCTYPEBITS. This must also be a macro that expands to a 158/* 2**GCTYPEBITS. This must be a macro that expands to a literal
164 literal integer constant, for MSVC. */ 159 integer constant, for MSVC. */
165 GCALIGNMENT =
166#define GCALIGNMENT 8 160#define GCALIGNMENT 8
167 GCALIGNMENT,
168 161
162enum Lisp_Bits
163 {
169 /* Number of bits in a Lisp_Object value, not counting the tag. */ 164 /* Number of bits in a Lisp_Object value, not counting the tag. */
170 VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS, 165 VALBITS = BITS_PER_EMACS_INT - GCTYPEBITS,
171 166
@@ -383,15 +378,11 @@ enum CHECK_LISP_OBJECT_TYPE { CHECK_LISP_OBJECT_TYPE = 0 };
383 378
384/* In the size word of a vector, this bit means the vector has been marked. */ 379/* In the size word of a vector, this bit means the vector has been marked. */
385 380
386static ptrdiff_t const ARRAY_MARK_FLAG
387#define ARRAY_MARK_FLAG PTRDIFF_MIN 381#define ARRAY_MARK_FLAG PTRDIFF_MIN
388 = ARRAY_MARK_FLAG;
389 382
390/* In the size word of a struct Lisp_Vector, this bit means it's really 383/* In the size word of a struct Lisp_Vector, this bit means it's really
391 some other vector-like object. */ 384 some other vector-like object. */
392static ptrdiff_t const PSEUDOVECTOR_FLAG
393#define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2) 385#define PSEUDOVECTOR_FLAG (PTRDIFF_MAX - PTRDIFF_MAX / 2)
394 = PSEUDOVECTOR_FLAG;
395 386
396/* In a pseudovector, the size field actually contains a word with one 387/* In a pseudovector, the size field actually contains a word with one
397 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted 388 PSEUDOVECTOR_FLAG bit set, and one of the following values extracted
@@ -473,9 +464,7 @@ enum lsb_bits
473 464
474#else /* not USE_LSB_TAG */ 465#else /* not USE_LSB_TAG */
475 466
476static EMACS_INT const VALMASK
477#define VALMASK VAL_MAX 467#define VALMASK VAL_MAX
478 = VALMASK;
479 468
480#define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS)) 469#define XTYPE(a) ((enum Lisp_Type) ((EMACS_UINT) XLI (a) >> VALBITS))
481 470
@@ -523,14 +512,9 @@ static EMACS_INT const VALMASK
523#define EQ(x, y) (XHASH (x) == XHASH (y)) 512#define EQ(x, y) (XHASH (x) == XHASH (y))
524 513
525/* Largest and smallest representable fixnum values. These are the C 514/* Largest and smallest representable fixnum values. These are the C
526 values. They are macros for use in static initializers, and 515 values. They are macros for use in static initializers. */
527 constants for visibility to GDB. */
528static EMACS_INT const MOST_POSITIVE_FIXNUM =
529#define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS) 516#define MOST_POSITIVE_FIXNUM (EMACS_INT_MAX >> INTTYPEBITS)
530 MOST_POSITIVE_FIXNUM;
531static EMACS_INT const MOST_NEGATIVE_FIXNUM =
532#define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM) 517#define MOST_NEGATIVE_FIXNUM (-1 - MOST_POSITIVE_FIXNUM)
533 MOST_NEGATIVE_FIXNUM;
534 518
535/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is 519/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
536 written this way so that it also works if I is of unsigned 520 written this way so that it also works if I is of unsigned