/[cmucl]/src/tools/comcom.lisp
ViewVC logotype

Contents of /src/tools/comcom.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.54 - (show annotations)
Wed Feb 5 19:32:21 2003 UTC (11 years, 2 months ago) by emarsden
Branch: MAIN
CVS Tags: release-18e-base, remove_negative_zero_not_zero, release-18e-pre2, cold-pcl-base, release-18e, release-18e-pre1
Branch point for: release-18e-branch, cold-pcl
Changes since 1.53: +6 -3 lines
Added a cross-referencing facility to the compiler.

The new XREF package exports function WHO-CALLS, WHO-REFERENCES, WHO-BINDS
and WHO-SETS. These return structures of type XREF-CONTEXT, which contain
the name of the referencing context, the file it was referenced from (or NIL
when compiling from the toplevel), and the source-position in that file.

Also change the names of lambda nodes in IR1 for macros and compiler-macros
to be lists of the form

   (:macro macro-name)
   (:compiler-macro macro-name)

instead of strings of the form "DEFMACRO MACRO-NAME".

Documentation has been added to the User's Manual.

This change shouldn't cause any bootstrapping problems when building.
1 ;;; -*- Package: User -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;;
5 (ext:file-comment
6 "$Header: /tiger/var/lib/cvsroots/cmucl/src/tools/comcom.lisp,v 1.54 2003/02/05 19:32:21 emarsden Exp $")
7 ;;;
8 ;;; **********************************************************************
9 ;;;
10 ;;; Loading this file causes the CMUCL compiler to be compiled.
11 ;;;
12 (in-package "USER")
13
14 #+bootstrap
15 (copy-packages (cons (c::backend-name c::*target-backend*) '("NEW-ASSEM" "C")))
16
17 (defvar *load-stuff*
18 #+bootstrap t
19 #-bootstrap (eq c:*backend* c:*native-backend*))
20
21 (defvar *byte-compile* #+small t #-small :maybe)
22
23 (unless (find-package "OLD-C")
24 (rename-package "C" "C" '("OLD-C")))
25
26 ;;; Import so that these types which appear in the globaldb are the same...
27 #+bootstrap
28 (import '(old-c::approximate-function-type
29 old-c::function-info old-c::defstruct-description
30 old-c::defstruct-slot-description)
31 "C")
32
33
34 (with-compiler-log-file
35 ("target:compile-compiler.log"
36 :optimize
37 '(optimize (speed 2) (space 2) (inhibit-warnings 2)
38 (safety #+small 0 #-small 1)
39 (debug #+small .5 #-small 2))
40 :optimize-interface
41 '(optimize-interface (safety #+small 1 #-small 2)
42 (debug #+small .5 #-small 2))
43 :context-declarations
44 '(#+small
45 ((:or :macro
46 (:match "$SOURCE-TRANSFORM-" "$IR1-CONVERT-"
47 "$PRIMITIVE-TRANSLATE-" "$PARSE-"))
48 (declare (optimize (safety 1))))
49 ((:or :macro (:match "$%PRINT-"))
50 (declare (optimize (speed 0))))
51 (:external (declare (optimize-interface (safety 2) (debug 1))))))
52
53
54 (comf "target:compiler/macros"
55 :byte-compile #+bootstrap t #-bootstrap *byte-compile*)
56 (when *load-stuff*
57 (load "target:compiler/macros"))
58
59 (comf "target:compiler/generic/vm-macs" :proceed t
60 :byte-compile #+bootstrap t #-bootstrap nil)
61 (when *load-stuff*
62 (load "target:compiler/generic/vm-macs"))
63
64 (comf "target:compiler/backend" :proceed t
65 :byte-compile #+bootstrap t #-bootstrap nil)
66 (when *load-stuff*
67 (load "target:compiler/backend"))
68
69 (defvar c::*target-backend* (c::make-backend))
70
71 (comf (vmdir "target:compiler/parms") :proceed t)
72 ;(when *load-stuff*
73 ; (load (vmdir "target:compiler/parms")))
74
75 (comf "target:compiler/generic/objdef" :proceed t)
76 (comf "target:compiler/generic/interr")
77
78 (comf "target:code/struct") ; For defstruct description structures.
79 (comf "target:compiler/proclaim") ; For COOKIE structure.
80 (comf "target:compiler/globals")
81
82 (comf "target:compiler/sset")
83 (comf "target:compiler/bit-util")
84 (comf "target:compiler/node")
85 (comf "target:compiler/ctype")
86 (comf "target:compiler/vop" :proceed t)
87 (comf "target:compiler/vmdef")
88
89 #-bootstrap
90 (comf "target:compiler/meta-vmdef" :proceed t)
91 #+bootstrap ;; pw adds
92 (comf "target:compiler/meta-vmdef" :byte-compile t)
93 (when *load-stuff*
94 (load "target:compiler/meta-vmdef"))
95 (comf "target:compiler/disassem" :byte-compile *byte-compile*)
96 (comf "target:compiler/new-assem")
97 (when *load-stuff*
98 (load "target:compiler/new-assem"))
99 (comf "target:compiler/alloc")
100 (comf "target:compiler/knownfun")
101 (comf "target:compiler/fndb")
102 (comf "target:compiler/generic/vm-fndb")
103 (comf "target:compiler/main")
104
105 (with-compilation-unit
106 (:optimize '(optimize (safety 1)))
107 (comf "target:compiler/ir1tran"))
108
109 (with-compilation-unit
110 (:optimize '(optimize (debug 2)))
111 (comf "target:compiler/ir1util")
112 (comf "target:compiler/ir1opt"))
113
114 (comf "target:compiler/ir1final")
115 ;;try(comf "target:compiler/srctran")
116 (comf "target:compiler/array-tran" :byte-compile *byte-compile*)
117 (comf "target:compiler/seqtran" :byte-compile *byte-compile*)
118 (comf "target:compiler/typetran" :byte-compile *byte-compile*)
119 (comf "target:compiler/generic/vm-typetran" :byte-compile *byte-compile*)
120 (comf "target:compiler/float-tran" :byte-compile *byte-compile*)
121 (comf "target:compiler/saptran" :byte-compile *byte-compile*)
122 (comf "target:compiler/srctran") ;; try
123 (comf "target:compiler/locall")
124 (comf "target:compiler/dfo")
125 (comf "target:compiler/checkgen")
126 (comf "target:compiler/constraint")
127 (comf "target:compiler/envanal")
128
129
130 (comf "target:compiler/tn")
131 (comf "target:compiler/life")
132
133 (comf "target:code/debug-info")
134
135 (comf "target:compiler/debug-dump")
136 (comf "target:compiler/generic/utils")
137 #-bootstrap
138 (comf "target:assembly/assemfile")
139 #+bootstrap
140 (comf "target:assembly/assemfile" :byte-compile t)
141 (when *load-stuff* (load "target:assembly/assemfile"))
142
143
144 (with-compilation-unit
145 (:optimize '(optimize (safety #+small 0 #-small 1) #+small (debug 0)))
146
147 #+original
148 (progn ; this is distributed order
149 (comf (vmdir "target:compiler/insts"))
150 (comf (vmdir "target:compiler/macros") :load *load-stuff*)
151 (comf (vmdir "target:compiler/vm")))
152 #+original
153 (progn ; this works for x86
154 (comf (vmdir "target:compiler/vm"))
155 (comf (vmdir "target:compiler/macros") :load *load-stuff*)
156 (comf (vmdir "target:compiler/insts")))
157 #-tryit
158 (progn ; this also works - better??
159 (comf (vmdir "target:compiler/vm"))
160 (comf (vmdir "target:compiler/insts"))
161 (comf (vmdir "target:compiler/macros")
162 :byte-compile #+bootstrap t #-bootstrap nil)
163 (when *load-stuff*
164 (load (vmdir "target:compiler/macros")))
165 )
166
167 (comf "target:compiler/generic/primtype")
168 (comf (vmdir "target:assembly/support")
169 :byte-compile #+bootstrap t #-bootstrap nil) ; pw
170 (when *load-stuff*
171 (load (vmdir "target:assembly/support")))
172 (comf (vmdir "target:compiler/move"))
173 (comf (vmdir "target:compiler/float") :byte-compile *byte-compile*)
174 (comf (vmdir "target:compiler/sap") :byte-compile *byte-compile*)
175 (comf (vmdir "target:compiler/system") :byte-compile *byte-compile*)
176 (comf (vmdir "target:compiler/char") :byte-compile *byte-compile*)
177 (comf (vmdir "target:compiler/memory"))
178 (comf (vmdir "target:compiler/static-fn"))
179 (comf (vmdir "target:compiler/arith"))
180 (comf (vmdir "target:compiler/subprim") :byte-compile *byte-compile*)
181
182 (comf (vmdir "target:compiler/debug") :byte-compile *byte-compile*)
183 (comf (vmdir "target:compiler/c-call") :byte-compile *byte-compile*)
184 (comf (vmdir "target:compiler/cell"))
185 (comf (vmdir "target:compiler/values") :byte-compile *byte-compile*)
186 (comf (vmdir "target:compiler/alloc"))
187 (comf (vmdir "target:compiler/call"))
188 (comf (vmdir "target:compiler/nlx") :byte-compile *byte-compile*)
189 (comf (vmdir "target:compiler/print") :byte-compile *byte-compile*)
190 (comf (vmdir "target:compiler/array") :byte-compile *byte-compile*)
191 (comf (vmdir "target:compiler/pred"))
192 (comf (vmdir "target:compiler/type-vops") :byte-compile *byte-compile*)
193
194 (comf (vmdir "target:assembly/assem-rtns") :byte-compile *byte-compile*)
195 (comf (vmdir "target:assembly/array") :byte-compile *byte-compile*)
196 (comf (vmdir "target:assembly/arith"))
197 (comf (vmdir "target:assembly/alloc"))
198
199 (comf "target:compiler/pseudo-vops")
200
201 ); with-compilation-unit for back end.
202
203 (comf "target:compiler/aliencomp" :byte-compile *byte-compile*)
204
205 (comf "target:compiler/ltv")
206 (comf "target:compiler/gtn")
207 (with-compilation-unit
208 (:optimize '(optimize (debug 2)))
209 (comf "target:compiler/ltn"))
210 (comf "target:compiler/stack")
211 (comf "target:compiler/control")
212 (comf "target:compiler/entry")
213 (with-compilation-unit
214 (:optimize '(optimize (debug 2)))
215 (comf "target:compiler/ir2tran")
216 (comf "target:compiler/generic/vm-ir2tran"))
217 (comf "target:compiler/copyprop")
218 (with-compilation-unit
219 (:optimize '(optimize (debug 2)))
220 (comf "target:compiler/represent"))
221 (comf "target:compiler/generic/vm-tran")
222 (with-compilation-unit
223 (:optimize '(optimize (debug 2)))
224 (comf "target:compiler/pack"))
225 (comf "target:compiler/codegen")
226 (with-compilation-unit
227 (:optimize '(optimize (debug 2) (safety 2)))
228 (comf "target:compiler/debug" :byte-compile *byte-compile*)
229 (comf "target:compiler/xref" :byte-compile *byte-compile*))
230 #+nil
231 (comf "target:compiler/statcount")
232 (comf "target:compiler/dyncount")
233
234 (comf "target:compiler/dump")
235
236 (comf "target:compiler/generic/core")
237 (comf "target:compiler/generic/new-genesis")
238
239 (comf "target:compiler/eval-comp")
240 (comf "target:compiler/eval")
241 (comf "target:compiler/byte-comp")
242
243 ); with-compiler-error-log

  ViewVC Help
Powered by ViewVC 1.1.5