]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp.h:
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 11 Jul 2008 02:30:26 +0000 (02:30 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 11 Jul 2008 02:30:26 +0000 (02:30 +0000)
* 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.

24 files changed:
admin/CPP-DEFINES
etc/PROBLEMS
src/ChangeLog
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

index 0af13230d9eb74e21a69e6057a5cafe87ae6976b..32c13f26f1dc098224c0b2fde35835fe2edc20ef 100644 (file)
@@ -18,6 +18,7 @@ WINDOWSNT     Compiling the native MS-Windows (W32) port.
 __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_SHARED_LIBS
 NO_SIOCTL_H
 NO_SOCK_SIGIO
 NO_TERMIO
-NO_UNION_TYPE
 NSIG
 NSIG_MINIMUM
 NULL
index ec96b19f2bc1e51ee35c2cf91cb3dd270d8687e1..207ea334701e927b14d8280627558957d930c433 100644 (file)
@@ -3757,8 +3757,8 @@ If the code is incorrect, your compiler has this problem.
 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 @@ I hear that some C compilers cannot handle returning a union type.
 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.
 
 \f
 This file is part of GNU Emacs.
index 282bb8f272f5410048af81b138490edc3195ca57..283f8d9ef5ddc061004aa9c81ba75ffd75908c2b 100644 (file)
@@ -1,3 +1,30 @@
+2008-07-11  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * 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.
+
 2008-07-10  Chong Yidong  <cyd@stupidchicken.com>
 
        * xdisp.c (move_it_to): Backtrack if past the edge of a wrapped
index b942e7a6e016315b5c4dab75adf2653431ecc3be..ac28a32164938d604a7eb0942aa6e95741c47638 100644 (file)
@@ -1541,7 +1541,7 @@ mark_interval_tree (tree)
   } while (0)
 
 \f
-/* 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
index b27e787e7e0dd58d6e67ffe7be26a471e121097c..8dfdf9062a13d30a321a873d32c00c24d19bc2f2 100644 (file)
@@ -98,7 +98,7 @@ int gdb_use_lsb = 1;
 #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;
index c4216b74dcdda090da98952f43af0f1401bb6d4f..25a5729237d64c2421a5215e78620287e1660849 100644 (file)
@@ -129,8 +129,8 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 \f
 /***** 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 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
 /* 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 @@ enum Lisp_Misc_Type
 #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 @@ LISP_MAKE_RVALUE (Lisp_Object o)
 #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 @@ enum pvec_type
  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 @@ enum pvec_type
 
 #endif /* not USE_LSB_TAG */
 
-#else /* not NO_UNION_TYPE */
+#else /* USE_LISP_UNION_TYPE */
 
 #define XHASH(a) ((a).i)
 
@@ -472,7 +472,7 @@ enum pvec_type
 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))
 
index 84641bf30659951be4dd01477bf146f94a4f23ca..f1bd6e4b60309480f8ae95ead5c7033ec595a6fa 100644 (file)
@@ -51,15 +51,11 @@ NOTE-END
 /* __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
 
index 20e09adc597554d064ea98d205c9b7e64edba892..34800af8e9d742ac6e6ad19d0459b455f74c2841 100644 (file)
@@ -49,11 +49,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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
 
index d87d461d8f301c24f2f2c6f4ed4b95cca410063c..3b79879574406f31180bd0674d01687218a94643 100644 (file)
@@ -39,8 +39,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #define SIGN_EXTEND_CHAR(c) (((int)(c) << 24) >> 24)
 
-#define NO_UNION_TYPE
-
 #define NO_REMAP
 
 /* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
index 14769077034c332c0369126c0038476da5c436cc..717265d5681569b0fa9a5b07814c4352b59e9dd1 100644 (file)
@@ -32,16 +32,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #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
 
index 2b11fa78540c69198ee73ace7b25a71bb178129d..960228afe40f479fc55252ca9a25baef55538561 100644 (file)
@@ -39,11 +39,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* __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 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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
 
index 40c74688f9fc4e64be89ada63e992c5ac9db0ccd..35f464caa21896053e80464b996cab1de3ff2429 100644 (file)
@@ -41,11 +41,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #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.  */
index 15081b0cfaeaca6561a90be09e599c93a44058c9..f605ed35e7aadb841118d98fd35d4e50a86ca26f 100644 (file)
@@ -32,16 +32,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #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
 
index a3afd23f599d4d63c342cb6dcad04fea6576ec97..31efa03f4800f4a5d066ab070b0e019674e6e8b9 100644 (file)
@@ -45,16 +45,6 @@ NOTE-END */
 
 #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 @@ NOTE-END */
    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
 
index 540760cd575e31f325d0c8c2e93d49b09ab6bda4..9353283c0b200b5bd145ee6c0b4a83b642672eaa 100644 (file)
@@ -57,10 +57,6 @@ NOTE-END */
 
 /* #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. */
index f6fd3f245dfaa87167c2c19036242dcf12102a14..e1d14e6910617f7bafaac98d6deab9540f0781f8 100644 (file)
@@ -41,16 +41,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #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
 
index a62c87951801ed692f0b113b9dde11f49c976f6c..50c8a8e75753f6ef54616366aa9675727e8ecfd9 100644 (file)
@@ -39,16 +39,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #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
 
index eb263526c2d7340ac9fc6a07213a9d7a7dcc7401..c0e53c2e0635ebb17049e4a01cab97827e89821f 100644 (file)
@@ -32,11 +32,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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
index 7b9d658639db7ef91235c6ba8d19c00932712cc1..b446508b9af7403cf061bc14b87c3240601d02da 100644 (file)
@@ -52,16 +52,11 @@ NOTE-END  */
 #      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
 
index 233bf96d7c737051cd4d6178286cdd615fe42507..e75094fa7de23567d2e711ae969f6b85638a32cf 100644 (file)
@@ -38,11 +38,8 @@ NOTE-END  */
 
 /* __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
 
index e447fba7b4bfc5cc60e4e9afc3003fa9a573f071..4b11f87c8a70fa815149ea5095daefc644afe61e 100644 (file)
@@ -36,16 +36,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    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
 
index 35050a11e1054f4a74f29c0200ce238dedcec90b..7a08deb683022203ebfee26c73dc47dfa33fd048 100644 (file)
@@ -57,10 +57,6 @@ NOTE-END  */
 
 /* #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
index 049874635d85112fcbc57ce4062af063ed97565b..d53686d9401dd6977b38665408d80659310eea07 100644 (file)
@@ -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
index 099024e52cd478aeec745d690ff2b67948aa6c5c..4298e6f70a2190ba207070be48cedd40b948a5e5 100644 (file)
@@ -240,7 +240,7 @@ init_heap ()
          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)