comparison src/lisp.h @ 96602:0e3e875ffade

* lisp.h: * w32heap.c: * emacs.c: * alloc.c: Replace all references of NO_UNION_TYPE with USE_LISP_UNION_TYPE. * m/xtensa.h (NO_UNION_TYPE): * m/vax.h (NO_UNION_TYPE): * m/template.h (NO_UNION_TYPE): * m/sparc.h (NO_UNION_TYPE): * m/mips.h (NO_UNION_TYPE): * m/macppc.h (NO_UNION_TYPE): * m/m68k.h (NO_UNION_TYPE): * m/iris4d.h (NO_UNION_TYPE): * m/intel386.h (NO_UNION_TYPE): * m/ibms390x.h (NO_UNION_TYPE): * m/ibms390.h (NO_UNION_TYPE): * m/ibmrs6000.h (NO_UNION_TYPE): * m/ia64.h (NO_UNION_TYPE): * m/hp800.h (NO_UNION_TYPE): * m/arm.h (NO_UNION_TYPE): * m/amdx86-64.h (NO_UNION_TYPE): * m/alpha.h (NO_UNION_TYPE): Remove definition, all platform were defining it the same.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 11 Jul 2008 02:29:43 +0000
parents 51cac201b263
children e592a5426865
comparison
equal deleted inserted replaced
96601:424fe1248b56 96602:0e3e875ffade
127 #endif 127 #endif
128 #endif /* ENABLE_CHECKING */ 128 #endif /* ENABLE_CHECKING */
129 129
130 /***** Select the tagging scheme. *****/ 130 /***** Select the tagging scheme. *****/
131 /* There are basically two options that control the tagging scheme: 131 /* There are basically two options that control the tagging scheme:
132 - NO_UNION_TYPE says that Lisp_Object should be an integer instead 132 - USE_LISP_UNION_TYPE says that Lisp_Object should be a union instead
133 of a union. 133 of an integer.
134 - USE_LSB_TAG means that we can assume the least 3 bits of pointers are 134 - USE_LSB_TAG means that we can assume the least 3 bits of pointers are
135 always 0, and we can thus use them to hold tag bits, without 135 always 0, and we can thus use them to hold tag bits, without
136 restricting our addressing space. 136 restricting our addressing space.
137 137
138 If USE_LSB_TAG is not set, then we use the top 3 bits for tagging, thus 138 If USE_LSB_TAG is not set, then we use the top 3 bits for tagging, thus
161 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */ 161 /* Let's USE_LSB_TAG on systems where we know malloc returns mult-of-8. */
162 #if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined MAC_OSX 162 #if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined MAC_OSX
163 /* We also need to be able to specify mult-of-8 alignment on static vars. */ 163 /* We also need to be able to specify mult-of-8 alignment on static vars. */
164 # if defined DECL_ALIGN 164 # if defined DECL_ALIGN
165 /* We currently do not support USE_LSB_TAG with a union Lisp_Object. */ 165 /* We currently do not support USE_LSB_TAG with a union Lisp_Object. */
166 # if defined NO_UNION_TYPE 166 # if defined USE_LISP_UNION_TYPE
167 # define USE_LSB_TAG 167 # define USE_LSB_TAG
168 # endif 168 # endif
169 # endif 169 # endif
170 #endif 170 #endif
171 171
244 /* These values are overridden by the m- file on some machines. */ 244 /* These values are overridden by the m- file on some machines. */
245 #ifndef VALBITS 245 #ifndef VALBITS
246 #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) 246 #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
247 #endif 247 #endif
248 248
249 #ifndef NO_UNION_TYPE 249 #ifdef USE_LISP_UNION_TYPE
250 250
251 #ifndef WORDS_BIG_ENDIAN 251 #ifndef WORDS_BIG_ENDIAN
252 252
253 /* Definition of Lisp_Object for little-endian machines. */ 253 /* Definition of Lisp_Object for little-endian machines. */
254 254
308 modifying the location in question, but the casting could cover 308 modifying the location in question, but the casting could cover
309 other type-related bugs. */ 309 other type-related bugs. */
310 #define LISP_MAKE_RVALUE(o) (o) 310 #define LISP_MAKE_RVALUE(o) (o)
311 #endif 311 #endif
312 312
313 #else /* NO_UNION_TYPE */ 313 #else /* USE_LISP_UNION_TYPE */
314 314
315 /* If union type is not wanted, define Lisp_Object as just a number. */ 315 /* If union type is not wanted, define Lisp_Object as just a number. */
316 316
317 typedef EMACS_INT Lisp_Object; 317 typedef EMACS_INT Lisp_Object;
318 #define LISP_MAKE_RVALUE(o) (0+(o)) 318 #define LISP_MAKE_RVALUE(o) (0+(o))
319 #endif /* NO_UNION_TYPE */ 319 #endif /* USE_LISP_UNION_TYPE */
320 320
321 /* In the size word of a vector, this bit means the vector has been marked. */ 321 /* In the size word of a vector, this bit means the vector has been marked. */
322 322
323 #define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1)) 323 #define ARRAY_MARK_FLAG ((EMACS_UINT) 1 << (BITS_PER_EMACS_INT - 1))
324 324
372 372
373 /* These macros extract various sorts of values from a Lisp_Object. 373 /* These macros extract various sorts of values from a Lisp_Object.
374 For example, if tem is a Lisp_Object whose type is Lisp_Cons, 374 For example, if tem is a Lisp_Object whose type is Lisp_Cons,
375 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */ 375 XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */
376 376
377 #ifdef NO_UNION_TYPE 377 #ifndef USE_LISP_UNION_TYPE
378 378
379 /* Return a perfect hash of the Lisp_Object representation. */ 379 /* Return a perfect hash of the Lisp_Object representation. */
380 #define XHASH(a) (a) 380 #define XHASH(a) (a)
381 381
382 #ifdef USE_LSB_TAG 382 #ifdef USE_LSB_TAG
438 #define make_number(N) \ 438 #define make_number(N) \
439 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) 439 ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS)
440 440
441 #endif /* not USE_LSB_TAG */ 441 #endif /* not USE_LSB_TAG */
442 442
443 #else /* not NO_UNION_TYPE */ 443 #else /* USE_LISP_UNION_TYPE */
444 444
445 #define XHASH(a) ((a).i) 445 #define XHASH(a) ((a).i)
446 446
447 #define XTYPE(a) ((enum Lisp_Type) (a).u.type) 447 #define XTYPE(a) ((enum Lisp_Type) (a).u.type)
448 448
470 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) 470 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
471 #else 471 #else
472 extern Lisp_Object make_number P_ ((EMACS_INT)); 472 extern Lisp_Object make_number P_ ((EMACS_INT));
473 #endif 473 #endif
474 474
475 #endif /* NO_UNION_TYPE */ 475 #endif /* USE_LISP_UNION_TYPE */
476 476
477 #define EQ(x, y) (XHASH (x) == XHASH (y)) 477 #define EQ(x, y) (XHASH (x) == XHASH (y))
478 478
479 #ifndef XPNTR 479 #ifndef XPNTR
480 #ifdef HAVE_SHM 480 #ifdef HAVE_SHM