Mercurial > hg > xemacs-beta
annotate src/m/powerpc.h @ 5327:d1b17a33450b
Move the heavy lifting from cl-seq.el to C.
src/ChangeLog addition:
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
Move the heavy lifting from cl-seq.el to C, finally making those
functions first-class XEmacs citizens, with circularity checking,
built-in support for tests other than #'eql, and as much
compatibility with current Common Lisp as Paul Dietz' tests require.
* fns.c (check_eq_nokey, check_eq_key, check_eql_nokey)
(check_eql_key, check_equal_nokey, check_equal_key)
(check_equalp_nokey, check_equalp_key, check_string_match_nokey)
(check_string_match_key, check_other_nokey, check_other_key)
(check_if_nokey, check_if_key, check_match_eq_key)
(check_match_eql_key, check_match_equal_key)
(check_match_equalp_key, check_match_other_key): New. These are
basically to provide function pointers to be used by Lisp
functions that take TEST, TEST-NOT and KEY arguments.
(get_check_match_function_1, get_check_test_function)
(get_check_match_function): These functions work out which of the
previous list of functions to use, given the keywords supplied by
the user.
(count_with_tail): New. This is the bones of #'count.
(list_count_from_end, string_count_from_end): Utility functions
for #'count.
(Fcount): New, moved from cl-seq.el.
(list_position_cons_before): New. The implementation of #'member*,
and important in implementing various other functions.
(FmemberX, Fadjoin, FassocX, FrassocX, Fposition, Ffind)
(FdeleteX, FremoveX, Fdelete_duplicates, Fremove_duplicates)
(Fnsubstitute, Fsubstitute, Fsublis, Fnsublis, Fsubst, Fnsubst)
(Ftree_equal, Fmismatch, Fsearch, Fintersection, Fnintersection)
(Fsubsetp, Fset_difference, Fnset_difference, Fnunion, Funion)
(Fset_exclusive_or, Fnset_exclusive_or): New, moved here from
cl-seq.el.
(position): New. The implementation of #'find and #'position.
(list_delete_duplicates_from_end, subst, sublis, nsublis)
(tree_equal, mismatch_from_end, mismatch_list_list)
(mismatch_list_string, mismatch_list_array)
(mismatch_string_array, mismatch_string_string)
(mismatch_array_array, get_mismatch_func): Helper C functions for
the Lisp-visible functions.
(venn, nvenn): New. The implementation of the main Lisp functions that
treat lists as sets.
lisp/ChangeLog addition:
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* cl-seq.el:
Move the heavy lifting from this file to C. Dump the
cl-parsing-keywords macro, but don't use defun* for the functions
we define that do take keywords, dynamic scope lossage makes that
not practical.
* subr.el (sort, fillarray): Move these aliases here.
(map-plist): #'nsublis is now built-in, but at this point #'eql
isn't necessarily available as a test; use #'eq.
* obsolete.el (cl-delete-duplicates): Make this available for old
compiler macros and old code.
(memql): Document that this is equivalent to #'member*, and worse.
* cl.el (adjoin, subst): Removed. These are in C.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 30 Dec 2010 01:59:52 +0000 |
parents | ecf1ebac70d8 |
children | 308d34e9f07d 861f2601a38b |
rev | line source |
---|---|
428 | 1 /* machine description file for Power PC |
2 Copyright (C) 1987, 1994 Free Software Foundation, Inc. | |
3 Copyright (C) 1995 Board of Trustees, University of Illinois | |
4 | |
5 This file is part of XEmacs. | |
6 | |
7 XEmacs is free software; you can redistribute it and/or modify | |
8 it under the terms of the GNU General Public License as published by | |
9 the Free Software Foundation; either version 2, or (at your option) | |
10 any later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* The following line tells the configuration script what sort of | |
23 operating system this machine is likely to run. | |
24 USUAL-OPSYS="solaris2-5" */ | |
25 | |
26 #ifdef NOT_C_CODE | |
27 # define POWERPC | |
28 #else | |
29 # ifndef powerpc | |
30 # define powerpc | |
31 # endif | |
32 #endif | |
33 | |
34 #ifdef __GNUC__ | |
35 # define C_OPTIMIZE_SWITCH "-O" | |
36 #else | |
37 /* XEmacs change */ | |
38 # ifdef USE_LCC | |
39 # define C_OPTIMIZE_SWITCH "-O4 -Oi" | |
40 # else | |
41 /* This level of optimization is reported to work. */ | |
42 # define C_OPTIMIZE_SWITCH "-O2" | |
43 # endif | |
44 #endif | |
45 | |
46 #ifndef __linux__ | |
47 /* Data type of load average, as read out of kmem. */ | |
48 | |
49 #define LOAD_AVE_TYPE long | |
50 | |
51 /* Convert that into an integer that is 100 for a load average of 1.0 */ | |
52 | |
53 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) | |
54 #else /* mklinux */ | |
55 | |
56 /* Define addresses, macros, change some setup for dump */ | |
57 | |
58 #define NO_REMAP | |
59 | |
60 #define N_BADMAG(x) BADMAG(x) | |
61 #define N_TXTOFF(x) A_TEXTPOS(x) | |
62 #define N_SYMOFF(x) A_SYMPOS(x) | |
63 /* #define A_TEXT_OFFSET(HDR) sizeof(HDR) */ | |
64 /* #define ADJUST_EXEC_HEADER \ | |
65 unexec_text_start += sizeof(hdr); \ | |
66 unexec_data_start = ohdr.a_dbase | |
67 */ | |
68 #undef ADDR_CORRECT | |
69 #define ADDR_CORRECT(x) ((int)(x)) | |
70 | |
71 /* Specify the font for X to use. | |
72 This used to be Rom14.500; that's nice on the X server shipped with | |
73 the RS/6000, but it's not available on other servers. */ | |
74 #define X_DEFAULT_FONT "fixed" | |
75 | |
76 /* Here override various assumptions in ymakefile */ | |
77 | |
78 /* #undef START_FILES */ | |
79 /* #define HAVE_SYSVIPC */ | |
80 | |
81 /* Don't try to include sioctl.h or ptem.h. */ | |
82 #undef NEED_SIOCTL | |
83 #undef NEED_PTEM_H | |
84 | |
85 #define ORDINARY_LINK | |
86 /*#define LD_SWITCH_MACHINE -T ${srcdir}/src/ppc.ldscript*/ | |
87 #endif |