c4978598dc1a3a08b214eec514332edf19b41681
[sbcl.git] / stems-and-flags.lisp-expr
1 ;;;; -*- Lisp -*-
2 ;;;; build order
3
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
12
13 ;;; This is a linear ordering of system sources which works both to
14 ;;; compile/load the cross-compiler under the host Common Lisp and to
15 ;;; cross-compile the compiler into the under-construction target
16 ;;; Common Lisp.
17 ;;;
18 ;;; Of course, it'd be very nice to have this be a dependency DAG
19 ;;; instead, so that we could do automated incremental recompilation.
20 ;;; But the dependencies are varied and subtle, and it'd be extremely
21 ;;; difficult to extract them automatically, and it'd be extremely
22 ;;; tedious and error-prone to extract them manually, so we don't 
23 ;;; extract them. (It would be nice to fix this someday. The most
24 ;;; feasible approach that I can think of would be to make the
25 ;;; dependencies work on a package level, not an individual file
26 ;;; level. Doing it at the package level would make the granularity
27 ;;; coarse enough that it would probably be pretty easy to maintain
28 ;;; the dependency information manually, and the brittleness of the
29 ;;; package system would help make most violations of the declared
30 ;;; dependencies obvious at build time. -- WHN 20000803
31 ;;;
32 ;;; FIXME: Perhaps now that a significant number of files are built
33 ;;; in warm load instead of cold load, this file should now be called
34 ;;; cold-stems-and-flags.lisp-expr? Also, perhaps this file should move
35 ;;; into the src/cold directory?
36 (
37  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38  ;;; miscellaneous
39
40  ;; This comes early because it's useful for debugging everywhere.
41  ("src/code/show")
42
43  ;; This comes early because the cross-compilation host's backquote logic
44  ;; expand into something which can't be executed on the target Lisp (e.g.
45  ;; in CMU CL where it expands into internal functions like BACKQ-LIST), and
46  ;; by replacing the host backquote logic with our own as early as possible,
47  ;; we minimize the chance of any forms referring to host Lisp internal
48  ;; functions leaking into target Lisp code.
49  ("src/code/backq")
50
51  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52  ;; various DEFSETFs and/or other DEFMACROish things, defined as early as
53  ;; possible so we don't need to fiddle with any subtleties of defining them
54  ;; before any possible use
55
56  ;; KLUDGE: It would be nice to reimplement most or all of these as
57  ;; functions (possibly inlined functions) so that we wouldn't need to
58  ;; worry so much about forcing them all to be defined before any possible
59  ;; use. It might be pretty tedious, though, working through any
60  ;; transforms and translators and optimizers and so forth to make sure
61  ;; that they can handle the change. -- WHN 19990919
62  ("src/code/defsetfs")
63
64  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
65  ;;; cross-compiler-only replacements for stuff which in target Lisp would be
66  ;;; supplied by basic machinery
67
68  ("src/code/cross-misc"  :not-target)
69  ("src/code/cross-float" :not-target)
70  ("src/code/cross-io"    :not-target)
71  ("src/code/cross-sap"   :not-target)
72
73  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
74  ;;; stuff needed early both in cross-compilation host and in target Lisp
75
76  ("src/code/uncross")
77  ("src/code/early-defbangmethod")
78
79  ("src/code/defbangtype")
80  ("src/code/defbangmacro")
81
82  ("src/code/primordial-extensions")
83
84  ;; for various constants e.g. SB!VM:*TARGET-MOST-POSITIVE-FIXNUM* and
85  ;; SB!VM:LOWTAG-BITS, needed by "early-objdef" and others
86  ("src/compiler/generic/early-vm")
87  ("src/compiler/generic/early-objdef")
88  ("src/compiler/target/parms")
89  ("src/code/early-array") ; needs "early-vm" numbers
90
91  ("src/code/parse-body")      ; on host for PARSE-BODY
92  ("src/code/parse-defmacro")  ; on host for PARSE-DEFMACRO
93  ("src/code/extensions")      ; on host for COLLECT, SYMBOLICATE, etc.
94  ("src/compiler/deftype")     ; on host for SB!XC:DEFTYPE
95  ("src/code/early-alieneval") ; for vars needed both at build and run time
96
97  ("src/code/specializable-array")
98
99  ("src/code/early-cl")
100  ("src/code/early-load")
101
102  ;; mostly needed by stuff from comcom, but also used by "x86-vm"
103  ("src/code/debug-var-io")
104
105  ("src/code/cold-init-helper-macros")
106
107  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
108  ;;; basic machinery for the target Lisp. Note that although most of these
109  ;;; files are flagged :NOT-HOST, a few might not be.
110
111  ("src/code/target-defbangmethod" :not-host)
112
113  ("src/code/early-print" :not-host)
114  ("src/code/early-pprint" :not-host)
115  ("src/code/early-impl" :not-host)
116
117  ("src/code/target-extensions" :not-host)
118
119  ("src/code/early-defstructs" :not-host) ; gotta-be-first DEFSTRUCTs
120
121  ("src/code/defbangstruct")
122
123  ;; This needs DEF!STRUCT, and is itself needed early so that structure
124  ;; accessors and inline functions defined here can be compiled inline
125  ;; later. (Avoiding full calls not only increases efficiency, but also
126  ;; avoids some cold init issues involving full calls to structure
127  ;; accessors.)
128  ("src/code/type-class")
129
130  ("src/code/lisp-stream" :not-host)
131
132  ("src/code/sysmacs" :not-host)
133
134  ;; "assembly/assemfile" was here in the sequence inherited from
135  ;; CMU CL worldcom.lisp, but also appears later in the sequence
136  ;; inherited from CMU CL comcom.lisp. We shouldn't need two versions,
137  ;; so I've deleted the one here. -- WHN 19990620
138
139  ;; FIXME: There are lots of "maybe" notes in this file, e.g.
140  ;; "maybe should be :BYTE-COMPILE T". Once the system is stable,
141  ;; look into them.
142
143  ("src/code/early-target-error" :not-host) ; maybe should be :BYTE-COMPILE T
144  ;; FIXME: maybe should be called "target-error", with "late-target-error"
145  ;; called "condition"
146
147  ;; a comment from classic CMU CL:
148  ;;   "These guys can supposedly come in any order, but not really.
149  ;;    Some are put at the end so that macros don't run interpreted
150  ;;    and stuff."
151  ;; Dunno exactly what this meant or whether it still holds. -- WHN 19990803
152  ;; FIXME: more informative and up-to-date comment?
153  ("src/code/globals"     :not-host)
154  ("src/code/kernel"      :not-host)
155  ("src/code/toplevel"    :not-host)
156  ("src/code/cold-error"  :not-host)
157  ("src/code/fdefinition" :not-host)
158  ;; FIXME: Figure out some way to make the compiler macro for INFO 
159  ;; available for compilation of "code/fdefinition".
160
161  ;; In classic CMU CL, code/type was here. I've since split that into
162  ;; lots of smaller pieces, some of which are here and some of which
163  ;; are handled later in the sequence, when the cross-compiler is
164  ;; built. -- WHN 19990620
165  ("src/code/target-type" :not-host)
166
167  ("src/code/pred" :not-host)
168
169  ("src/code/target-alieneval" :not-host)
170  ("src/code/target-c-call"    :not-host)
171  ("src/code/target-allocate"  :not-host)
172
173  ;; This needs DEF-ALIEN-ROUTINE from target-alieneval.
174  ("src/code/misc-aliens" :not-host)
175
176  ("src/code/array"         :not-host)
177  ("src/code/target-sxhash" :not-host)
178
179  ("src/code/list"   :not-host)
180  ("src/code/seq"    :not-host) ; "code/seq" should come after "code/list".
181  ("src/code/coerce" :not-host)
182
183  ("src/code/string"     :not-host)
184  ("src/code/mipsstrops" :not-host)
185
186  ;; "src/code/unix.lisp" needs this. It's generated automatically by
187  ;; grovel_headers.c, i.e. it's not in CVS.
188  ("output/stuff-groveled-from-headers" :not-host)
189
190  ("src/code/unix" :not-host)
191
192  #!+mach  ("src/code/mach"     :not-host)
193  #!+mach  ("src/code/mach-os"  :not-host)
194  #!+sunos ("src/code/sunos-os" :not-host)
195  #!+hpux  ("src/code/hpux-os"  :not-host)
196  #!+osf1  ("src/code/osf1-os"  :not-host)
197  #!+irix  ("src/code/irix-os"  :not-host)
198  #!+bsd   ("src/code/bsd-os"   :not-host)
199  #!+linux ("src/code/linux-os" :not-host)
200
201  ;; KLUDGE: I'd prefer to have this done with a "code/target" softlink
202  ;; instead of a bunch of reader macros. -- WHN 19990308
203  #!+pmax ("src/code/pmax-vm" :not-host)
204  #!+(and sparc svr4) ("src/code/sparc-svr4-vm" :not-host)
205  #!+(and sparc (not svr4)) ("src/code/sparc-vm" :not-host)
206  #!+rt    ("src/code/rt-vm"    :not-host)
207  #!+hppa  ("src/code/hppa-vm"  :not-host)
208  #!+x86   ("src/code/x86-vm"   :not-host)
209  #!+alpha ("src/code/alpha-vm" :not-host)
210  #!+sgi   ("src/code/sgi-vm"   :not-host)
211
212  ("src/code/target-signal" :not-host) ; needs OS-CONTEXT-T from x86-vm
213
214  ("src/code/symbol"         :not-host)
215  ("src/code/bignum"         :not-host)
216  ("src/code/target-numbers" :not-host)
217  ("src/code/float-trap"     :not-host)
218  ("src/code/float"          :not-host)
219  ("src/code/irrat"          :not-host)
220
221  ("src/code/char")
222  ("src/code/target-char" :not-host)
223  ("src/code/target-misc" :not-host)
224  ("src/code/misc")
225
226  #!-gengc ("src/code/room"   :not-host)
227  #!-gengc ("src/code/gc"     :not-host)
228  #!-gengc ("src/code/purify" :not-host)
229
230  #!+gengc ("src/code/gengc" :not-host)
231
232  ("src/code/stream"        :not-host)
233  ("src/code/print"         :not-host)
234  ("src/code/pprint"        :not-host) ; maybe should be :BYTE-COMPILE T
235  ("src/code/early-format")
236  ("src/code/target-format" :not-host) ; maybe should be :BYTE-COMPILE T
237  ("src/code/defpackage"    :not-host)
238  ("src/code/pp-backq"      :not-host) ; maybe should be :BYTE-COMPILE T
239
240  ("src/code/error-error" :not-host) ; needs WITH-STANDARD-IO-SYNTAX macro
241
242  ("src/code/serve-event" :not-host)
243  ("src/code/fd-stream"   :not-host)
244
245  ("src/code/module" :not-host) ; maybe should be :BYTE-COMPILE T
246
247  #!+sb-interpreter
248  ("src/code/eval")
249
250  ("src/code/target-eval" :not-host) ; FIXME: uses INFO, wants compiler macro
251
252  ("src/code/interr" :not-host)
253
254  ("src/code/query"  :not-host) ; maybe should be :BYTE-COMPILE T
255
256  ("src/code/sort"  :not-host)
257  ("src/code/time"  :not-host)
258  ("src/code/weak"  :not-host)
259  ("src/code/final" :not-host)
260
261  #!+mp ("src/code/multi-proc" :not-host)
262
263  ("src/code/setf-funs" :not-host)
264
265  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
266  ;;; compiler (and a few miscellaneous files whose dependencies make it
267  ;;; convenient to stick them here)
268
269  ("src/compiler/early-c")
270  ("src/compiler/policy")
271  ("src/code/numbers")
272
273  ("src/code/typedefs")
274
275  ;; ("src/code/defbangmacro" was here until sbcl-0.6.7.3.)
276
277  ("src/compiler/macros")
278  ("src/compiler/generic/vm-macs")
279
280  ;; needed by "compiler/vop"
281  ("src/compiler/sset")
282
283  ;; for e.g. BLOCK-ANNOTATION, needed by "compiler/vop"
284  ("src/compiler/node")
285
286  ;; for e.g. PRIMITIVE-TYPE, needed by "vmdef"
287  ("src/compiler/vop")
288
289  ;; needed by "vm" and "primtype"
290  ("src/compiler/backend")
291
292  ;; for e.g. MAX-VOP-TN-REFS, needed by "meta-vmdef"
293  ("src/compiler/vmdef")
294
295  ;; needs "backend"
296  ("src/compiler/target/backend-parms")
297
298  ;; for INFO and SB!XC:MACRO-FUNCTION, needed by defmacro.lisp
299  ("src/compiler/globaldb")
300  ("src/compiler/info-functions")
301
302  ("src/code/defmacro")
303  ("src/code/force-delayed-defbangmacros")
304
305  ("src/compiler/late-macros")
306
307  ;; for e.g. !DEF-PRIMITIVE-TYPE, needed by primtype.lisp, and
308  ;; DEFINE-STORAGE-CLASS, needed by target/vm.lisp
309  ("src/compiler/meta-vmdef")
310
311  ;; for e.g. DESCRIPTOR-REG, needed by primtype.lisp
312  ("src/compiler/target/vm")
313
314  ;; for e.g. SPECIFIER-TYPE, needed by primtype.lisp
315  ("src/code/early-type")
316
317  ;; FIXME: Classic CMU CL had SAFETY 2 DEBUG 2 set around the compilation
318  ;; of "code/class". Why?
319  ("src/code/class")
320
321  ;; The definitions for CONDITION and CONDITION-CLASS depend on
322  ;; SLOT-CLASS, defined in classes.lisp.
323  ("src/code/late-target-error" :not-host) ; FIXME: maybe should be :BYTE-COMPILE T
324
325  ("src/compiler/generic/primtype")
326
327  ;; the implementation of the compiler-affecting part of forms like
328  ;; DEFMACRO and DEFTYPE; must be loaded before we can start
329  ;; defining types
330  ("src/compiler/parse-lambda-list")
331
332  ;; for DEFSTRUCT ALIEN-TYPE, needed by host-type.lisp
333  ("src/code/host-alieneval")
334
335  ;; can't be done until definition of e.g. DEF-ALIEN-TYPE-CLASS in
336  ;; host-alieneval.lisp
337  ("src/code/host-c-call")
338
339  ;; SB!XC:DEFTYPE is needed in order to compile late-type
340  ;; in the host Common Lisp, and in order to run, it needs
341  ;; %COMPILER-DEFTYPE.
342  ("src/compiler/compiler-deftype")
343
344  ;; These appear here in the build sequence because they require
345  ;;   * the macro INFO, defined in globaldb.lisp, and
346  ;;   * the function PARSE-DEFMACRO, defined in parse-defmacro.lisp,
347  ;; and because they define
348  ;;   * the function SPECIFIER-TYPE, which is used in fndb.lisp.
349  ("src/code/late-type")
350  ("src/code/deftypes-for-target")
351
352  ;; The inline definition of TYPEP-TO-LAYOUT here needs inline
353  ;; functions defined in classes.lisp, and is needed in turn by
354  ;; the target version of "code/defstruct".
355  ("src/code/target-defstruct" :not-host)
356
357  ;; stuff needed by "code/defstruct"
358  ("src/code/cross-type" :not-target)
359  ("src/compiler/generic/vm-type")
360
361  ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in 
362  ;; "code/late-type", and SB!XC:TYPEP, defined in "code/cross-type",
363  ;; and SPECIALIZE-ARRAY-TYPE, defined in "compiler/generic/vm-type".
364  ("src/code/defstruct")
365
366  ;; ALIEN-VALUE has to be defined as a class (done by DEFSTRUCT
367  ;; machinery) before we can set its superclasses here.
368  ("src/code/alien-type")
369
370  ("src/compiler/knownfun")
371
372  ;; needs IR1-ATTRIBUTES macro, defined in knownfun.lisp
373  ("src/compiler/proclaim")
374
375  ;; This needs not just the SB!XC:DEFSTRUCT machinery, but also
376  ;; the TYPE= stuff defined in late-type.lisp, and the
377  ;; CHECK-FUNCTION-NAME defined in proclaim.lisp.
378  ("src/code/force-delayed-defbangstructs")
379
380  ("src/code/typep")
381
382  ("src/compiler/compiler-error")
383
384  ("src/code/type-init")
385
386  ;; These define target types needed by fndb.lisp.
387  ("src/code/package")
388  ("src/code/random")
389  ("src/code/hash-table")
390  ("src/code/readtable")
391  ("src/code/pathname")
392  ("src/compiler/lexenv")
393
394  ;; KLUDGE: Much stuff above here is the type system and/or the INFO
395  ;; system, not really the compiler proper. It might be easier to
396  ;; understand the system if those things were split off into packages
397  ;; SB-TYPE and SB-INFO and built in their own sections. -- WHN 20000124
398
399  ;; In classic CMU CL (re)build order, these were done later, but
400  ;; in building from scratch, these must be loaded before
401  ;; "compiler/generic/objdef" in order to allow forms like
402  ;; (DEFINE-PRIMITIVE-OBJECT (..) (CAR ..) ..) to work.
403  ("src/compiler/fndb")
404  ("src/compiler/generic/vm-fndb")
405
406  ("src/compiler/generic/objdef")
407
408  ("src/compiler/generic/interr")
409
410  ("src/compiler/bit-util")
411
412  ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
413  ("src/compiler/early-assem") 
414
415  ;; core.lisp contains DEFSTRUCT CORE-OBJECT, and "compiler/main.lisp"
416  ;; does lots of (TYPEP FOO 'CORE-OBJECT), so it's nice to compile this
417  ;; before "compiler/main.lisp" so that those can be coded efficiently
418  ;; (and so that they don't cause lots of annoying compiler warnings
419  ;; about undefined types). 
420  ("src/compiler/generic/core")
421
422  ("src/code/load")
423
424  ("src/code/fop") ; needs macros from code/host-load.lisp
425
426  ("src/compiler/ctype")
427  ("src/compiler/disassem")
428  ("src/compiler/assem")
429
430  ("src/compiler/trace-table") ; needs EMIT-LABEL macro from compiler/assem.lisp
431
432  ;; Compiling this file requires fop definitions from code/fop.lisp
433  ;; and trace table definitions from compiler/trace-table.lisp.
434  ("src/compiler/dump")
435
436  ("src/compiler/main") ; needs DEFSTRUCT FASL-FILE from compiler/dump.lisp
437  ("src/compiler/target-main" :not-host)
438  ("src/compiler/ir1tran")
439  ("src/compiler/ir1util")
440  ("src/compiler/ir1opt")
441
442  ;; Compiling this file requires the macros SB!ASSEM:EMIT-LABEL and
443  ;; SB!ASSEM:EMIT-POST-IT, defined in assem.lisp.
444  ("src/compiler/late-vmdef")
445
446  ("src/compiler/ir1final")
447  ("src/compiler/array-tran")
448  ("src/compiler/seqtran")
449  ("src/compiler/typetran")
450  ("src/compiler/generic/vm-typetran")
451  ("src/compiler/float-tran")
452  ("src/compiler/saptran")
453  ("src/compiler/srctran")
454  ("src/compiler/locall")
455  ("src/compiler/dfo")
456  ("src/compiler/checkgen")
457  ("src/compiler/constraint")
458  ("src/compiler/envanal")
459
460  ("src/compiler/tn")
461  ("src/compiler/life")
462
463  ("src/code/debug-info")
464
465  ("src/compiler/debug-dump")
466  ("src/compiler/generic/utils")
467  ("src/assembly/assemfile")
468
469  ("src/compiler/fixup") ; for DEFSTRUCT FIXUP, used by insts.lisp
470
471  ("src/compiler/target/insts")
472  ("src/compiler/target/macros")
473
474  ("src/assembly/target/support")
475
476  ("src/compiler/target/move")
477  ("src/compiler/target/float")
478  ("src/compiler/target/sap")
479  ("src/compiler/target/system")
480  ("src/compiler/target/char")
481  ("src/compiler/target/memory")
482  ("src/compiler/target/static-fn")
483  ("src/compiler/target/arith")
484  ("src/compiler/target/subprim")
485
486  ("src/compiler/target/debug")
487  ("src/compiler/target/c-call")
488  ("src/compiler/target/cell")
489  ("src/compiler/target/values")
490  ("src/compiler/target/alloc")
491  ("src/compiler/target/call")
492  ("src/compiler/target/nlx")
493  ("src/compiler/target/show")
494  ("src/compiler/target/array"
495   ;; KLUDGE: Compiling this file raises alarming warnings of the form
496   ;;    Argument FOO to VOP CHECK-BOUND has SC restriction
497   ;;    DESCRIPTOR-REG which is not allowed by the operand type:
498   ;;      (:OR POSITIVE-FIXNUM)
499   ;; This seems not to be something that I broke, but rather a "feature"
500   ;; inherited from classic CMU CL. (Debian cmucl_2.4.8.deb compiling
501   ;; Debian cmucl_2.4.8.tar.gz raises the same warning). Thus, even though
502   ;; these warnings are severe enough that they would ordinarily abort
503   ;; compilation, for now we blithely ignore them and press on to more
504   ;; pressing problems. Someday, though, it would be nice to figure out
505   ;; what the problem is and fix it.. -- WHN 19990323
506   :ignore-failure-p)
507  ("src/compiler/target/pred")
508  ("src/compiler/target/type-vops")
509
510  ("src/assembly/target/assem-rtns" :assem)
511  ("src/assembly/target/array"      :assem)
512  ("src/assembly/target/arith"      :assem)
513  ("src/assembly/target/alloc"      :assem)
514
515  ("src/compiler/pseudo-vops")
516
517  ("src/compiler/aliencomp")
518
519  ("src/compiler/ltv")
520  ("src/compiler/gtn")
521  ("src/compiler/ltn")
522  ("src/compiler/stack")
523  ("src/compiler/control")
524  ("src/compiler/entry")
525  ("src/compiler/ir2tran")
526
527  ;; KLUDGE: This has #!+GENGC things in it which are intended to
528  ;; overwrite code in ir2tran.lisp, so it has to come after ir2tran.lisp.
529  ;;
530  ;; FIXME: Those things should probably be ir2tran.lisp instead, and the
531  ;; things they now overwrite should instead be #!-GENGC so they're never
532  ;; generated in the first place.
533  ("src/compiler/generic/vm-ir2tran")
534
535  ("src/compiler/copyprop")
536  ("src/compiler/represent")
537  ("src/compiler/generic/vm-tran")
538  ("src/compiler/pack")
539  ("src/compiler/codegen")
540  ("src/compiler/debug")
541
542  #!+sb-dyncount ("src/compiler/dyncount")
543  #!+sb-dyncount ("src/code/dyncount")
544
545  ;; needed by OPEN-FASL-FILE, which is called by COMPILE-FILE
546  ("src/code/format-time")
547
548  ;; needed by various unhappy-path cases in the cross-compiler
549  ("src/code/error")
550
551  ;; This wasn't in classic CMU CL "comcom.lisp", but it has some stuff
552  ;; that Python-as-cross-compiler has turned out to need.
553  ("src/code/macroexpand")
554
555  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
556  ;; files which are only needed in the target system, and/or which are
557  ;; only possible in the target system, and which depend in some way 
558  ;; (directly or indirectly) on stuff compiled as part of the compiler
559
560  ("src/compiler/generic/target-core" :not-host) ; uses stuff from
561                                             ;   "compiler/generic/core"
562
563  ("src/code/target-sap"        :not-host) ; uses SAP-INT-TYPE
564  ("src/code/target-package"    :not-host) ; needs "code/package"
565  ("src/code/target-random"     :not-host) ; needs "code/random"
566  ("src/code/target-hash-table" :not-host) ; needs "code/hash-table"
567  ("src/code/reader"            :not-host) ; needs "code/readtable"
568  ("src/code/target-pathname"   :not-host) ; needs "code/pathname", maybe 
569                                       ;   should be :BYTE-COMPILE T
570  ("src/code/filesys"           :not-host) ; needs HOST from "code/pathname",
571                                       ;   maybe should be :BYTE-COMPILE T
572  ("src/code/save"              :not-host) ; uses the definition of PATHNAME
573                                       ;   from "code/pathname"
574  ("src/code/sharpm"            :not-host) ; uses stuff from "code/reader"
575
576  ;; stuff for byte compilation. Note that although byte code is
577  ;; "portable", it'd be hard to make it work on the cross-compilation
578  ;; host, because fundamental BYTE-FUNCTION-OR-CLOSURE types are
579  ;; implemented as FUNCALLABLE-INSTANCEs, and it's not obvious
580  ;; how to emulate those in a vanilla ANSI Common Lisp.
581  ("src/code/byte-types" :not-host)
582  ("src/compiler/byte-comp")
583  ("src/compiler/target-byte-comp" :not-host)
584  ("src/code/byte-interp" :not-host) ; needs byte-comp *SYSTEM-CONSTANT-CODES*
585
586  ;; defines SB!DI:DO-DEBUG-FUNCTION-BLOCKS, needed by target-disassem.lisp
587  ("src/code/debug-int" :not-host)
588
589  ;; target-only assemblerish stuff
590  ("src/compiler/target-disassem"     :not-host)
591  ("src/compiler/target/target-insts" :not-host)
592
593  ;; the IR1 interpreter (as opposed to the byte code interpreter)
594  #!+sb-interpreter ("src/compiler/eval-comp" :not-host)
595  #!+sb-interpreter ("src/compiler/eval"      :not-host)
596
597  ("src/code/debug" :not-host) ; maybe should be :BYTE-COMPILE T
598
599  ;; These can't be compiled until CONDITION and DEFINE-CONDITION
600  ;; are defined, and they also use SB-DEBUG:*STACK-TOP-HINT*.
601  ("src/code/parse-defmacro-errors" :not-host)
602
603  ("src/code/bit-bash"    :not-host) ; needs %NEGATE from assembly/target/arith
604
605  ("src/code/target-load" :not-host) ; needs specials from code/load.lisp
606
607  ;; FIXME: Does this really need stuff from compiler/dump.lisp?
608  ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp
609
610  ("src/code/cold-init" :not-host) ; needs (SETF EXTERN-ALIEN) macroexpansion
611
612  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
613  ;; target macros and DECLAIMs installed at build-the-cross-compiler time
614
615  ;; Declare all target special variables defined by ANSI now, so that
616  ;; we don't have to worry about any of them being bound incorrectly
617  ;; when the compiler processes code which appears before the appropriate
618  ;; DEFVAR or DEFPARAMETER.
619  ("src/code/cl-specials")
620
621  ;; fundamental target macros (e.g. CL:DO and CL:DEFUN) and support
622  ;; for them
623  ;;
624  ;; FIXME: Since a lot of this code is just macros, perhaps it should be
625  ;; byte compiled?
626  ("src/code/defboot")
627  ("src/code/destructuring-bind")
628  ("src/code/early-setf")
629  ("src/code/macros")
630  ("src/code/loop")
631  ("src/code/late-setf")
632
633  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
634
635  ;; other target-code-building stuff which can't be processed until
636  ;; machinery like SB!XC:DEFMACRO exists
637
638  ("src/code/late-format") ; needs SB!XC:DEFMACRO
639  ("src/code/sxhash") ; needs SB!XC:DEFINE-MODIFY-MACRO
640  ("src/code/signal")
641  ("src/code/late-defbangmethod"))