worldcom.lisp 7 KB
Newer Older
wlott's avatar
wlott committed
1
;;; -*- Package: USER -*-
ram's avatar
ram committed
2
3
;;;
;;; **********************************************************************
wlott's avatar
wlott committed
4
5
6
7
8
9
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; If you want to use this code or any part of CMU Common Lisp, please contact
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
wlott's avatar
wlott committed
10
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/worldcom.lisp,v 1.56 1993/08/15 14:40:33 wlott Exp $")
wlott's avatar
wlott committed
11
;;;
ram's avatar
ram committed
12
;;; **********************************************************************
wlott's avatar
wlott committed
13
14
15
;;;
;;; This file contains noise to compile the lisp world.
;;; 
ram's avatar
ram committed
16
17
18

(in-package "USER")

19
20
21
(with-compiler-log-file
    ("target:compile-lisp.log"
     :optimize '(optimize (speed 2) (space 2) (inhibit-warnings 2)
ram's avatar
ram committed
22
			  (debug #-small 2 #+small .5)
23
24
			  (safety #-small 1 #+small 0))
     :optimize-interface '(optimize-interface (safety #-small 2 #+small 1)
ram's avatar
ram committed
25
					      #+small (debug .5))
26
     :context-declarations
27
28
     '(((:or :external (:and (:match "%") (:match "SET"))
	     (:member lisp::%put lisp::%rplaca lisp::%rplacd lisp::%puthash))
ram's avatar
ram committed
29
30
	(declare (optimize-interface (safety 2) #+small (debug 1))
		 #+small (optimize (debug 1))))
31
       ((:or (:and :external :macro)
32
	     (:match "$PARSE-"))
33
34
35
	(declare (optimize (safety 2))))
       ((:and :external (:match "LIST"))
	(declare (optimize (safety 1))))))
36
(let ((*byte-compile-top-level* nil))
ram's avatar
ram committed
37

38
39
;;; these guys need to be first.
(comf "target:code/struct") ; For structures.
40
(comf "target:code/sysmacs")
41
42

;;; Assembly files.
43
(when (c:backend-featurep :pmax)
44
45
46
47
  (comf "target:assembly/mips/assem-rtns" :assem t)
  (comf "target:assembly/mips/array" :assem t)
  (comf "target:assembly/mips/arith" :assem t)
  (comf "target:assembly/mips/alloc" :assem t))
48

49
(when (c:backend-featurep :sparc)
50
51
52
53
54
  (comf "target:assembly/sparc/assem-rtns" :assem t)
  (comf "target:assembly/sparc/array" :assem t)
  (comf "target:assembly/sparc/bit-bash" :assem t)
  (comf "target:assembly/sparc/arith" :assem t)
  (comf "target:assembly/sparc/alloc" :assem t))
55

56
(when (c:backend-featurep :rt)
wlott's avatar
wlott committed
57
58
59
60
  (comf "target:assembly/rt/assem-rtns" :assem t)
  (comf "target:assembly/rt/array" :assem t)
  (comf "target:assembly/rt/arith" :assem t)
  (comf "target:assembly/rt/alloc" :assem t))
61

wlott's avatar
wlott committed
62
63
64
65
66
67
68
69
70
71
72
73
(when (c:backend-featurep :hppa)
  (comf "target:assembly/hppa/assem-rtns" :assem t)
  (comf "target:assembly/hppa/array" :assem t)
  (comf "target:assembly/hppa/arith" :assem t)
  (comf "target:assembly/hppa/alloc" :assem t))

(when (c:backend-featurep :x86)
  (comf "target:assembly/x86/assem-rtns" :assem t)
  (comf "target:assembly/x86/array" :assem t)
  (comf "target:assembly/x86/arith" :assem t)
  (comf "target:assembly/x86/alloc" :assem t))

74
75
76
77
;;; these guys can supposedly come in any order, but not really.
;;; some are put at the end so macros don't run interpreted and stuff.

(comf "target:code/kernel")
78
(comf "target:code/lispinit")
79
80
(comf "target:code/fdefinition")

81
(comf "target:code/error")
82

83
84
85
86
;;; prevent deftypes from taking effect at compile time so that we don't
;;; install interpreted type expanders causing the compiler to infinitely
;;; recurse.
(defvar *original-%deftype* #'lisp::%deftype)
ram's avatar
ram committed
87
(setf (fdefinition 'lisp::%deftype) #'list)
88
(comf "target:code/typedefs")
89
90
91
92
93

(with-compilation-unit
  (:optimize '(optimize (safety 2) (debug 2)))
  (comf "target:code/class"))

94
(comf "target:code/type")
95
(comf "target:compiler/generic/vm-type")
96
(comf "target:code/type-init")
97
(comf "target:code/pred")
98
(setf (fdefinition 'lisp::%deftype) *original-%deftype*)
99

100
101
(comf "target:code/alieneval")
(comf "target:code/c-call")
wlott's avatar
wlott committed
102
(comf "target:code/sap")
103
104

(comf "target:code/bit-bash")
ram's avatar
ram committed
105
(comf "target:code/byte-interp")
106
107
108
(comf "target:code/array")
(comf "target:code/hash")

109
110
(with-compilation-unit
  (:optimize '(optimize (safety 1)))
111
112
  (comf "target:code/list")
  (comf "target:code/seq")) ; seq must come after list
113

114
115
116
(comf "target:code/string")
(comf "target:code/mipsstrops")

wlott's avatar
wlott committed
117
(comf "target:code/unix")
118
(when (c:backend-featurep :mach)
wlott's avatar
wlott committed
119
120
  (comf "target:code/mach")
  (comf "target:code/mach-os"))
121
(when (c:backend-featurep :sunos)
wlott's avatar
wlott committed
122
  (comf "target:code/sunos-os"))
123
124
(when (c:backend-featurep :hpux)
  (comf "target:code/hpux-os"))
125

126
(when (c:backend-featurep :pmax)
wlott's avatar
wlott committed
127
  (comf "target:code/pmax-vm"))
128
(when (c:backend-featurep :sparc)
129
  (comf "target:code/sparc-vm"))
130
(when (c:backend-featurep :rt)
wlott's avatar
wlott committed
131
  (comf "target:code/rt-vm"))
wlott's avatar
wlott committed
132
133
134
135
(when (c:backend-featurep :hppa)
  (comf "target:code/hppa-vm"))
(when (c:backend-featurep :x86)
  (comf "target:code/x86-vm"))
136
137
138
139
140
141
142
143
144
145
146
147
148
149

(comf "target:code/symbol")
(comf "target:code/bignum")
(comf "target:code/numbers")
(comf "target:code/float-trap")
(comf "target:code/float")
(comf "target:code/irrat")

(comf "target:code/type-boot")

(comf "target:compiler/proclaim")

(comf "target:code/char")
(comf "target:code/misc")
150
(comf "target:code/extensions")
151
152
(comf "target:code/commandline")

153
154
155
156
157
158
159
160
(unless (c:backend-featurep :gengc)
  (comf "target:code/room")
  (comf "target:code/gc")
  (comf "target:code/purify"))
(when (c:backend-featurep :gengc)
  (comf "target:code/gengc")
  (comf "target:code/scavhook"))

161
162
163
164
165
166
167
168
169
170
171
172
173
(comf "target:code/save")

(comf "target:code/stream")
(comf "target:code/print")
(comf "target:code/pprint")
(comf "target:code/format")

(comf "target:code/package")
(comf "target:code/reader")
(comf "target:code/sharpm")
(comf "target:code/backq")

(comf "target:code/serve-event")
174
(comf "target:code/fd-stream")
175
176
(comf "target:code/pathname")
(comf "target:code/filesys")
177
(comf "target:code/load")
ram's avatar
ram committed
178
(comf "target:code/module")
179
180
181
182

(comf "target:code/eval")

(comf "target:code/signal")
wlott's avatar
wlott committed
183
(comf "target:code/interr")
184
185
186
187
(comf "target:code/debug-info")
(comf "target:code/debug-int")
(comf "target:code/debug")

188
189
(comf "target:code/query")
(comf "target:code/rand")
chiles's avatar
   
chiles committed
190
(comf "target:code/ntrace")
ram's avatar
ram committed
191
(comf "target:code/profile")
192
193
(comf "target:code/sort")
(comf "target:code/time")
194
(comf "target:code/weak")
wlott's avatar
wlott committed
195
(comf "target:code/final")
ram's avatar
ram committed
196
197

;;; Later so that miscellaneous structures are defined (not crucial, but nice.)
198
199
200
201
202
(comf "target:code/describe")
(comf "target:code/tty-inspect")

(comf "target:code/format-time")
(comf "target:code/parse-time")
203
204
205
206
207
(comf "target:code/run-program")

(comf "target:code/loop")

(comf "target:code/foreign")
208
209
210
(comf "target:code/internet")
(comf "target:code/wire")
(comf "target:code/remote")
wlott's avatar
wlott committed
211
(comf "target:code/cmu-site")
212

ram's avatar
ram committed
213
(comf "target:code/setf-funs")
214
(comf "target:code/exports" :proceed t)
ram's avatar
ram committed
215

216
217
218
219
220
221
222
;;; Compile basic macros that we assume are already in the compilation
;;; environment.  We inhibit compile-time definition to prevent these functions
;;; from becoming interpreted.  In some cases, this is necessary for
;;; compilation to work at all, since the expander functions are lazily
;;; converted: we could go into an infinite recursion trying to convert the
;;; definition of a macro which uses itself.
;;;
ram's avatar
ram committed
223
(let ((c:*compile-time-define-macros* nil))
224
225
  (comf "target:code/defstruct")
  (comf "target:code/defmacro")
226
227
228
229
  (comf "target:compiler/globaldb")
  ;; We can't compile anything after macros, 'cause it breaks the running lisp.
  (comf "target:code/macros"))

230
); let *byte-compile-top-level*
231

ram's avatar
ram committed
232
); with-compiler-log-file