changeset 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 424fe1248b56
children c722b7f92ac6
files admin/CPP-DEFINES etc/PROBLEMS src/alloc.c src/emacs.c src/lisp.h src/m/alpha.h src/m/amdx86-64.h src/m/arm.h src/m/hp800.h src/m/ia64.h src/m/ibmrs6000.h src/m/ibms390.h src/m/ibms390x.h src/m/intel386.h src/m/iris4d.h src/m/m68k.h src/m/macppc.h src/m/mips.h src/m/sparc.h src/m/template.h src/m/vax.h src/m/xtensa.h src/w32heap.c
diffstat 23 files changed, 29 insertions(+), 107 deletions(-) [+]
line wrap: on
line diff
--- a/admin/CPP-DEFINES	Fri Jul 11 02:03:23 2008 +0000
+++ b/admin/CPP-DEFINES	Fri Jul 11 02:29:43 2008 +0000
@@ -18,6 +18,7 @@
 __MINGW32__	Compiling the W32 port with the MinGW port of GCC.
 _MSC_VER	Compiling the W32 port with the Microsoft C compiler.
 IRIX6_5         Compiling on Irix-6.5
+USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int.
 
 ** Distinguishing GUIs **
 
@@ -281,7 +282,6 @@
 NO_SIOCTL_H
 NO_SOCK_SIGIO
 NO_TERMIO
-NO_UNION_TYPE
 NSIG
 NSIG_MINIMUM
 NULL
--- a/etc/PROBLEMS	Fri Jul 11 02:03:23 2008 +0000
+++ b/etc/PROBLEMS	Fri Jul 11 02:29:43 2008 +0000
@@ -3757,8 +3757,8 @@
 In the XCONS, etc., macros in lisp.h you must replace (a).u.val with
 ((a).u.val + coercedummy) where coercedummy is declared as int.
 
-This problem will not happen if the m-...h file for your type
-of machine defines NO_UNION_TYPE.  That is the recommended setting now.
+This problem will only happen if USE_LISP_UNION_TYPE is manually
+defined in lisp.h.
 
 *** C compilers lose on returning unions.
 
@@ -3766,8 +3766,8 @@
 Most of the functions in GNU Emacs return type Lisp_Object, which is
 defined as a union on some rare architectures.
 
-This problem will not happen if the m-...h file for your type
-of machine defines NO_UNION_TYPE.
+This problem will only happen if USE_LISP_UNION_TYPE is manually
+defined in lisp.h.
 
 
 This file is part of GNU Emacs.
--- a/src/alloc.c	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/alloc.c	Fri Jul 11 02:29:43 2008 +0000
@@ -1541,7 +1541,7 @@
   } while (0)
 
 
-/* Number support.  If NO_UNION_TYPE isn't in effect, we
+/* Number support.  If USE_LISP_UNION_TYPE is in effect, we
    can't create number objects in macros.  */
 #ifndef make_number
 Lisp_Object
--- a/src/emacs.c	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/emacs.c	Fri Jul 11 02:29:43 2008 +0000
@@ -98,7 +98,7 @@
 #else
 int gdb_use_lsb = 0;
 #endif
-#ifdef NO_UNION_TYPE
+#ifndef USE_LISP_UNION_TYPE
 int gdb_use_union = 0;
 #else
 int gdb_use_union = 1;
--- a/src/lisp.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/lisp.h	Fri Jul 11 02:29:43 2008 +0000
@@ -129,8 +129,8 @@
 
 /***** Select the tagging scheme.  *****/
 /* There are basically two options that control the tagging scheme:
-   - NO_UNION_TYPE says that Lisp_Object should be an integer instead
-     of a union.
+   - USE_LISP_UNION_TYPE says that Lisp_Object should be a union instead
+     of an integer.
    - USE_LSB_TAG means that we can assume the least 3 bits of pointers are
      always 0, and we can thus use them to hold tag bits, without
      restricting our addressing space.
@@ -163,7 +163,7 @@
 /* We also need to be able to specify mult-of-8 alignment on static vars.  */
 # if defined DECL_ALIGN
 /* We currently do not support USE_LSB_TAG with a union Lisp_Object.  */
