Remove a read() from inside a gc_assert, and other style fixes
[sbcl.git] / build-order.lisp-expr
blob520dedb0f7a4d994373163c6a29cbe0ee3aef2fc
1 ;;;; -*- Lisp -*-
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 ;;; a linear ordering of system sources which works both to
13 ;;; compile/load the cross-compiler under the host Common Lisp and
14 ;;; then to cross-compile the complete system into the
15 ;;; under-construction target SBCL
16 ;;;
17 ;;; The keyword flags (:NOT-HOST, :NOT-TARGET, :ASSEM...) are
18 ;;; documented in the code which implements their effects. (As of
19 ;;; sbcl-0.7.10, the comments are on DEFPARAMETER *EXPECTED-STEM-FLAGS*
20 ;;; in src/cold/shared.lisp.)
21 ;;;
22 ;;; Of course, it'd be very nice to have this be a dependency DAG
23 ;;; instead, so that we could do automated incremental recompilation.
24 ;;; But the dependencies are varied and subtle, and it'd be extremely
25 ;;; difficult to extract them automatically, and it'd be extremely
26 ;;; tedious and error-prone to extract them manually, so we don't
27 ;;; extract them. (It would be nice to fix this someday. The most
28 ;;; feasible approach that I can think of would be to make the
29 ;;; dependencies work on a package level, not an individual file
30 ;;; level. Doing it at the package level would make the granularity
31 ;;; coarse enough that it would probably be pretty easy to maintain
32 ;;; the dependency information manually, and the brittleness of the
33 ;;; package system would help make most violations of the declared
34 ;;; dependencies obvious at build time. -- WHN 20000803
36 #-warm-build-phase
38  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
39  ;;; miscellaneous
40  ;; This comes as early as possible, so that we catch the source locations
41  ;; for everything.
42  ("src/code/early-source-location" :c-headers)
43  ("src/code/cross-early" :c-headers :not-target)
45  ;; This comes early because it's useful for debugging everywhere.
46  ("src/code/show" :c-headers)
47  ("src/compiler/early-constantp" :c-headers)
48  ("src/code/defsetfs" :not-host)
50  ;; Declare all target special variables defined by ANSI
51  ("src/code/cl-specials" :not-host)
53  ;; Things like DX-FLET and AWHEN are available for use in both the host
54  ;; and target very early, with no DEF! obfuscation necessary.
55  ("src/code/primordial-extensions" :c-headers)
56  ("src/code/cold-init-helper-macros" :c-headers)
57  ("src/code/early-defmethod" :not-host)
59  ;; ASAP we replace the host's backquote reader with our own, to avoid leaking
60  ;; details of the host into the target. This is not a concern in make-host-2
61  ;; becase IN-TARGET-CROSS-COMPILATION-MODE assigns the reader macros before
62  ;; compiling anything. It is, however, a minor concern for make-host-1, but
63  ;; usually a problem can be exposed only by contrived code / poor style.
64  ;; e.g. if the host's reader were used when compiling
65  ;;  (EVAL-WHEN (#-SB-XC :COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
66  ;;    (DEFUN A-MACRO-HELPER () '`(FOO ,A ,B))
67  ;; then A-MACRO-HELPER returns host code, and calling it might be wrong, either
68  ;; obviously or subtly. If the result is (LIST* 'FOO (LIST* A (LIST B)))
69  ;; then it's subtly wrong because it might not be the optimal strategy;
70  ;; whereas if it's (BACKQUOTE (FOO (UNQUOTE A) (UNQUOTE B))) then it's
71  ;; flat out wrong. At any rate, judicious avoidance of EVAL-WHEN and nested
72  ;; quasiquotation in 'primordial-extensions' prevents any such issues.
73  ("src/code/backq")
75  ;; It's difficult to be too early with a DECLAIM SPECIAL (or DEFVAR
76  ;; or whatever) thanks to the sullenly-do-the-wrong-thing semantics
77  ;; of CL special binding when the variable is undeclared.
78  ("src/code/globals" :not-host)
80  ("src/code/cmacros" :not-host :slam-forcibly)
82  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83  ;;; cross-compiler-only replacements for stuff which in target Lisp would be
84  ;;; supplied by basic machinery
86  ("src/code/cross-byte"  :c-headers :not-target)
87  ("src/code/cross-misc"  :c-headers :not-target)
88  ("src/code/cross-char"  :c-headers :not-target)
89  ("src/code/cross-float" :not-target)
90  ("src/code/cross-io"    :not-target)
91  ("src/code/cross-thread" :c-headers :not-target)
92  ("src/code/cross-condition" :not-target)
94  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
95  ;;; stuff needed early both in cross-compilation host and in target Lisp
97  ("src/code/uncross" :c-headers)
99  ("src/code/defbangtype" :c-headers)
100  ("src/code/defbangconstant" :c-headers)
101  ("src/code/early-constants" :c-headers) ; needs DEF!CONSTANT
103  ("src/compiler/deftype" :c-headers)     ; on host for SB!XC:DEFTYPE
104  ("src/compiler/early-lexenv" :c-headers)
105  ("src/compiler/early-globaldb" :c-headers)
107  ;; comes early so that stuff can reason about function names
108  ("src/code/function-names" :c-headers)
110  ;; for various constants e.g. SB!XC:MOST-POSITIVE-FIXNUM and
111  ;; SB!VM:N-LOWTAG-BITS, needed by "early-objdef" and others
112  ("src/compiler/target/backend-parms" :c-headers)
113  ("src/compiler/generic/parms" :c-headers)
114  ("src/compiler/target/parms" :c-headers)
115  ("src/compiler/generic/early-vm" :c-headers)
116  ("src/compiler/generic/early-objdef" :c-headers)
117  ("src/code/early-array" :c-headers) ; needs "early-vm" numbers
119  ("src/code/kernel" :not-host)
120  ;; This has the BARRIER stuff that the threading support needs,
121  ;; required for some code in 'early-extensions'
122  ("src/code/barrier" :not-host)
123  ("src/code/parse-body" :c-headers)       ; on host for PARSE-BODY
124  ("src/code/unportable-float")
125  ("src/compiler/policy" :c-headers :slam-forcibly)
126  #!+sb-fasteval ("src/interpreter/basic-env")
127  ;; PARSE-{UNKNOWN,DEPRECATED}-TYPE and other things should be known
128  ;; condition subtypes as soon as possible
129  ("src/code/condition-boot" :not-host)
130  ("src/code/early-extensions" :c-headers) ; on host for COLLECT, SYMBOLICATE, etc.
131  ("src/compiler/parse-lambda-list" :c-headers)
132  ("src/code/restart" :not-host) ; %DEFCONSTANT can bind a restart
134  ("src/code/specializable-array")
136  ("src/code/early-cl")
137  ("src/code/ansi-stream" :not-host)
138  ("src/code/early-fasl" :c-headers)
140  ("src/code/defbangstruct" :c-headers)
141  ("src/code/early-thread")
142  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
143  ;;; basic machinery for the target Lisp. Note that although most of these
144  ;;; files are flagged :NOT-HOST, a few might not be.
146  ("src/code/early-print" :not-host)
147  ("src/code/early-pprint" :not-host)
148  ("src/code/early-impl" :not-host)
150  ("src/code/target-extensions" :not-host)
152  ;; Needed before the first use of WITH-SINGLE-PACKAGE-LOCKED-ERROR.
153  ("src/code/early-package" :not-host)
155  ("src/compiler/defconstant")
157  ("src/code/early-raw-slots" :c-headers)
159  ("src/code/funutils" :not-host)
161  ("src/code/maphash" :not-host :slam-forcibly)
162  ("src/code/xset" :c-headers) ; for representation of MEMBER type
163  ;; This needs DEF!STRUCT, and is itself needed early so that structure
164  ;; accessors and inline functions defined here can be compiled inline
165  ;; later. (Avoiding full calls increases efficiency)
166  ("src/code/type-class" :c-headers)
167  ("src/code/early-alieneval")  ; for funs and vars needed at build and run time
169  ("src/code/cas" :not-host)
170  ("src/compiler/early-c" :c-headers)
171  ("src/compiler/fun-info" :c-headers)
172  ("src/pcl/slot-name") ; for calls from 'info-vector'
173  ;; 'info-vector' is needed at least as early as 'fdefinition' so that the
174  ;; inlined INFO-VECTOR-FDEFINITION is available to %COERCE-CALLABLE-TO-FUN.
175  ("src/code/signal" :not-host)
176  ("src/code/target-lfhash" :not-host)
177  ("src/compiler/info-vector" :c-headers)
178  ("src/compiler/globaldb" :c-headers)
179  ("src/code/primordial-type" :c-headers)
180  ("src/code/early-classoid" :c-headers)
182  ("src/code/sysmacs" :not-host)
184  ("src/code/target-error" :not-host)
186  ;; "src/code/toplevel.lisp" is the first to need this. It's generated
187  ;; automatically by grovel_headers.c, i.e. it's not under source control.
188  ("output/stuff-groveled-from-headers" :not-host)
190  ("src/code/cold-error"  :not-host)
191  ("src/code/fdefinition" :not-host)
193  ("src/compiler/generic/vm-array" :c-headers)
194  ("src/code/weak"          :not-host)
195  ;; 'target-alieneval' needs FILL-POINTER which is defined in 'array'
196  ("src/code/array"         :not-host) ; needs WEAK-POINTER-VALUE
197  ("src/code/pred" :not-host)
198  ("src/code/debug-var-io")
200  ("src/code/target-alieneval" :not-host)
201  ("src/code/target-c-call"    :not-host)
202  ("src/code/target-allocate"  :not-host)
204  ;; This needs DEFINE-ALIEN-ROUTINE from target-alieneval.
205  ("src/code/misc-aliens" :not-host)
207  ("src/code/early-float"   :not-host)
208  ("src/pcl/early-low" :not-host)
209  ("src/code/target-sxhash" :not-host) ; needs most-fooative-foo-float constants
211  ("src/code/list"   :not-host)
212  ("src/code/seq"    :not-host) ; "code/seq" should come after "code/list".
213  ("src/code/coerce" :not-host)
215  ("src/code/char" :c-headers)
216  ("src/code/huffman")
217  ("src/code/target-char"    :not-host)
218  ("src/code/target-unicode" :not-host)
219  ("src/code/string"     :not-host)
220  ("src/code/mipsstrops" :not-host)
222  ("src/code/early-time" :c-headers)
223  ("src/code/unix" :not-host)
224  #!+win32 ("src/code/win32" :not-host)
225  #!+mach  ("src/code/mach"     :not-host)
227  #!+android ("src/code/android-os" :not-host)
228  #!+mach  ("src/code/mach-os"  :not-host)
229  #!+sunos ("src/code/sunos-os" :not-host)
230  #!+hpux  ("src/code/hpux-os"  :not-host)
231  #!+osf1  ("src/code/osf1-os"  :not-host)
232  #!+irix  ("src/code/irix-os"  :not-host)
233  #!+bsd   ("src/code/bsd-os"   :not-host)
234  #!+linux ("src/code/linux-os" :not-host)
235  #!+win32 ("src/code/win32-os" :not-host)
237  ;; sparc-vm and ppc-vm need sc-offset defined to get at internal
238  ;; error args. This file contains stuff previously in
239  ;; debug-info.lisp.  Should it therefore be :not-host?  -- CSR,
240  ;; 2002-02-05
241  ("src/code/sc-offset" :c-headers)
243  ("src/code/share-vm" :not-host)
245  ("src/code/thread" :not-host) ; provides *CURRENT-THREAD* for target-signal
246  #!-win32 ("src/code/target-signal" :not-host) ; needs OS-CONTEXT-T from share-vm
247  #!+win32 ("src/code/target-exception" :not-host)
249  ("src/code/bignum"     :not-host)
250  ("src/code/numbers"    :not-host)
251  ("src/code/float-trap" :not-host)
252  ("src/code/float"      :not-host)
253  ("src/code/irrat"      :not-host)
255  ("src/code/misc" :c-headers)
257  ("src/code/symbol"        :not-host)
258  ("src/code/late-cas"      :not-host)
259  ("src/code/fd-stream"     :not-host)
260  ("src/code/stream"        :not-host)
261  ("src/code/early-format")
263  ("src/code/error-error" :not-host) ; needs WITH-STANDARD-IO-SYNTAX macro
264  ("src/code/common-os" :not-host)
266  ("src/code/deadline" :not-host)
267  ("src/code/serve-event" :not-host)
269  ("src/code/query"  :not-host)
271  ("src/code/sort"  :not-host)
272  ("src/code/time"  :not-host)
273  ("src/code/final" :not-host)
275  ("src/code/exhaust" :not-host)
277  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
278  ;;; compiler (and a few miscellaneous files whose dependencies make it
279  ;;; convenient to stick them here)
281  ("src/compiler/policies")
283  ("src/compiler/macros" :c-headers)
285  ("src/compiler/constantp" :c-headers)
286  ("src/compiler/info-functions" :c-headers)
288  ("src/compiler/generic/vm-macs" :c-headers)
289  ("src/compiler/generic/objdef" :c-headers)
291  ;; needed by "compiler/vop"
292  ("src/compiler/sset" :c-headers)
293  ("src/code/early-type" :c-headers)
295  ;; for e.g. BLOCK-ANNOTATION, needed by "compiler/vop"
296  ("src/compiler/node" :c-headers)
297  ;; RECONSTRUCT-LEXENV needs types GLOBAL-VAR and DEFINED-FUN
298  ("src/compiler/lexenv")
300  ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
301  ;; and LABEL, needed by IR2-NLX-INFO
302  ("src/compiler/early-assem")
304  ;; for e.g. PRIMITIVE-TYPE, needed by "vmdef"
305  ("src/compiler/vop" :c-headers)
306  ("src/compiler/constant-leaf")
308  ;; needed by "vm" and "primtype"
309  ("src/compiler/backend" :c-headers)
311  ;; for e.g. MAX-VOP-TN-REFS, needed by "meta-vmdef"
312  ("src/compiler/vmdef" :c-headers)
314  ("src/code/force-delayed-defbangconstants")
315  ("src/code/defmacro" :c-headers)
316  ("src/code/destructuring-bind" :c-headers)
318  ;; for e.g. !DEF-PRIMITIVE-TYPE, needed by primtype.lisp, and
319  ;; DEFINE-STORAGE-CLASS, needed by target/vm.lisp
320  ("src/compiler/meta-vmdef" :c-headers)
322  ("src/compiler/fixup") ; for DEFSTRUCT FIXUP, needed by generic/core
323  ("src/compiler/generic/core") ; for CORE-OBJECT-P, needed by x86-64/vm
325  ;; for e.g. DESCRIPTOR-REG, needed by primtype.lisp
326  ("src/compiler/target/vm" :c-headers)
328  ;; KLUDGE: I'd prefer to have this done with a "code/target" softlink
329  ;; instead of a bunch of reader macros. -- WHN 19990308
330  #!+sparc ("src/code/sparc-vm")
331  #!+hppa  ("src/code/hppa-vm")
332  #!+x86   ("src/code/x86-vm"   :not-host)
333  #!+x86-64("src/code/x86-64-vm"   :not-host)
334  #!+ppc   ("src/code/ppc-vm")
335  #!+alpha ("src/code/alpha-vm")
336  #!+mips  ("src/code/mips-vm")
337  #!+arm   ("src/code/arm-vm")
338  #!+arm64 ("src/code/arm64-vm")
340  ;; RANDOM-LAYOUT-CLOS-HASH (in 'class') uses RANDOM, the transform for which
341  ;; uses GENERATE-RANDOM-EXPR-FOR-POWER-OF-2 which becomes BIG-RANDOM-CHUNK,
342  ;; which wants to be inlined, and which when inlined becomes RANDOM-CHUNK,
343  ;; which also wants to be inlined.
344  ("src/code/target-random" :not-host)
345  ;; META-FIXME: I think I figured out why this was, and fixed that,
346  ;; and never removed the following comment, nor can I remember why.
347  ;; FIXME: Classic CMU CL had (OPTIMIZE (SAFETY 2) (DEBUG 2) declared
348  ;; around the compilation of "code/class". Why?
349  ("src/code/class" :c-headers)
350  ("src/pcl/pre-warm")
351  ("src/pcl/low" :not-host)
353  ("src/code/debug-info" :c-headers)
354  ("src/code/source-location")
355  ;; Define at most one INTERPRETED-FUNCTION type based on target features
356  #!+sb-eval ("src/code/early-full-eval" :not-host)
357  #!+sb-fasteval ("src/interpreter/function" :not-host)
358  ("src/code/early-class")
359  ("src/code/condition" :not-host)
360  ("src/code/toplevel"  :not-host)
361  ("src/code/parse-defmacro-errors")
362  ("src/code/format-directive")
363  ;; Target-only stuff should usually be compiled late unless it has
364  ;; compile-time side-effects. This file could probably be later,
365  ;; but should certainly be no earlier than the definitions
366  ;; of FORMAT-ERROR and FORMAT-DIRECTIVE.
367  ("src/code/target-format" :not-host)
369  ("src/compiler/generic/primtype" :c-headers)
371  ;; for DEFSTRUCT ALIEN-TYPE, needed by host-type.lisp
372  ("src/code/host-alieneval")
374  ;; can't be done until definition of e.g. DEFINE-ALIEN-TYPE-CLASS in
375  ;; host-alieneval.lisp
376  ("src/code/host-c-call")
378  ;; SB!XC:DEFTYPE is needed in order to compile late-type
379  ;; in the host Common Lisp, and in order to run, it needs
380  ;; %COMPILER-DEFTYPE.
381  ("src/compiler/compiler-deftype" :c-headers)
383  ;; These appear here in the build sequence because they require
384  ;;   * the macro INFO, defined in globaldb.lisp, and
385  ;;   * the function PARSE-DEFMACRO, defined in parse-defmacro.lisp,
386  ;; and because they define
387  ;;   * the function SPECIFIER-TYPE, which is used in fndb.lisp.
388  ("src/code/late-type" :c-headers)
389  ;; Compile target-only stuff after all defglobals like *CONS-T-T-TYPE*
390  ;; and all type-classes are defined.
391  ("src/code/target-type" :not-host)
392  ("src/code/deftypes-for-target" :c-headers)
394  ;; defines IR1-ATTRIBUTES macro, needed by proclaim.lisp
395  ("src/compiler/knownfun")
397  ;; needs FUN-INFO structure slot setters, defined in knownfun.lisp
398  ("src/compiler/fun-info-funs")
400  ;; stuff needed by "code/defstruct"
401  ("src/code/cross-type" :c-headers :not-target)
402  ("src/compiler/generic/vm-type" :c-headers)
403  ("src/compiler/proclaim" :c-headers)
405  ("src/code/class-init" :c-headers)
407  ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in
408  ;; "code/late-type", and SB!XC:TYPEP, defined in "code/cross-type",
409  ;; and SPECIALIZE-ARRAY-TYPE, defined in "compiler/generic/vm-type",
410  ;; and SB!XC:PROCLAIM, defined in "src/compiler/proclaim"
411  ;; FIXME: #+ should be (and sb-xc-host) but it isn't set yet.
412  ("src/code/defstruct"  :c-headers #+cmucl :ignore-failure-p)
413  ("src/code/target-defstruct" :not-host)
415  ;; ALIEN-VALUE has to be defined as a class (done by DEFSTRUCT
416  ;; machinery) before we can set its superclasses here.
417  ("src/code/alien-type")
419  ;; This needs not just the SB!XC:DEFSTRUCT machinery, but also
420  ;; the TYPE= stuff defined in late-type.lisp, and the
421  ;; CHECK-FUN-NAME defined in proclaim.lisp.
422  ("src/code/force-delayed-defbangstructs" :c-headers)
424  ("src/code/typep" :not-host)
426  ("src/compiler/compiler-error")
428  ("src/code/type-init")
429  ;; Now that the type system is initialized, fix up UNKNOWN types that
430  ;; have crept in.
431  ("src/compiler/fixup-type")
433  ;; These define target types needed by fndb.lisp.
434  ("src/code/package" :c-headers)
435  ("src/code/random")
436  ("src/code/hash-table" :c-headers)
437  ("src/code/readtable")
438  ("src/code/pathname")
440  ("src/compiler/fndb")
441  ("src/compiler/generic/vm-fndb")
443  ("src/compiler/generic/late-objdef" :c-headers)
445  ("src/compiler/generic/interr" :c-headers)
447  ("src/compiler/bit-util")
449  ("src/code/load")
451  #!+linkage-table ("src/code/linkage-table" :not-host)
452  #!+os-provides-dlopen ("src/code/foreign-load" :not-host)
453  #!+(and os-provides-dlopen (not win32)) ("src/code/unix-foreign-load" :not-host)
454  #!+(and os-provides-dlopen win32) ("src/code/win32-foreign-load" :not-host)
455  ("src/code/foreign")
457  ("src/code/fop") ; needs macros from code/load.lisp
459  ("src/compiler/ctype")
460  ("src/compiler/disassem")
461  ("src/compiler/assem")
463  ;; Compiling this requires fop definitions from code/fop.lisp and
464  ("src/compiler/dump")
466  ("src/compiler/ir1report") ; for COMPILER-ERROR-CONTEXT
467  ("src/compiler/main") ; needs DEFSTRUCT FASL-OUTPUT from dump.lisp
468  ("src/compiler/xref")
469  ("src/compiler/target-main" :not-host)
470  ("src/compiler/ir1tran")
471  ("src/compiler/ir1tran-lambda")
472  ("src/compiler/ir1-translators")
473  ;; FIXME: #+ should be (and sb-xc-host) but it isn't set yet.
474  ("src/compiler/ir1util" #+cmucl :ignore-failure-p)
475  ("src/compiler/callable-args")
476  ("src/compiler/ir1opt")
477  ("src/compiler/loop")
479  ("src/compiler/ir1final")
480  ("src/compiler/array-tran")
481  ("src/compiler/seqtran")
482  ("src/compiler/typetran")
483  ("src/compiler/generic/vm-typetran")
484  ("src/compiler/float-tran")
485  ("src/compiler/saptran")
486  ("src/compiler/srctran")
487  ("src/code/quantifiers")
488  ("src/compiler/bitops-derive-type")
489  ("src/compiler/generic/vm-tran")
490  ("src/compiler/locall")
491  ("src/compiler/dfo")
492  ("src/compiler/dce")
493  ("src/compiler/checkgen")
494  ("src/compiler/constraint")
495  ("src/compiler/physenvanal")
497  ("src/compiler/tn")
498  ("src/compiler/life")
500  ("src/compiler/debug-dump")
501  ("src/compiler/generic/utils" :c-headers)
502  ("src/compiler/fopcompile")
504  ("src/assembly/assemfile" :not-target)
506  ;; Compiling this file requires the macros SB!ASSEM:EMIT-LABEL and
507  ;; SB!ASSEM:EMIT-POST-IT, defined in assem.lisp, and also possibly
508  ;; the definition of the LOCATION-INFO structure (if structures in
509  ;; the host lisp have setf expanders rather than setf functions).
510  ("src/compiler/late-vmdef")
512  ("src/compiler/target/insts")
513  ("src/compiler/target/macros")
514  ("src/compiler/generic/pinned-objects")
515  ("src/compiler/generic/early-type-vops")
517  ("src/assembly/target/support")
519  ("src/compiler/target/move")
520  ("src/compiler/target/float")
521  #!+sb-simd-pack
522  ("src/compiler/target/simd-pack")
523  ("src/compiler/target/sap")
524  ("src/compiler/target/system")
525  ("src/compiler/target/char")
526  ("src/compiler/target/memory")
527  ("src/compiler/target/arith"
528   ;; KLUDGE: for ppc and sparc this appears to be necessary, as it
529   ;; used to be for array VOPs for X86 until ca. 0.8.5.24 when CSR's
530   ;; patch for that architecture was finally committed
531   ;;
532   ;; old (0.8.5.23) comment on the array-VOP hack for X86:
533   ;; x Compiling this file for X86 raises alarming warnings of
534   ;; x the form
535   ;; x    Argument FOO to VOP CHECK-BOUND has SC restriction
536   ;; x    DESCRIPTOR-REG which is not allowed by the operand type:
537   ;; x      (:OR POSITIVE-FIXNUM)
538   ;; x This seems not to be something that I broke, but rather a "feature"
539   ;; x inherited from classic CMU CL. (Debian cmucl_2.4.8.deb compiling
540   ;; x Debian cmucl_2.4.8.tar.gz raises the same warning). Thus, even though
541   ;; x these warnings are severe enough that they would ordinarily abort
542   ;; x compilation, for now we blithely ignore them and press on to more
543   ;; x pressing problems. Someday, though, it would be nice to figure out
544   ;; x what the problem is and fix it.
545   #!+(or ppc) :ignore-failure-p)
546  ("src/code/cross-modular"  :not-target)
548  ("src/compiler/generic/late-type-vops") ;; KLUDGE: it's not so late anymore
549  ("src/compiler/target/type-vops")
551  ("src/compiler/target/subprim")
552  ("src/compiler/target/debug")
553  ;; src/compiler/sparc/c-call contains a deftransform for
554  ;; %ALIEN-FUNCALL -- CSR
555  ("src/compiler/early-aliencomp")
556  ("src/compiler/target/c-call")
557  ("src/compiler/target/cell")
558  ("src/compiler/target/values")
559  ("src/compiler/target/alloc")
560  ("src/compiler/target/call")
561  ("src/compiler/target/nlx")
562  ("src/compiler/generic/late-nlx")
563  ("src/compiler/target/show")
564  ("src/compiler/target/array")
565  ("src/compiler/generic/type-error")
566  ("src/compiler/target/pred")
568  ;; KLUDGE: The assembly files need to be compiled twice: once as
569  ;; normal lisp files, and once by sb-c:assemble-file.  We use a
570  ;; different suffix / "file type" for the :assem versions to make
571  ;; sure we don't scribble over anything we shouldn't.
573  ("src/assembly/target/assem-rtns")
574  ("src/assembly/target/array")
575  ("src/assembly/target/arith")
576  ("src/assembly/target/alloc")
577  ;; assembly files are all loaded by genesis before any compiled files.
578  ("src/assembly/target/tramps"     :assem :not-host)
579  ("src/assembly/target/assem-rtns" :assem :not-host)
580  ("src/assembly/target/array"      :assem :not-host)
581  ("src/assembly/target/arith"      :assem :not-host)
582  ("src/assembly/target/alloc"      :assem :not-host)
584  ("src/compiler/pseudo-vops")
586  ("src/compiler/aliencomp")
588  ("src/compiler/ltv")
589  ("src/compiler/gtn")
590  ("src/compiler/ltn")
591  ("src/compiler/stack")
592  ("src/compiler/control")
593  ("src/compiler/entry")
594  ("src/compiler/ir2tran")
596  ("src/compiler/generic/vm-ir2tran")
598  ("src/compiler/copyprop")
599  ("src/compiler/represent")
600  ("src/compiler/ir2opt")
601  ("src/compiler/pack")
602  ("src/compiler/pack-iterative")
603  ("src/compiler/codegen")
604  ("src/compiler/debug")
606  #!+sb-dyncount ("src/compiler/dyncount")
607  #!+sb-dyncount ("src/code/dyncount")
609  ;; needed by OPEN-FASL-OUTPUT, which is called by COMPILE-FILE
610  ("src/code/format-time")
612  ;; needed by various unhappy-path cases in the cross-compiler
613  ("src/code/error")
615  ;; This wasn't in classic CMU CL "comcom.lisp", but it has some stuff
616  ;; that Python-as-cross-compiler has turned out to need.
617  ("src/code/macroexpand")
619  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
620  ;; files which depend in some way (directly or indirectly) on stuff
621  ;; compiled as part of the compiler
623  ("src/code/late-extensions") ; needs condition system
624  ("src/compiler/generic/target-core" :not-host) ; uses stuff from
625                                                 ;   "compiler/generic/core"
627  ("src/code/eval"              :not-host) ; uses INFO, wants compiler macro
628  ("src/code/target-sap"        :not-host) ; uses SAP-INT type
629  ("src/code/target-package"    :not-host) ; needs "code/package"
630  ("src/code/module"            :not-host)
631  ("src/code/bignum-random"     :not-host) ; needs "code/random" and
632                                           ;   "code/bignum"
633  ("src/code/target-hash-table" :not-host) ; needs "code/hash-table"
634  ("src/code/host-pprint") ; defines QUEUED-OP needed by 'pprint'
635  ("src/code/pprint" :not-host) ; defines WITH-PRETTY-STREAM needed by 'print'
636  ("src/code/print" :not-host)
637  ("src/code/reader"            :not-host) ; needs "code/readtable"
638  ("src/code/target-stream"     :not-host) ; needs WHITESPACEP from "code/reader"
639  ("src/code/target-pathname"   :not-host) ; needs "code/pathname"
640  #!-win32
641  ("src/code/unix-pathname"     :not-host)
642  #!+win32
643  ("src/code/win32-pathname"    :not-host)
644  ("src/code/filesys"           :not-host) ; needs HOST from "code/pathname"
646  ("src/code/target-misc"       :not-host) ; dribble-stream, used by "save"
647  ("src/code/sharpm"            :not-host) ; uses stuff from "code/reader"
649  ("src/code/early-step")                  ; target-thread needs *STEP-OUT*
651  ("src/code/target-thread"     :not-host)
652  ("src/code/timer" :not-host)
654  ;; defines SB!DI:DO-DEBUG-FUN-BLOCKS, needed by target-disassem.lisp
655  ("src/code/gc"     :not-host)
656  ("src/code/alloc"  :not-host) ; needs foo-SPACE-START
657  ("src/code/debug-int" :not-host)
658  ("src/code/interr" :not-host)
660  ;; target-only assemblerish stuff
661  ("src/compiler/target-disassem"     :not-host)
662  ("src/compiler/target/target-insts" :not-host)
664  ("src/code/debug" :not-host)
666  ("src/code/octets" :not-host)
667  ("src/code/external-formats/enc-basic" :not-host)
668  #!+sb-unicode
669  ("src/code/external-formats/enc-ucs" :not-host) ; win32 needs this
671  #!+sb-eval
672  ("src/code/full-eval"   :not-host) ; uses INFO, ARG-COUNT-ERROR
674  ("src/code/bit-bash"    :not-host) ; needs %NEGATE from assembly/target/arith
676  ("src/code/target-load" :not-host) ; needs special vars from code/load.lisp
678  #!-(or x86 x86-64)
679  ("src/compiler/target/sanctify" :not-host)
681  ;; FIXME: Does this really need stuff from compiler/dump.lisp?
682  ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp
684  ("src/code/cold-init" :not-host) ; needs (SETF EXTERN-ALIEN) macroexpansion
686  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
687  ;; target macros and DECLAIMs installed at build-the-cross-compiler time
689  ;; FIXME: here? earlier?  can probably be as late as possible.  Also
690  ;; maybe call it FORCE-DELAYED-PROCLAIMS?
691  ("src/compiler/late-proclaim")
693  ;; fundamental target macros (e.g. CL:DO and CL:DEFUN) and support
694  ;; for them
695  ("src/code/defboot")
696  ("src/code/setf")
697  ("src/code/macros")
698  ("src/code/loop")
700  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
701  ;; other target-code-building stuff which can't be processed until
702  ;; machinery like SB!XC:DEFMACRO exists
704  ("src/code/late-format") ; needs SB!XC:DEFMACRO
705  ("src/code/sxhash") ; needs SB!XC:DEFINE-MODIFY-MACRO
707  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
708  ;; PCL-related stuff, which shouldn't need to be done earlier than
709  ;; anything else in cold build because after all it used to be
710  ;; postponed 'til warm init with no problems.
712  ("src/pcl/walk"))
714 ;;; warm build skips the list of files above even though there is no "#!" macro
715 ;;; at this point. That's not specified behavior of *READ-SUPPRESS*.
716 ;;; The place to change this behavior is in DISPATCH-CHAR-ERROR.
717 ;;; Then we would need to define "#!" to do something whenever this file is read.
718 ;;; If we're going down that route, we should change these feature expressions
719 ;;; to use "#!" syntax rather than rely on a bug to skip the above form.
720 #+warm-build-phase
721 (("src/code/warm-error"
722   "src/code/room" ; for MAP-ALLOCATED-OBJECTS
723   ;; We re-nickname SB-SEQUENCE as SEQUENCE now.
724   ;; It could be done in genesis, but not earlier,
725   ;; since the host has a package of that name.
726   "src/code/defpackage")
728  #+sb-fasteval
729  ("src/interpreter/macros"
730   "src/interpreter/checkfuns"
731   "src/interpreter/env"
732   "src/interpreter/sexpr"
733   "src/interpreter/special-forms"
734   "src/interpreter/eval"
735   "src/interpreter/debug")
737  ("src/code/external-formats/enc-ebcdic")
738  #+sb-unicode
739  ("src/code/external-formats/enc-cyr"
740   "src/code/external-formats/enc-dos"
741   "src/code/external-formats/enc-iso"
742   "src/code/external-formats/enc-win"
743   "src/code/external-formats/enc-mac"
744   "src/code/external-formats/mb-util"
745   "src/code/external-formats/enc-cn-tbl"
746   "src/code/external-formats/enc-cn"
747   "src/code/external-formats/enc-jpn-tbl"
748   "src/code/external-formats/enc-jpn"
749   "src/code/external-formats/enc-utf")
751  ;; CLOS, derived from the PCL reference implementation
752  ;;
753  ;; This PCL build order is based on a particular
754  ;; (arbitrary) linearization of the declared build
755  ;; order dependencies from the old PCL defsys.lisp
756  ;; dependency database.
757  ("src/pcl/macros"
758   "src/pcl/compiler-support"
759   "src/pcl/defclass"
760   "src/pcl/defs"
761   "src/pcl/fngen"
762   "src/pcl/wrapper"
763   "src/pcl/cache"
764   "src/pcl/dlisp"
765   "src/pcl/boot"
766   "src/pcl/vector"
767   "src/pcl/slots-boot"
768   "src/pcl/combin"
769   "src/pcl/dfun"
770   "src/pcl/ctor"
771   "src/pcl/braid"
772   "src/pcl/dlisp3"
773   "src/pcl/generic-functions"
774   "src/pcl/slots"
775   "src/pcl/init"
776   "src/pcl/std-class"
777   "src/pcl/cpl"
778   "src/pcl/fsc"
779   "src/pcl/methods"
780   "src/pcl/fixup"
781   "src/pcl/defcombin"
782   "src/pcl/ctypes"
783   "src/pcl/env"
784   "src/pcl/documentation"
785   "src/pcl/print-object"
786   "src/pcl/precom1"
787   "src/pcl/precom2")
789  ("src/code/setf-funs"
790   "src/code/stubs"
791   ;; miscellaneous functionality which depends on CLOS
792   "src/code/late-condition"
794   ;; CLOS-level support for the Gray OO streams
795   ;; extension (which is also supported by various
796   ;; lower-level hooks elsewhere in the code)
797   "src/pcl/gray-streams-class"
798   "src/pcl/gray-streams"
800   ;; CLOS-level support for User-extensible sequences.
801   "src/pcl/sequence"
803   ;; other functionality not needed for cold init, moved
804   ;; to warm init to reduce peak memory requirement in
805   ;; cold init
806   "src/code/describe"
808   "src/code/describe-policy"
809   "src/code/inspect"
810   "src/code/profile"
811   "src/code/ntrace"
812   "src/code/step"
813   "src/code/warm-lib"
814   #+win32 "src/code/warm-mswin"
815   "src/code/run-program"
816   #+gencgc "src/code/traceroot"
818   #+immobile-code "src/code/immobile-space"
819   "src/code/repack-xref"
820   #+cheneygc "src/code/purify"
821   "src/code/save"))