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

Diff of /src/tools/comcom.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19.1.1 by wlott, Sat Nov 16 02:05:16 1991 UTC revision 1.58 by rtoy, Wed Nov 12 15:04:25 2008 UTC
# Line 1  Line 1 
1  ;;; -*- Package: User -*-  ;;; -*- Package: CL-USER -*-
2  ;;;  ;;;
3  (in-package "USER")  ;;; **********************************************************************
4    ;;;
5    (ext:file-comment
6      "$Header$")
7    ;;;
8    ;;; **********************************************************************
9    ;;;
10    ;;; Loading this file causes the CMUCL compiler to be compiled.
11    ;;;
12    (in-package "CL-USER")
13    
14  #+bootstrap  #+bootstrap
15  (copy-packages (cons (c::backend-name c::*target-backend*) '("ASSEM" "C")))  (copy-packages (cons (c::backend-name c::*target-backend*) '("NEW-ASSEM" "C")))
 #+bootstrap  
 (export '(assem::nop) "ASSEM")  
16    
17  (defparameter *load-stuff* #+bootstrap t #-bootstrap nil)  (defvar *load-stuff*
18      #+bootstrap t
19      #-bootstrap (eq c:*backend* c:*native-backend*))
20    
21  ;;; Import so that these types which appear in the globldb are the same...  (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  #+bootstrap
28  (import '(old-c::approximate-function-type  (import '(old-c::approximate-function-type
29            old-c::function-info old-c::defstruct-description            old-c::function-info old-c::defstruct-description
30            old-c::defstruct-slot-description)            old-c::defstruct-slot-description)
31          "C")          "C")
32    
33    
34  (with-compiler-log-file  (with-compiler-log-file
35      ("target:compile-compiler.log"      ("target:compile-compiler.log"
36       :optimize       :optimize
37       '(optimize (speed 2) (space 2) (inhibit-warnings 2)       '(optimize (speed 2) (space 2) (inhibit-warnings 2)
38                  (safety #+small 0 #-small 1)                  (safety #+small 0 #-small 1)
39                  (debug-info #+small .5 #-small 2))                  (debug #+small .5 #-small 2))
40       :optimize-interface       :optimize-interface
41       '(optimize-interface (safety #+small 1 #-small 2)       '(optimize-interface (safety #+small 1 #-small 2)
42                            (debug-info .5))                            (debug #+small .5 #-small 2))
43       :context-declarations       :context-declarations
44       '(#+small       '(#+small
45         ((:or :macro         ((:or :macro
46               (:match "$SOURCE-TRANSFORM-" "$IR1-CONVERT-"               (:match "$SOURCE-TRANSFORM-" "$IR1-CONVERT-"
47                       "$PRIMITIVE-TRANSLATE-" "$PARSE-"))                       "$PRIMITIVE-TRANSLATE-" "$PARSE-"))
48          (declare (optimize (safety 1))))          (declare (optimize (safety 1))))
49         (:external (declare (optimize-interface (safety 2) (debug-info 1))))))         ((:or :macro (:match "$%PRINT-"))
50            (declare (optimize (speed 0))))
51  (comf "target:compiler/macros" :load *load-stuff*)         (:external (declare (optimize-interface (safety 2) (debug 1))))))
52  (comf "target:compiler/generic/vm-macs" :load *load-stuff* :proceed t)  
53  (comf "target:compiler/backend" :load *load-stuff* :proceed t)  
54    (setf lisp::*enable-package-locked-errors* nil)
55    
56    (comf "target:compiler/macros"
57          :byte-compile #+bootstrap t #-bootstrap *byte-compile*)
58    (when *load-stuff*
59      (load "target:compiler/macros"))
60    
61    (comf "target:compiler/generic/vm-macs" :proceed t
62            :byte-compile #+bootstrap t #-bootstrap nil)
63    (when *load-stuff*
64      (load "target:compiler/generic/vm-macs"))
65    
66    (comf "target:compiler/backend" :proceed t
67            :byte-compile #+bootstrap t #-bootstrap nil)
68    (when *load-stuff*
69      (load "target:compiler/backend"))
70    
71  (defvar c::*target-backend* (c::make-backend))  (defvar c::*target-backend* (c::make-backend))
72    
73  (when (string= (old-c:backend-name old-c:*backend*) "R2000")  (comf (vmdir "target:compiler/parms") :proceed t)
74    (comf "target:compiler/mips/parms" :proceed t))  ;(when *load-stuff*
75  (when (string= (old-c:backend-name old-c:*backend*) "SPARC")  ;  (load (vmdir "target:compiler/parms")))
76    (comf "target:compiler/sparc/parms" :proceed t))  
 (when (string= (old-c:backend-name old-c:*backend*) "RT")  
   (comf "target:compiler/rt/params" :proceed t))  
77  (comf "target:compiler/generic/objdef" :proceed t)  (comf "target:compiler/generic/objdef" :proceed t)
78    (comf "target:compiler/generic/interr")
79    
80  (comf "target:code/struct") ; For defstruct description structures.  (comf "target:code/struct") ; For defstruct description structures.
81  (comf "target:compiler/proclaim") ; For COOKIE structure.  (comf "target:compiler/proclaim") ; For COOKIE structure.
82  (comf "target:compiler/globals")  (comf "target:compiler/globals")
83    
 (comf "target:compiler/type")  
 (comf "target:compiler/generic/vm-type")  
 (comf "target:compiler/type-init")  
84  (comf "target:compiler/sset")  (comf "target:compiler/sset")
85    (comf "target:compiler/bit-util")
86  (comf "target:compiler/node")  (comf "target:compiler/node")
87  (comf "target:compiler/ctype")  (comf "target:compiler/ctype")
88  (comf "target:compiler/vop" :proceed t)  (comf "target:compiler/vop" :proceed t)
89  (comf "target:compiler/vmdef" :load *load-stuff* :proceed t)  (comf "target:compiler/vmdef")
90    
91  (comf "target:compiler/assembler" :proceed t)  #-bootstrap
92    (comf "target:compiler/meta-vmdef" :proceed t)
93    #+bootstrap ;; pw adds
94    (comf "target:compiler/meta-vmdef" :byte-compile t)
95    (when *load-stuff*
96      (load "target:compiler/meta-vmdef"))
97    (comf "target:compiler/disassem" :byte-compile *byte-compile*)
98    (comf "target:compiler/new-assem")
99    (when *load-stuff*
100      (load "target:compiler/new-assem"))
101  (comf "target:compiler/alloc")  (comf "target:compiler/alloc")
102  (comf "target:compiler/knownfun")  (comf "target:compiler/knownfun")
103  (comf "target:compiler/fndb")  (comf "target:compiler/fndb")
# Line 68  Line 105 
105  (comf "target:compiler/main")  (comf "target:compiler/main")
106    
107  (with-compilation-unit  (with-compilation-unit
108      (:optimize '(optimize (debug-info 2) (safety 1)))      (:optimize '(optimize (safety 1)))
109    (comf "target:compiler/ir1tran")    (comf "target:compiler/ir1tran"))
110    
111    (with-compilation-unit
112        (:optimize '(optimize (debug 2)))
113    (comf "target:compiler/ir1util")    (comf "target:compiler/ir1util")
114    (comf "target:compiler/ir1opt"))    (comf "target:compiler/ir1opt"))
115    
116    (comf "target:compiler/loop")
117  (comf "target:compiler/ir1final")  (comf "target:compiler/ir1final")
118  (comf "target:compiler/srctran")  ;;try(comf "target:compiler/srctran")
119  (comf "target:compiler/array-tran")  (comf "target:compiler/array-tran" :byte-compile *byte-compile*)
120  (comf "target:compiler/seqtran")  (comf "target:compiler/seqtran" :byte-compile *byte-compile*)
121  (comf "target:compiler/typetran")  (comf "target:compiler/typetran" :byte-compile *byte-compile*)
122  (comf "target:compiler/generic/vm-typetran")  (comf "target:compiler/generic/vm-typetran" :byte-compile *byte-compile*)
123  (comf "target:compiler/float-tran")  (comf "target:compiler/float-tran" :byte-compile *byte-compile*)
124    (comf "target:compiler/saptran" :byte-compile *byte-compile*)
125    (comf "target:compiler/srctran") ;; try
126  (comf "target:compiler/locall")  (comf "target:compiler/locall")
127  (comf "target:compiler/dfo")  (comf "target:compiler/dfo")
128  (comf "target:compiler/checkgen")  (comf "target:compiler/checkgen")
129  (comf "target:compiler/constraint")  (comf "target:compiler/constraint")
130  (comf "target:compiler/envanal")  (comf "target:compiler/envanal")
131    
132    
133  (comf "target:compiler/tn")  (comf "target:compiler/tn")
 (comf "target:compiler/bit-util")  
134  (comf "target:compiler/life")  (comf "target:compiler/life")
135    
136  (comf "target:code/debug-info")  (comf "target:code/debug-info")
137    
138  (comf "target:compiler/debug-dump")  (comf "target:compiler/debug-dump")
139  (comf "target:compiler/generic/utils")  (comf "target:compiler/generic/utils")
140  (comf "target:assembly/assemfile" :load *load-stuff*)  #-bootstrap
141    (comf "target:assembly/assemfile")
142    #+bootstrap
143    (comf "target:assembly/assemfile" :byte-compile t)
144    (when *load-stuff* (load "target:assembly/assemfile"))
145    
146    
147  (with-compilation-unit  (with-compilation-unit
148      (:optimize '(optimize (safety 0) (debug-info 1)))      (:optimize '(optimize (safety #+small 0 #-small 1) #+small (debug 0)))
149    
150  (when (string= (old-c:backend-name old-c:*backend*) "R2000")    #+original
151    (comf "target:compiler/mips/macros" :load *load-stuff*)    (progn                                ; this is distributed order
152    (comf "target:compiler/mips/vm")      (comf (vmdir "target:compiler/insts"))
153    (comf "target:compiler/mips/mips-insts")      (comf (vmdir "target:compiler/macros") :load *load-stuff*)
154    (comf "target:compiler/generic/primtype")      (comf (vmdir "target:compiler/vm")))
155    (comf "target:assembly/mips/support" :load *load-stuff*)    #+original
156    (comf "target:compiler/mips/move")    (progn                                ; this works for x86
157    (comf "target:compiler/mips/sap")      (comf (vmdir "target:compiler/vm"))
158    (comf "target:compiler/mips/system")      (comf (vmdir "target:compiler/macros") :load *load-stuff*)
159    (comf "target:compiler/mips/char")      (comf (vmdir "target:compiler/insts")))
160    (comf "target:compiler/mips/float")    #-tryit
161    (comf "target:compiler/mips/memory")    (progn                                ; this also works - better??
162    (comf "target:compiler/mips/static-fn")      (comf (vmdir "target:compiler/vm"))
163    (comf "target:compiler/mips/arith")      (comf (vmdir "target:compiler/insts"))
164    (comf "target:compiler/mips/subprim")      (comf (vmdir "target:compiler/macros")
165    (comf "target:compiler/mips/debug")             :byte-compile #+bootstrap t #-bootstrap nil)
166    (comf "target:compiler/mips/c-call")      (when *load-stuff*
167    (comf "target:compiler/mips/cell")        (load (vmdir "target:compiler/macros")))
168    (comf "target:compiler/mips/values")      )
169    (comf "target:compiler/mips/alloc")  
170    (comf "target:compiler/mips/call")  (comf "target:compiler/generic/primtype")
171    (comf "target:compiler/mips/nlx")  (comf (vmdir "target:assembly/support")
172    (comf "target:compiler/mips/print")         :byte-compile #+bootstrap t #-bootstrap nil) ; pw
173    (comf "target:compiler/mips/array")  (when *load-stuff*
174    (comf "target:compiler/mips/pred")    (load (vmdir "target:assembly/support")))
175    (comf "target:compiler/mips/type-vops")  (comf (vmdir "target:compiler/move"))
176    (comf (if (c:target-featurep :sse2)
177    (comf "target:assembly/mips/assem-rtns")            (vmdir "target:compiler/float-sse2")
178    (comf "target:assembly/mips/array")            (vmdir "target:compiler/float"))
179    (comf "target:assembly/mips/arith"))        :byte-compile *byte-compile*)
180    (comf (vmdir "target:compiler/sap") :byte-compile *byte-compile*)
181  (when (string= (old-c:backend-name old-c:*backend*) "SPARC")  (when (c:target-featurep :x86)
182    (comf "target:compiler/sparc/insts")    (comf (if (c:target-featurep :sse2)
183    (comf "target:compiler/sparc/macros" :load *load-stuff*)              (vmdir "target:compiler/sse2-sap")
184    (comf "target:compiler/sparc/vm")              (vmdir "target:compiler/x87-sap"))
185    (comf "target:compiler/generic/primtype")          :byte-compile *byte-compile*))
186    (comf "target:compiler/sparc/move")  (comf (vmdir "target:compiler/system") :byte-compile *byte-compile*)
187    (comf "target:compiler/sparc/sap")  (comf (vmdir "target:compiler/char") :byte-compile *byte-compile*)
188    (comf "target:compiler/sparc/system")  (comf (vmdir "target:compiler/memory"))
189    (comf "target:compiler/sparc/char")  (comf (vmdir "target:compiler/static-fn"))
190    (comf "target:compiler/sparc/float")  (comf (vmdir "target:compiler/arith"))
191    (comf "target:compiler/sparc/memory")  (comf (vmdir "target:compiler/subprim") :byte-compile *byte-compile*)
192    (comf "target:compiler/sparc/static-fn")  
193    (comf "target:compiler/sparc/arith")  (comf (vmdir "target:compiler/debug") :byte-compile *byte-compile*)
194    (comf "target:compiler/sparc/subprim")  (comf (vmdir "target:compiler/c-call") :byte-compile *byte-compile*)
195    (comf "target:compiler/sparc/debug")  (when (c:target-featurep :x86)
196    (comf "target:compiler/sparc/c-call")    (comf (if (c:target-featurep :sse2)
197    (comf "target:compiler/sparc/cell")              (vmdir "target:compiler/sse2-c-call")
198    (comf "target:compiler/sparc/values")              (vmdir "target:compiler/x87-c-call"))
199    (comf "target:compiler/sparc/alloc")          :byte-compile *byte-compile*))
200    (comf "target:compiler/sparc/call")  (comf (vmdir "target:compiler/cell"))
201    (comf "target:compiler/sparc/nlx")  (comf (vmdir "target:compiler/values") :byte-compile *byte-compile*)
202    (comf "target:compiler/sparc/print")  (comf (vmdir "target:compiler/alloc"))
203    (comf "target:compiler/sparc/array")  (comf (vmdir "target:compiler/call"))
204    (comf "target:compiler/sparc/pred")  (comf (vmdir "target:compiler/nlx") :byte-compile *byte-compile*)
205    (comf "target:compiler/sparc/type-vops")  (comf (vmdir "target:compiler/print") :byte-compile *byte-compile*)
206    
207    (comf "target:assembly/sparc/support" :load *load-stuff*)  ;; Must come before array.lisp because array.lisp wants to use some
208    (comf "target:assembly/sparc/assem-rtns")  ;; vops as templates.
209    (comf "target:assembly/sparc/bit-bash")  (when (c:target-featurep :x86)
210    (comf "target:assembly/sparc/array")    (comf (vmdir (if (c:target-featurep :sse2)
211    (comf "target:assembly/sparc/arith")                     "target:compiler/sse2-array"
212    (comf "target:assembly/sparc/alloc"))                     "target:compiler/x87-array"))
213            :byte-compile *byte-compile*))
214  (when (string= (old-c:backend-name old-c:*backend*) "RT")  
215    (comf "target:compiler/rt/insts")  (comf (vmdir "target:compiler/array") :byte-compile *byte-compile*)
216    (comf "target:compiler/rt/macros" :load *load-stuff*)  
217    (comf "target:compiler/rt/vm")  (comf (vmdir "target:compiler/pred"))
218    (comf "target:compiler/rt/move")  (comf (vmdir "target:compiler/type-vops") :byte-compile *byte-compile*)
219    (comf "target:compiler/rt/sap")  
220    (comf "target:compiler/rt/system")  (comf (vmdir "target:assembly/assem-rtns") :byte-compile *byte-compile*)
221    (comf "target:compiler/rt/char")  (comf (vmdir "target:assembly/array") :byte-compile *byte-compile*)
222    (if (eq vm::*target-float-hardware* :afpa)  (comf (vmdir "target:assembly/arith"))
223        (comf "target:compiler/rt/afpa")  (comf (vmdir "target:assembly/alloc"))
       (comf "target:compiler/rt/mc68881"))  
   (comf "target:compiler/rt/memory")  
   (comf "target:compiler/rt/static-fn")  
   (comf "target:compiler/rt/arith")  
   (comf "target:compiler/rt/subprim")  
   (comf "target:compiler/rt/debug")  
   (comf "target:compiler/rt/c-call")  
   (comf "target:compiler/rt/cell")  
   (comf "target:compiler/rt/values")  
   (comf "target:compiler/rt/alloc")  
   (comf "target:compiler/rt/call")  
   (comf "target:compiler/rt/nlx")  
   (comf "target:compiler/rt/print")  
   (comf "target:compiler/rt/array")  
   (comf "target:compiler/rt/pred")  
   (comf "target:compiler/rt/type-vops")  
   
   (comf "target:assembly/rt/support" :load *load-stuff*)  
   (comf "target:assembly/rt/assem-rtns")  
   (comf "target:assembly/rt/array")  
   (comf "target:assembly/rt/arith")  
   (comf "target:assembly/rt/alloc"))  
224    
225  (comf "target:compiler/pseudo-vops")  (comf "target:compiler/pseudo-vops")
226    
227  ); with-compilation-unit for back end.  ); with-compilation-unit for back end.
228    
229  (comf "target:compiler/aliencomp")  (comf "target:compiler/aliencomp" :byte-compile *byte-compile*)
230    
231    (comf "target:compiler/ltv")
232  (comf "target:compiler/gtn")  (comf "target:compiler/gtn")
233  (with-compilation-unit  (with-compilation-unit
234      (:optimize '(optimize (debug-info 2) (safety 1)))      (:optimize '(optimize (debug 2)))
235    (comf "target:compiler/ltn"))    (comf "target:compiler/ltn"))
236  (comf "target:compiler/stack")  (comf "target:compiler/stack")
237  (comf "target:compiler/control")  (comf "target:compiler/control")
238  (comf "target:compiler/entry")  (comf "target:compiler/entry")
239  (with-compilation-unit  (with-compilation-unit
240      (:optimize '(optimize (debug-info 2) (safety 1)))      (:optimize '(optimize (debug 2)))
241    (comf "target:compiler/ir2tran"))    (comf "target:compiler/ir2tran")
242      (comf "target:compiler/generic/vm-ir2tran"))
243  (comf "target:compiler/copyprop")  (comf "target:compiler/copyprop")
 (comf "target:compiler/assem-opt")  
244  (with-compilation-unit  (with-compilation-unit
245      (:optimize '(optimize (debug-info 2) (safety 1)))      (:optimize '(optimize (debug 2)))
246    (comf "target:compiler/represent"))    (comf "target:compiler/represent"))
247  (comf "target:compiler/generic/vm-tran")  (comf "target:compiler/generic/vm-tran")
248  (with-compilation-unit  (with-compilation-unit
249      (:optimize '(optimize (debug-info 2) (safety 1)))      (:optimize '(optimize (debug 2)))
250    (comf "target:compiler/pack"))    (comf "target:compiler/pack"))
251  (comf "target:compiler/codegen")  (comf "target:compiler/codegen")
252  (comf "target:compiler/debug")  (with-compilation-unit
253  (comf "target:compiler/assem-check")      (:optimize '(optimize (debug 2) (safety 2)))
254      (comf "target:compiler/debug" :byte-compile *byte-compile*)
255      (comf "target:compiler/xref" :byte-compile *byte-compile*))
256    #+nil
257  (comf "target:compiler/statcount")  (comf "target:compiler/statcount")
258  (comf "target:compiler/dyncount")  (comf "target:compiler/dyncount")
259    
260  (comf "target:compiler/dump")  (comf "target:compiler/dump")
261    
262  (comf "target:compiler/generic/core")  (comf "target:compiler/generic/core")
263  (comf "target:compiler/generic/genesis")  (comf "target:compiler/generic/new-genesis")
264    
265  (comf "target:compiler/eval-comp")  (comf "target:compiler/eval-comp")
266  (comf "target:compiler/eval")  (comf "target:compiler/eval")
267    (comf "target:compiler/byte-comp")
268    
269  ); with-compiler-error-log  ); with-compiler-error-log

Legend:
Removed from v.1.19.1.1  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.5