-#  if defined NO_UNION_TYPE
+#  if defined USE_LISP_UNION_TYPE
 #   define USE_LSB_TAG
 #  endif
 # endif
@@ -246,7 +246,7 @@
 #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
 #endif
 
-#ifndef NO_UNION_TYPE
+#ifdef USE_LISP_UNION_TYPE
 
 #ifndef WORDS_BIG_ENDIAN
 
@@ -310,13 +310,13 @@
 #define LISP_MAKE_RVALUE(o) (o)
 #endif
 
-#else /* NO_UNION_TYPE */
+#else /* USE_LISP_UNION_TYPE */
 
 /* If union type is not wanted, define Lisp_Object as just a number.  */
 
 typedef EMACS_INT Lisp_Object;
 #define LISP_MAKE_RVALUE(o) (0+(o))
-#endif /* NO_UNION_TYPE */
+#endif /* USE_LISP_UNION_TYPE */
 
 /* In the size word of a vector, this bit means the vector has been marked.  */
 
@@ -374,7 +374,7 @@
  For example, if tem is a Lisp_Object whose type is Lisp_Cons,
  XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons.  */
 
-#ifdef NO_UNION_TYPE
+#ifndef USE_LISP_UNION_TYPE
 
 /* Return a perfect hash of the Lisp_Object representation.  */
 #define XHASH(a) (a)
@@ -440,7 +440,7 @@
 
 #endif /* not USE_LSB_TAG */
 
-#else /* not NO_UNION_TYPE */
+#else /* USE_LISP_UNION_TYPE */
 
 #define XHASH(a) ((a).i)
 
@@ -472,7 +472,7 @@
 extern Lisp_Object make_number P_ ((EMACS_INT));
 #endif
 
-#endif /* NO_UNION_TYPE */
+#endif /* USE_LISP_UNION_TYPE */
 
 #define EQ(x, y) (XHASH (x) == XHASH (y))
 
--- a/src/m/alpha.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/alpha.h	Fri Jul 11 02:29:43 2008 +0000
@@ -51,15 +51,11 @@
 /* __alpha defined automatically */
 
 
-/* Use type EMACS_INT rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/amdx86-64.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/amdx86-64.h	Fri Jul 11 02:29:43 2008 +0000
@@ -49,11 +49,6 @@
    orion, tahoe, APOLLO and many others */
 /* __x86_64 defined automatically.  */
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define the type to use.  */
 #define EMACS_INT               long
 #define EMACS_UINT              unsigned long
@@ -63,7 +58,7 @@
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/arm.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/arm.h	Fri Jul 11 02:29:43 2008 +0000
@@ -39,8 +39,6 @@
 
 #define SIGN_EXTEND_CHAR(c) (((int)(c) << 24) >> 24)
 
-#define NO_UNION_TYPE
-
 #define NO_REMAP
 
 /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
--- a/src/m/hp800.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/hp800.h	Fri Jul 11 02:29:43 2008 +0000
@@ -32,16 +32,11 @@
 
 #define NO_ARG_ARRAY
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/ia64.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/ia64.h	Fri Jul 11 02:29:43 2008 +0000
@@ -39,11 +39,6 @@
 /* __ia64__ defined automatically */
 
 
-/* Use type EMACS_INT rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define the type to use.  */
 #define EMACS_INT		long
 #define EMACS_UINT		unsigned long
@@ -53,7 +48,7 @@
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/ibmrs6000.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/ibmrs6000.h	Fri Jul 11 02:29:43 2008 +0000
@@ -41,11 +41,6 @@
 
 #define IBMR2AIX
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define CANNOT_DUMP on machines where unexec does not work.
    Then the function dump-emacs will not be defined
    and temacs will do (load "loadup") automatically unless told otherwise.  */
--- a/src/m/ibms390.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/ibms390.h	Fri Jul 11 02:29:43 2008 +0000
@@ -32,16 +32,11 @@
 
 #define NO_ARG_ARRAY
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/ibms390x.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/ibms390x.h	Fri Jul 11 02:29:43 2008 +0000
@@ -45,16 +45,6 @@
 
 #define NO_ARG_ARRAY
 
