diff --git a/src/ChangeLog b/src/ChangeLog index e7ed7c36f78870984e825c8cfd2edee4c977de68..60b543765ad56684619aea0037d3204218bf3dfb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,26 @@ +2010-04-25 Dan Nicolaescu + + Remove all NO_ARG_ARRAY uses. + * fns.c (concat2, concat3, nconc2): + * eval.c (apply1, call1, call2, call3, call4, call5, call6) + (call7): Remove NO_ARG_ARRAY usage, assume it's always true. + * m/xtensa.h (NO_ARG_ARRAY): + * m/template.h (NO_ARG_ARRAY): + * m/sparc.h (NO_ARG_ARRAY): + * m/sh3.h (NO_ARG_ARRAY): + * m/mips.h (NO_ARG_ARRAY): + * m/macppc.h (NO_ARG_ARRAY): + * m/iris4d.h (NO_ARG_ARRAY): + * m/intel386.h (NO_ARG_ARRAY): + * m/ibms390x.h (NO_ARG_ARRAY): + * m/ibms390.h (NO_ARG_ARRAY): + * m/ibmrs6000.h (NO_ARG_ARRAY): + * m/ia64.h (NO_ARG_ARRAY): + * m/hp800.h (NO_ARG_ARRAY): + * m/arm.h (NO_ARG_ARRAY): + * m/amdx86-64.h (NO_ARG_ARRAY): + * m/alpha.h (NO_ARG_ARRAY): Remove definition. + 2010-04-25 Eli Zaretskii * xdisp.c (display_line): Don't assume 2nd call to diff --git a/src/eval.c b/src/eval.c index 501ffd452cbc9cf8e9b9c468961f2332ecd4ab02..184455f7e7d34d7a08f40cad774274bf9136231c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2786,7 +2786,6 @@ apply1 (fn, arg) if (NILP (arg)) RETURN_UNGCPRO (Ffuncall (1, &fn)); gcpro1.nvars = 2; -#ifdef NO_ARG_ARRAY { Lisp_Object args[2]; args[0] = fn; @@ -2794,9 +2793,6 @@ apply1 (fn, arg) gcpro1.var = args; RETURN_UNGCPRO (Fapply (2, args)); } -#else /* not NO_ARG_ARRAY */ - RETURN_UNGCPRO (Fapply (2, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn on no arguments */ @@ -2817,7 +2813,6 @@ call1 (fn, arg1) Lisp_Object fn, arg1; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[2]; args[0] = fn; @@ -2825,11 +2820,6 @@ call1 (fn, arg1) GCPRO1 (args[0]); gcpro1.nvars = 2; RETURN_UNGCPRO (Ffuncall (2, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 2; - RETURN_UNGCPRO (Ffuncall (2, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 2 arguments arg1, arg2 */ @@ -2839,7 +2829,6 @@ call2 (fn, arg1, arg2) Lisp_Object fn, arg1, arg2; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[3]; args[0] = fn; args[1] = arg1; @@ -2847,11 +2836,6 @@ call2 (fn, arg1, arg2) GCPRO1 (args[0]); gcpro1.nvars = 3; RETURN_UNGCPRO (Ffuncall (3, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 3; - RETURN_UNGCPRO (Ffuncall (3, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 3 arguments arg1, arg2, arg3 */ @@ -2861,7 +2845,6 @@ call3 (fn, arg1, arg2, arg3) Lisp_Object fn, arg1, arg2, arg3; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[4]; args[0] = fn; args[1] = arg1; @@ -2870,11 +2853,6 @@ call3 (fn, arg1, arg2, arg3) GCPRO1 (args[0]); gcpro1.nvars = 4; RETURN_UNGCPRO (Ffuncall (4, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 4; - RETURN_UNGCPRO (Ffuncall (4, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 4 arguments arg1, arg2, arg3, arg4 */ @@ -2884,7 +2862,6 @@ call4 (fn, arg1, arg2, arg3, arg4) Lisp_Object fn, arg1, arg2, arg3, arg4; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[5]; args[0] = fn; args[1] = arg1; @@ -2894,11 +2871,6 @@ call4 (fn, arg1, arg2, arg3, arg4) GCPRO1 (args[0]); gcpro1.nvars = 5; RETURN_UNGCPRO (Ffuncall (5, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 5; - RETURN_UNGCPRO (Ffuncall (5, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 5 arguments arg1, arg2, arg3, arg4, arg5 */ @@ -2908,7 +2880,6 @@ call5 (fn, arg1, arg2, arg3, arg4, arg5) Lisp_Object fn, arg1, arg2, arg3, arg4, arg5; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[6]; args[0] = fn; args[1] = arg1; @@ -2919,11 +2890,6 @@ call5 (fn, arg1, arg2, arg3, arg4, arg5) GCPRO1 (args[0]); gcpro1.nvars = 6; RETURN_UNGCPRO (Ffuncall (6, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 6; - RETURN_UNGCPRO (Ffuncall (6, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 6 arguments arg1, arg2, arg3, arg4, arg5, arg6 */ @@ -2933,7 +2899,6 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[7]; args[0] = fn; args[1] = arg1; @@ -2945,11 +2910,6 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) GCPRO1 (args[0]); gcpro1.nvars = 7; RETURN_UNGCPRO (Ffuncall (7, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 7; - RETURN_UNGCPRO (Ffuncall (7, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* Call function fn with 7 arguments arg1, arg2, arg3, arg4, arg5, arg6, arg7 */ @@ -2959,7 +2919,6 @@ call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7) Lisp_Object fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7; { struct gcpro gcpro1; -#ifdef NO_ARG_ARRAY Lisp_Object args[8]; args[0] = fn; args[1] = arg1; @@ -2972,11 +2931,6 @@ call7 (fn, arg1, arg2, arg3, arg4, arg5, arg6, arg7) GCPRO1 (args[0]); gcpro1.nvars = 8; RETURN_UNGCPRO (Ffuncall (8, args)); -#else /* not NO_ARG_ARRAY */ - GCPRO1 (fn); - gcpro1.nvars = 8; - RETURN_UNGCPRO (Ffuncall (8, &fn)); -#endif /* not NO_ARG_ARRAY */ } /* The caller should GCPRO all the elements of ARGS. */ diff --git a/src/fns.c b/src/fns.c index 0100ff228f28d847f7fcb7ab56b052f79d52cac6..b4d132ea0c150c8a6d8a16b7246e8f4e78ded893 100644 --- a/src/fns.c +++ b/src/fns.c @@ -392,14 +392,10 @@ Lisp_Object concat2 (s1, s2) Lisp_Object s1, s2; { -#ifdef NO_ARG_ARRAY Lisp_Object args[2]; args[0] = s1; args[1] = s2; return concat (2, args, Lisp_String, 0); -#else - return concat (2, &s1, Lisp_String, 0); -#endif /* NO_ARG_ARRAY */ } /* ARGSUSED */ @@ -407,15 +403,11 @@ Lisp_Object concat3 (s1, s2, s3) Lisp_Object s1, s2, s3; { -#ifdef NO_ARG_ARRAY Lisp_Object args[3]; args[0] = s1; args[1] = s2; args[2] = s3; return concat (3, args, Lisp_String, 0); -#else - return concat (3, &s1, Lisp_String, 0); -#endif /* NO_ARG_ARRAY */ } DEFUN ("append", Fappend, Sappend, 0, MANY, 0, @@ -2344,14 +2336,10 @@ Lisp_Object nconc2 (s1, s2) Lisp_Object s1, s2; { -#ifdef NO_ARG_ARRAY Lisp_Object args[2]; args[0] = s1; args[1] = s2; return Fnconc (2, args); -#else - return Fnconc (2, &s1); -#endif /* NO_ARG_ARRAY */ } DEFUN ("nconc", Fnconc, Snconc, 0, MANY, 0, diff --git a/src/m/alpha.h b/src/m/alpha.h index 065a0dd7d71935b691c4c08247d3aafa52b2e1d3..80f9d6c02fe97e88a71581c57286098494a5498d 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h @@ -41,11 +41,6 @@ NOTE-END #undef WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* Now define a symbol for the cpu type, if your compiler does not define it automatically. */ diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index 0fe99af4f55f0302ae75768840c9af1092505d92..6d27c950ce4e30338bb6216976becd2077957a4b 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h @@ -38,11 +38,6 @@ along with GNU Emacs. If not, see . */ #undef WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#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, diff --git a/src/m/arm.h b/src/m/arm.h index b04c5ecc1d9d0b4e8b7dafeeb933f73ee21f0ab5..441c3bd62891f4b35820551816ded9a2a2def686 100644 --- a/src/m/arm.h +++ b/src/m/arm.h @@ -24,16 +24,6 @@ along with GNU Emacs. If not, see . */ #undef WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. We can't - * do this on the arm with gcc, since the first 4 args are in registers. */ - -#ifdef __GNUC__ -#define NO_ARG_ARRAY -#else -#undef NO_ARG_ARRAY -#endif - #define NO_REMAP /* armin76@gentoo.org reported that the lgcc_s flag is necessary to diff --git a/src/m/hp800.h b/src/m/hp800.h index 0712a2c330910844c04c213ca8a688c0e2831a94..7b6ebafeaa50e2fabf00e62d7680a02dc528ef02 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h @@ -27,11 +27,6 @@ along with GNU Emacs. If not, see . */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* 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. diff --git a/src/m/ia64.h b/src/m/ia64.h index 188697b7e898b8b47e4fba0744dbcd0833ca18e6..85e0f82520278d23b8a86b0ad86813499e01794c 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -26,11 +26,6 @@ along with GNU Emacs. If not, see . */ #undef WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* Now define a symbol for the cpu type, if your compiler does not define it automatically. */ diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index a7d35cc8ab7eb5a0b02817df5de0d948c5c971de..a62cb5d19873921d3dfef268bca093f1cea36754 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h @@ -22,11 +22,6 @@ along with GNU Emacs. If not, see . */ operating system this machine is likely to run. USUAL-OPSYS="aix3-1" */ -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* Now define a symbol for the cpu type, if your compiler does not define it automatically. */ diff --git a/src/m/ibms390.h b/src/m/ibms390.h index 794ab8695119a99875839ccd5356017928fba05f..efcd58daba3bd9d7aee1d81a872ec026c813feed 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h @@ -27,11 +27,6 @@ along with GNU Emacs. If not, see . */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* 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. diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index ea0fa11ec3f7d9987faf6e21bf98b8b5dd84563e..3026266b3492ec7105ba743bf5d84a3b868bcc26 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h @@ -40,11 +40,6 @@ NOTE-END */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* Define the type to use. */ #define EMACS_INT long #define EMACS_UINT unsigned long diff --git a/src/m/intel386.h b/src/m/intel386.h index 1bf3462d2ad8794d7d8367cec86dbd708e57aa11..e2e22c3a53848dbe43894c13e7e39fd6b3385879 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h @@ -39,11 +39,6 @@ NOTE-END */ #undef WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -/* #define NO_ARG_ARRAY */ - #ifdef USG #define TEXT_START 0 #endif /* USG */ @@ -51,7 +46,6 @@ NOTE-END */ #ifdef WINDOWSNT #define VIRT_ADDR_VARIES #define DATA_START get_data_start () -#define NO_ARG_ARRAY #endif #ifdef GNU_LINUX diff --git a/src/m/iris4d.h b/src/m/iris4d.h index 1c276ecb167ab6dc0a4376ab65379681cd47f6b7..a5532fcf715c2d39b58fb4d1b0271a6e88e676a0 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h @@ -23,11 +23,6 @@ along with GNU Emacs. If not, see . */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* 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. diff --git a/src/m/macppc.h b/src/m/macppc.h index 77772521ed7b2669484b60323efdefc5d76be6f1..112c15ed8e4c0bbdc6e10dde602082d3604f5440 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h @@ -22,11 +22,6 @@ along with GNU Emacs. If not, see . */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long diff --git a/src/m/mips.h b/src/m/mips.h index 4828b7479fc3e24bd1867c72397f47b2df223fd7..e93ab2810932720a6e143dea3ba7c7fcb8674417 100644 --- a/src/m/mips.h +++ b/src/m/mips.h @@ -33,11 +33,6 @@ NOTE-END */ #define WORDS_BIG_ENDIAN #endif -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* 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. diff --git a/src/m/sh3.h b/src/m/sh3.h index bb8e2937b018db815fb36b50f0b1956d040e9153..703513d23f79381ec42f6c96620533ff13b508ff 100644 --- a/src/m/sh3.h +++ b/src/m/sh3.h @@ -4,7 +4,5 @@ # define WORDS_BIG_ENDIAN #endif -#define NO_ARG_ARRAY - /* arch-tag: 1b01b84f-f044-4afa-aa4b-caa54ec38966 (do not change this comment) */ diff --git a/src/m/sparc.h b/src/m/sparc.h index 3eeb87a2b0e550d8725e4bb1e6e78f9dc42c60cd..b43e56bc3b90726f5908baec86849edb824aca93 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -31,11 +31,6 @@ NOTE-END */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#define NO_ARG_ARRAY - /* __sparc__ is defined by the compiler by default. */ /* XINT must explicitly sign-extend diff --git a/src/m/template.h b/src/m/template.h index 6e0dbb79844d65b94c1bfa0d1622a9be933d7937..d96af80a84ecfca951114e7e62caa9af49a4f676 100644 --- a/src/m/template.h +++ b/src/m/template.h @@ -27,11 +27,6 @@ along with GNU Emacs. If not, see . */ #define WORDS_BIG_ENDIAN -/* Define NO_ARG_ARRAY if you cannot take the address of the first of a - * group of arguments and treat it as an array of the arguments. */ - -#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 m68k and many others */ diff --git a/src/m/xtensa.h b/src/m/xtensa.h index d53686d9401dd6977b38665408d80659310eea07..664f18dcb100eb47123ac2c479d789239a99a20a 100644 --- a/src/m/xtensa.h +++ b/src/m/xtensa.h @@ -2,8 +2,6 @@ Add a license notice if this grows to > 10 lines of code. */ -#define NO_ARG_ARRAY - #ifdef __LITTLE_ENDIAN #undef WORDS_BIG_ENDIAN #else