worldcom.lisp 6.21 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
10
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/worldcom.lisp,v 1.36 1992/02/15 13:06:01 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)
22
			  (debug-info #-small 2 #+small .5)
23
24
			  (safety #-small 1 #+small 0))
     :optimize-interface '(optimize-interface (safety #-small 2 #+small 1)
25
					      (debug-info .5))
26
     :context-declarations
27
28
     '(((:or :external (:and (:match "%") (:match "SET"))
	     (:member lisp::%put lisp::%rplaca lisp::%rplacd lisp::%puthash))
29
30
	(declare (optimize-interface (safety 2) (debug-info 1))
		 (optimize (debug-info 1))))
31
       ((:or (:and :external :macro)
32
	     (:match "$PARSE-"))
33
34
35
	(declare (optimize (safety 2))))
       ((:and :external (:match "LIST"))
	(declare (optimize (safety 1))))))
ram's avatar
ram committed
36

37
38
39
40
(let ((*features*
       (cons (intern (c:backend-name c:*backend*)
		     (find-package "KEYWORD"))
	     (remove-if #'(lambda (x)
wlott's avatar
wlott committed
41
			    (member x '(:pmax :sparc :rt)))
42
			*features*))))
ram's avatar
ram committed
43

44

45
46
;;; these guys need to be first.
(comf "target:code/struct") ; For structures.
47
48

;;; Assembly files.
49
50
51
52
53
54
(when (string= (c:backend-name c:*backend*) "PMAX")
  (comf "target:assembly/mips/assem-rtns" :assem t)
  (comf "target:assembly/mips/array" :assem t)
  (comf "target:assembly/mips/bit-bash" :assem t)
  (comf "target:assembly/mips/arith" :assem t)
  (comf "target:assembly/mips/alloc" :assem t))
55

56
57
58
59
60
61
(when (string= (c:backend-name c:*backend*) "SPARC")
  (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))
62

wlott's avatar
wlott committed
63
64
65
66
67
(when (string= (c:backend-name c:*backend*) "RT")
  (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))
68
69
70
71
72

;;; 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")
73
(comf "target:code/lispinit")
74
75
(comf "target:code/fdefinition")

76
(comf "target:code/error")
77
78
79
80
81
82

(comf "target:compiler/type")
(comf "target:compiler/generic/vm-type")
(comf "target:compiler/type-init")
(comf "target:code/pred")

83
84
(comf "target:code/alieneval")
(comf "target:code/c-call")
wlott's avatar
wlott committed
85
(comf "target:code/sap")
86
87
88
89
90

(comf "target:code/bit-bash")
(comf "target:code/array")
(comf "target:code/hash")

91
92
(with-compilation-unit
  (:optimize '(optimize (safety 1)))
93
94
  (comf "target:code/list")
  (comf "target:code/seq")) ; seq must come after list
95

96
97
98
(comf "target:code/string")
(comf "target:code/mipsstrops")

wlott's avatar
wlott committed
99
100
101
102
(comf "target:code/unix")
#+mach (comf "target:code/mach")
#+mach (comf "target:code/mach-os")
#+sunos (comf "target:code/sunos-os")
103
104

(when (string= (c:backend-name c:*backend*) "PMAX")
wlott's avatar
wlott committed
105
  (comf "target:code/pmax-vm"))
106
107
(when (string= (c:backend-name c:*backend*) "SPARC")
  (comf "target:code/sparc-vm"))
wlott's avatar
wlott committed
108
109
(when (string= (c:backend-name c:*backend*) "RT")
  (comf "target:code/rt-vm"))
110
111
112
113
114
115
116
117
118
119
120
121
122
123

(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")
124
(comf "target:code/extensions")
125
126
(comf "target:code/commandline")

ram's avatar
ram committed
127
(comf "target:code/room")
128
(comf "target:code/gc")
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
(comf "target:code/purify")
(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")
(pushnew :serve-event *features*)
144
(comf "target:code/fd-stream")
145
146
147
148
(with-compilation-unit ; Until this code is shaken down more...
  (:optimize '(optimize (safety 2) (debug 2)))
  (comf "target:code/pathname")
  (comf "target:code/filesys"))
149
(comf "target:code/load")
150
151
152
153

(comf "target:code/eval")

(comf "target:code/signal")
wlott's avatar
wlott committed
154
(comf "target:code/interr")
155
156
157
158
(comf "target:code/debug-info")
(comf "target:code/debug-int")
(comf "target:code/debug")

159
160
(comf "target:code/query")
(comf "target:code/rand")
161
(comf "target:code/trace")
chiles's avatar
   
chiles committed
162
(comf "target:code/ntrace")
ram's avatar
ram committed
163
(comf "target:code/profile")
164
165
166
(comf "target:code/sort")
(comf "target:code/sysmacs")
(comf "target:code/time")
167
(comf "target:code/weak")
wlott's avatar
wlott committed
168
(comf "target:code/final")
ram's avatar
ram committed
169
170

;;; Later so that miscellaneous structures are defined (not crucial, but nice.)
171
(comf "target:code/describe")
172
#+(and clx (not no-hemlock) pcl)
173
(comf "target:code/inspect")
174
175
176
177
(comf "target:code/tty-inspect")

(comf "target:code/format-time")
(comf "target:code/parse-time")
178
179
180
181
182
183
184
185
(comf "target:code/run-program")

(comf "target:code/loop")

#+clx
(comf "target:code/clx-ext")

(comf "target:code/foreign")
186
187
188
189
(comf "target:code/internet")
(comf "target:code/wire")
(comf "target:code/remote")

ram's avatar
ram committed
190
(comf "target:code/setf-funs")
wlott's avatar
wlott committed
191
(comf "target:code/exports")
ram's avatar
ram committed
192

193
194
195
196
197
198
199
;;; 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
200
(let ((c:*compile-time-define-macros* nil))
201
202
  (comf "target:code/defstruct")
  (comf "target:code/defmacro")
203
204
205
206
207
208
  (comf "target:compiler/globaldb")
  ;; We can't compile anything after macros, 'cause it breaks the running lisp.
  (comf "target:code/macros"))


); let
ram's avatar
ram committed
209
210

); with-compiler-log-file