-/* Now define a symbol for the cpu type, if your compiler
-   does not define it automatically:
-   Ones defined so far include vax, m68000, ns16000, pyramid,
-   orion, tahoe, APOLLO and many others */
-
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define the type to use.  */
 #define EMACS_INT long
 #define EMACS_UINT unsigned long
@@ -64,7 +54,7 @@
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #undef EXPLICIT_SIGN_EXTEND
 
--- a/src/m/intel386.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/intel386.h	Fri Jul 11 02:29:43 2008 +0000
@@ -57,10 +57,6 @@
 
 /* #define NO_ARG_ARRAY */
 
-/* Use type int rather than a union, to represent Lisp_Object */
-
-#define NO_UNION_TYPE
-
 /* crt0.c, if it is used, should use the i386-bsd style of entry.
    with no extra dummy args.  On USG and XENIX,
    NO_REMAP says this isn't used. */
--- a/src/m/iris4d.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/iris4d.h	Fri Jul 11 02:29:43 2008 +0000
@@ -41,16 +41,11 @@
 #define IRIS_4D
 #endif
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/m68k.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/m68k.h	Fri Jul 11 02:29:43 2008 +0000
@@ -39,16 +39,11 @@
 #define m68k
 #endif
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/macppc.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/macppc.h	Fri Jul 11 02:29:43 2008 +0000
@@ -32,11 +32,6 @@
    Ones defined so far include vax, m68000, ns16000, pyramid,
    orion, tahoe, APOLLO and many others */
 
-/* Use type EMACS_INT rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE long
--- a/src/m/mips.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/mips.h	Fri Jul 11 02:29:43 2008 +0000
@@ -52,16 +52,11 @@
 #	define mips
 #endif
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/sparc.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/sparc.h	Fri Jul 11 02:29:43 2008 +0000
@@ -38,11 +38,8 @@
 
 /* __sparc__ is defined by the compiler by default.  */
 
-/* Use type int rather than a union, to represent Lisp_Object */
-
-#define NO_UNION_TYPE
-
-/* XINT must explicitly sign-extend */
+/* XINT must explicitly sign-extend
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/template.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/template.h	Fri Jul 11 02:29:43 2008 +0000
@@ -36,16 +36,11 @@
    does not define it automatically.
    Ones defined so far include m68k and many others */
 
-/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines.  */
-
-#define NO_UNION_TYPE
-
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the 24-bit bit field into an int.  In other words, if bit fields
    are always unsigned.
 
-   If you use NO_UNION_TYPE, this flag does not matter.  */
+   This flag only matters if you use USE_LISP_UNION_TYPE.  */
 
 #define EXPLICIT_SIGN_EXTEND
 
--- a/src/m/vax.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/vax.h	Fri Jul 11 02:29:43 2008 +0000
@@ -57,10 +57,6 @@
 
 /* #define vax    -- appears to be done automatically  */
 
-/* Use type int rather than a union, to represent Lisp_Object */
-
-#define NO_UNION_TYPE
-
 /* crt0.c should use the vax-bsd style of entry, with no dummy args.  */
 
 #define CRT0_DUMMIES
--- a/src/m/xtensa.h	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/m/xtensa.h	Fri Jul 11 02:29:43 2008 +0000
@@ -3,7 +3,6 @@
 Add a license notice if this grows to > 10 lines of code.  */
 
 #define NO_ARG_ARRAY
-#define NO_UNION_TYPE
 
 #ifdef __LITTLE_ENDIAN
 #undef WORDS_BIG_ENDIAN
--- a/src/w32heap.c	Fri Jul 11 02:03:23 2008 +0000
+++ b/src/w32heap.c	Fri Jul 11 02:29:43 2008 +0000
@@ -240,7 +240,7 @@
 	  exit (1);
 	}
 
-#if defined (NO_UNION_TYPE) && !defined (USE_LSB_TAG)
+#if !defined (USE_LISP_UNION_TYPE) && !defined (USE_LSB_TAG)
       /* Ensure that the addresses don't use the upper tag bits since
 	 the Lisp type goes there.  */
       if (((unsigned long) data_region_base & ~VALMASK) != 0)