--- /dev/null
+;;;; -*- Lisp -*-
+
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
+
+;;; a linear ordering of system sources which works both to compile/load
+;;; the cross-compiler under the host Common Lisp and then to cross-compile
+;;; the complete system into the under-construction target SBCL
+;;;
+;;; Of course, it'd be very nice to have this be a dependency DAG
+;;; instead, so that we could do automated incremental recompilation.
+;;; But the dependencies are varied and subtle, and it'd be extremely
+;;; difficult to extract them automatically, and it'd be extremely
+;;; tedious and error-prone to extract them manually, so we don't
+;;; extract them. (It would be nice to fix this someday. The most
+;;; feasible approach that I can think of would be to make the
+;;; dependencies work on a package level, not an individual file
+;;; level. Doing it at the package level would make the granularity
+;;; coarse enough that it would probably be pretty easy to maintain
+;;; the dependency information manually, and the brittleness of the
+;;; package system would help make most violations of the declared
+;;; dependencies obvious at build time. -- WHN 20000803
+(
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; miscellaneous
+
+ ;; This comes early because it's useful for debugging everywhere.
+ ("src/code/show")
+
+ ;; This comes early because the cross-compilation host's backquote
+ ;; logic can expand into something which can't be executed on the
+ ;; target Lisp (e.g. in CMU CL where it expands into internal
+ ;; functions like BACKQ-LIST), and by replacing the host backquote
+ ;; logic with our own as early as possible, we minimize the chance of
+ ;; any forms referring to cross-compilation host internal functions
+ ;; leaking into target SBCL code.
+ ("src/code/backq")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; various DEFSETFs and/or other DEFMACROish things, defined as early as
+ ;; possible so we don't need to fiddle with any subtleties of defining them
+ ;; before any possible use
+
+ ;; KLUDGE: It would be nice to reimplement most or all of these as
+ ;; functions (possibly inlined functions) so that we wouldn't need to
+ ;; worry so much about forcing them all to be defined before any possible
+ ;; use. It might be pretty tedious, though, working through any
+ ;; transforms and translators and optimizers and so forth to make sure
+ ;; that they can handle the change. -- WHN 19990919
+ ("src/code/defsetfs")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; cross-compiler-only replacements for stuff which in target Lisp would be
+ ;;; supplied by basic machinery
+
+ ("src/code/cross-misc" :not-target)
+ ("src/code/cross-float" :not-target)
+ ("src/code/cross-io" :not-target)
+ ("src/code/cross-sap" :not-target)
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; stuff needed early both in cross-compilation host and in target Lisp
+
+ ("src/code/uncross")
+ ("src/code/early-defbangmethod")
+
+ ("src/code/defbangtype")
+ ("src/code/defbangmacro")
+
+ ("src/code/primordial-extensions")
+
+ ;; for various constants e.g. SB!VM:*TARGET-MOST-POSITIVE-FIXNUM* and
+ ;; SB!VM:N-LOWTAG-BITS, needed by "early-objdef" and others
+ ("src/compiler/generic/early-vm")
+ ("src/compiler/generic/early-objdef")
+ ("src/compiler/target/parms")
+ ("src/code/early-array") ; needs "early-vm" numbers
+
+ ("src/code/parse-body") ; on host for PARSE-BODY
+ ("src/code/parse-defmacro") ; on host for PARSE-DEFMACRO
+ ("src/code/early-extensions") ; on host for COLLECT, SYMBOLICATE, etc.
+ ("src/compiler/deftype") ; on host for SB!XC:DEFTYPE
+ ("src/code/early-alieneval") ; for vars needed both at build and run time
+
+ ("src/code/specializable-array")
+
+ ("src/code/early-cl")
+ ("src/code/early-fasl")
+
+ ;; mostly needed by stuff from comcom, but also used by "x86-vm"
+ ("src/code/debug-var-io")
+
+ ("src/code/cold-init-helper-macros")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; basic machinery for the target Lisp. Note that although most of these
+ ;;; files are flagged :NOT-HOST, a few might not be.
+
+ ("src/code/target-defbangmethod" :not-host)
+
+ ("src/code/early-print" :not-host)
+ ("src/code/early-pprint" :not-host)
+ ("src/code/early-impl" :not-host)
+
+ ("src/code/target-extensions" :not-host)
+
+ ("src/code/early-defstructs" :not-host) ; gotta-be-first DEFSTRUCTs
+
+ ("src/code/defbangstruct")
+
+ ("src/code/funutils" :not-host)
+
+ ;; This needs DEF!STRUCT, and is itself needed early so that structure
+ ;; accessors and inline functions defined here can be compiled inline
+ ;; later. (Avoiding full calls not only increases efficiency, but also
+ ;; avoids some cold init issues involving full calls to structure
+ ;; accessors.)
+ ("src/code/type-class")
+
+ ("src/code/pcounter" :not-host)
+
+ ("src/code/ansi-stream" :not-host)
+
+ ("src/code/sysmacs" :not-host)
+
+ ;; "assembly/assemfile" was here in the sequence inherited from
+ ;; CMU CL worldcom.lisp, but also appears later in the sequence
+ ;; inherited from CMU CL comcom.lisp. We shouldn't need two versions,
+ ;; so I've deleted the one here. -- WHN 19990620
+
+ ("src/code/target-error" :not-host)
+
+ ;; a comment from classic CMU CL:
+ ;; "These guys can supposedly come in any order, but not really.
+ ;; Some are put at the end so that macros don't run interpreted
+ ;; and stuff."
+ ;; Dunno exactly what this meant or whether it still holds. -- WHN 19990803
+ ;; FIXME: more informative and up-to-date comment?
+ ("src/code/globals" :not-host)
+ ("src/code/kernel" :not-host)
+ ("src/code/toplevel" :not-host)
+ ("src/code/cold-error" :not-host)
+ ("src/code/fdefinition" :not-host)
+ ;; FIXME: Figure out some way to make the compiler macro for INFO
+ ;; available for compilation of "code/fdefinition".
+
+ ;; In classic CMU CL, code/type was here. I've since split that into
+ ;; lots of smaller pieces, some of which are here and some of which
+ ;; are handled later in the sequence, when the cross-compiler is
+ ;; built. -- WHN 19990620
+ ("src/code/target-type" :not-host)
+
+ ("src/code/pred" :not-host)
+
+ ("src/code/target-alieneval" :not-host)
+ ("src/code/target-c-call" :not-host)
+ ("src/code/target-allocate" :not-host)
+
+ ;; This needs DEF-ALIEN-ROUTINE from target-alieneval.
+ ("src/code/misc-aliens" :not-host)
+
+ ("src/code/array" :not-host)
+ ("src/code/target-sxhash" :not-host)
+
+ ("src/code/list" :not-host)
+ ("src/code/seq" :not-host) ; "code/seq" should come after "code/list".
+ ("src/code/coerce" :not-host)
+
+ ("src/code/string" :not-host)
+ ("src/code/mipsstrops" :not-host)
+
+ ;; "src/code/unix.lisp" needs this. It's generated automatically by
+ ;; grovel_headers.c, i.e. it's not in CVS.
+ ("output/stuff-groveled-from-headers" :not-host)
+
+ ("src/code/unix" :not-host)
+
+ #!+mach ("src/code/mach" :not-host)
+ #!+mach ("src/code/mach-os" :not-host)
+ #!+sunos ("src/code/sunos-os" :not-host)
+ #!+hpux ("src/code/hpux-os" :not-host)
+ #!+osf1 ("src/code/osf1-os" :not-host)
+ #!+irix ("src/code/irix-os" :not-host)
+ #!+bsd ("src/code/bsd-os" :not-host)
+ #!+linux ("src/code/linux-os" :not-host)
+
+ ;; KLUDGE: I'd prefer to have this done with a "code/target" softlink
+ ;; instead of a bunch of reader macros. -- WHN 19990308
+ #!+pmax ("src/code/pmax-vm" :not-host)
+ #!+(and sparc svr4) ("src/code/sparc-svr4-vm" :not-host)
+ #!+(and sparc (not svr4)) ("src/code/sparc-vm" :not-host)
+ #!+rt ("src/code/rt-vm" :not-host)
+ #!+hppa ("src/code/hppa-vm" :not-host)
+ #!+x86 ("src/code/x86-vm" :not-host)
+ #!+alpha ("src/code/alpha-vm" :not-host)
+ #!+sgi ("src/code/sgi-vm" :not-host)
+
+ ("src/code/target-signal" :not-host) ; needs OS-CONTEXT-T from x86-vm
+
+ ("src/code/symbol" :not-host)
+ ("src/code/bignum" :not-host)
+ ("src/code/numbers" :not-host)
+ ("src/code/float-trap" :not-host)
+ ("src/code/float" :not-host)
+ ("src/code/irrat" :not-host)
+
+ ("src/code/char")
+ ("src/code/target-char" :not-host)
+ ("src/code/target-misc" :not-host)
+ ("src/code/misc")
+
+ ("src/code/room" :not-host)
+ ("src/code/gc" :not-host)
+ ("src/code/purify" :not-host)
+
+ ("src/code/stream" :not-host)
+ ("src/code/print" :not-host)
+ ("src/code/pprint" :not-host)
+ ("src/code/early-format")
+ ("src/code/target-format" :not-host)
+ ("src/code/defpackage" :not-host)
+ ("src/code/pp-backq" :not-host)
+
+ ("src/code/error-error" :not-host) ; needs WITH-STANDARD-IO-SYNTAX macro
+
+ ("src/code/serve-event" :not-host)
+ ("src/code/fd-stream" :not-host)
+
+ ("src/code/module" :not-host)
+
+ ("src/code/interr" :not-host)
+
+ ("src/code/query" :not-host)
+
+ ("src/code/sort" :not-host)
+ ("src/code/time" :not-host)
+ ("src/code/weak" :not-host)
+ ("src/code/final" :not-host)
+
+ #!+mp ("src/code/multi-proc" :not-host)
+
+ ("src/code/setf-funs" :not-host)
+
+ ("src/code/stubs" :not-host)
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;;; compiler (and a few miscellaneous files whose dependencies make it
+ ;;; convenient to stick them here)
+
+ ("src/compiler/early-c")
+ ("src/compiler/policy")
+ ("src/code/typedefs")
+
+ ;; ("src/code/defbangmacro" was here until sbcl-0.6.7.3.)
+
+ ("src/compiler/macros")
+ ("src/compiler/generic/vm-macs")
+
+ ;; needed by "compiler/vop"
+ ("src/compiler/sset")
+
+ ;; for e.g. BLOCK-ANNOTATION, needed by "compiler/vop"
+ ("src/compiler/node")
+
+ ;; for e.g. PRIMITIVE-TYPE, needed by "vmdef"
+ ("src/compiler/vop")
+
+ ;; needed by "vm" and "primtype"
+ ("src/compiler/backend")
+
+ ;; for e.g. MAX-VOP-TN-REFS, needed by "meta-vmdef"
+ ("src/compiler/vmdef")
+
+ ;; needs "backend"
+ ("src/compiler/target/backend-parms")
+
+ ;; for INFO and SB!XC:MACRO-FUNCTION, needed by defmacro.lisp
+ ("src/compiler/globaldb")
+ ("src/compiler/info-functions")
+
+ ("src/code/defmacro")
+ ("src/code/force-delayed-defbangmacros")
+
+ ("src/compiler/late-macros")
+
+ ;; for e.g. !DEF-PRIMITIVE-TYPE, needed by primtype.lisp, and
+ ;; DEFINE-STORAGE-CLASS, needed by target/vm.lisp
+ ("src/compiler/meta-vmdef")
+
+ ;; for e.g. DESCRIPTOR-REG, needed by primtype.lisp
+ ("src/compiler/target/vm")
+
+ ;; for e.g. SPECIFIER-TYPE, needed by primtype.lisp
+ ("src/code/early-type")
+
+ ;; FIXME: Classic CMU CL had SAFETY 2 DEBUG 2 set around the compilation
+ ;; of "code/class". Why?
+ ("src/code/class")
+
+ ;; The definition of CONDITION-CLASS depends on SLOT-CLASS, defined
+ ;; in class.lisp.
+ ("src/code/condition" :not-host)
+
+ ("src/compiler/generic/primtype")
+
+ ;; the implementation of the compiler-affecting part of forms like
+ ;; DEFMACRO and DEFTYPE; must be loaded before we can start
+ ;; defining types
+ ("src/compiler/parse-lambda-list")
+
+ ;; for DEFSTRUCT ALIEN-TYPE, needed by host-type.lisp
+ ("src/code/host-alieneval")
+
+ ;; can't be done until definition of e.g. DEF-ALIEN-TYPE-CLASS in
+ ;; host-alieneval.lisp
+ ("src/code/host-c-call")
+
+ ;; SB!XC:DEFTYPE is needed in order to compile late-type
+ ;; in the host Common Lisp, and in order to run, it needs
+ ;; %COMPILER-DEFTYPE.
+ ("src/compiler/compiler-deftype")
+
+ ;; These appear here in the build sequence because they require
+ ;; * the macro INFO, defined in globaldb.lisp, and
+ ;; * the function PARSE-DEFMACRO, defined in parse-defmacro.lisp,
+ ;; and because they define
+ ;; * the function SPECIFIER-TYPE, which is used in fndb.lisp.
+ ("src/code/late-type")
+ ("src/code/deftypes-for-target")
+
+ ;; defines IR1-ATTRIBUTES macro, needed by proclaim.lisp
+ ("src/compiler/knownfun")
+
+ ;; stuff needed by "code/defstruct"
+ ("src/code/cross-type" :not-target)
+ ("src/compiler/generic/vm-type")
+ ("src/compiler/proclaim")
+ ("src/code/typecheckfuns")
+
+ ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in
+ ;; "code/late-type", and SB!XC:TYPEP, defined in "code/cross-type",
+ ;; and SPECIALIZE-ARRAY-TYPE, defined in "compiler/generic/vm-type",
+ ;; and SB!XC:PROCLAIM, defined in "src/compiler/proclaim"
+ ("src/code/defstruct")
+ ("src/code/target-defstruct" :not-host)
+
+ ;; ALIEN-VALUE has to be defined as a class (done by DEFSTRUCT
+ ;; machinery) before we can set its superclasses here.
+ ("src/code/alien-type")
+
+ ;; This needs not just the SB!XC:DEFSTRUCT machinery, but also
+ ;; the TYPE= stuff defined in late-type.lisp, and the
+ ;; CHECK-FUN-NAME defined in proclaim.lisp.
+ ("src/code/force-delayed-defbangstructs")
+
+ ("src/code/typep" :not-host)
+
+ ("src/compiler/compiler-error")
+
+ ("src/code/type-init")
+
+ ;; These define target types needed by fndb.lisp.
+ ("src/code/package")
+ ("src/code/random")
+ ("src/code/hash-table")
+ ("src/code/readtable")
+ ("src/code/pathname")
+ ("src/compiler/lexenv")
+
+ ;; KLUDGE: Much stuff above here is the type system and/or the INFO
+ ;; system, not really the compiler proper. It might be easier to
+ ;; understand the system if those things were split off into packages
+ ;; SB-TYPE and SB-INFO and built in their own sections. -- WHN 20000124
+
+ ;; In classic CMU CL (re)build order, these were done later, but
+ ;; in building from scratch, these must be loaded before
+ ;; "compiler/generic/objdef" in order to allow forms like
+ ;; (DEFINE-PRIMITIVE-OBJECT (..) (CAR ..) ..) to work.
+ ("src/compiler/fndb")
+ ("src/compiler/generic/vm-fndb")
+
+ ("src/compiler/generic/objdef")
+
+ ("src/compiler/generic/interr")
+
+ ("src/compiler/bit-util")
+
+ ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
+ ("src/compiler/early-assem")
+
+ ;; core.lisp contains DEFSTRUCT CORE-OBJECT, and "compiler/main.lisp"
+ ;; does lots of (TYPEP FOO 'CORE-OBJECT), so it's nice to compile this
+ ;; before "compiler/main.lisp" so that those can be coded efficiently
+ ;; (and so that they don't cause lots of annoying compiler warnings
+ ;; about undefined types).
+ ("src/compiler/generic/core")
+
+ ("src/code/load")
+
+ ("src/code/fop") ; needs macros from code/load.lisp
+
+ ("src/compiler/ctype")
+ ("src/compiler/disassem")
+ ("src/compiler/assem")
+
+ ("src/compiler/trace-table") ; needs EMIT-LABEL macro from compiler/assem.lisp
+
+ ;; Compiling this requires fop definitions from code/fop.lisp and
+ ;; trace table definitions from compiler/trace-table.lisp.
+ ("src/compiler/dump"
+ ;; FIXME: When building sbcl-0.pre7.14.flaky4.5 under sbcl-0.6.12.1
+ ;; with :SB-SHOW on the target *FEATURES* list, cross-compilation of
+ ;; this file gives a WARNING in HEXSTR,
+ ;; Lisp error during constant folding:
+ ;; Argument X is not a REAL: NIL
+ ;; This seems to come from DEF!MACRO %WITH-ARRAY-DATA-MACRO code
+ ;; which looks like
+ ;; (cond (,end
+ ;; (unless (or ,unsafe? (<= ,end ,size))
+ ;; ..))
+ ;; ..)
+ ;; where the system is trying to constant-fold the <= form when the
+ ;; ,END binding is known to be NIL at compile time. Since the <= form
+ ;; is unreachable in that case, this shouldn't be signalling a WARNING;
+ ;; but as long as it is, we have to ignore it in order to go on.
+ :ignore-failure-p)
+
+ ("src/compiler/main") ; needs DEFSTRUCT FASL-OUTPUT from dump.lisp
+ ("src/compiler/target-main" :not-host)
+ ("src/compiler/ir1tran")
+ ("src/compiler/ir1-translators")
+ ("src/compiler/ir1util")
+ ("src/compiler/ir1report")
+ ("src/compiler/ir1opt")
+
+ ;; Compiling this file requires the macros SB!ASSEM:EMIT-LABEL and
+ ;; SB!ASSEM:EMIT-POST-IT, defined in assem.lisp.
+ ("src/compiler/late-vmdef")
+
+ ("src/compiler/ir1final")
+ ("src/compiler/array-tran")
+ ("src/compiler/seqtran")
+ ("src/compiler/typetran")
+ ("src/compiler/generic/vm-typetran")
+ ("src/compiler/float-tran")
+ ("src/compiler/saptran")
+ ("src/compiler/srctran")
+ ("src/compiler/locall")
+ ("src/compiler/dfo")
+ ("src/compiler/checkgen")
+ ("src/compiler/constraint")
+ ("src/compiler/physenvanal")
+
+ ("src/compiler/tn")
+ ("src/compiler/life")
+
+ ("src/code/debug-info")
+
+ ("src/compiler/debug-dump")
+ ("src/compiler/generic/utils")
+ ("src/assembly/assemfile")
+
+ ("src/compiler/fixup") ; for DEFSTRUCT FIXUP, used by insts.lisp
+
+ ("src/compiler/target/insts")
+ ("src/compiler/target/macros")
+
+ ("src/assembly/target/support")
+
+ ("src/compiler/target/move")
+ ("src/compiler/target/float")
+ ("src/compiler/target/sap")
+ ("src/compiler/target/system")
+ ("src/compiler/target/char")
+ ("src/compiler/target/memory")
+ ("src/compiler/target/static-fn")
+ ("src/compiler/target/arith")
+ ("src/compiler/target/subprim")
+
+ ("src/compiler/target/debug")
+ ("src/compiler/target/c-call")
+ ("src/compiler/target/cell")
+ ("src/compiler/target/values")
+ ("src/compiler/target/alloc")
+ ("src/compiler/target/call")
+ ("src/compiler/target/nlx")
+ ("src/compiler/target/show")
+ ("src/compiler/target/array"
+ ;; KLUDGE: Compiling this file raises alarming warnings of the form
+ ;; Argument FOO to VOP CHECK-BOUND has SC restriction
+ ;; DESCRIPTOR-REG which is not allowed by the operand type:
+ ;; (:OR POSITIVE-FIXNUM)
+ ;; This seems not to be something that I broke, but rather a "feature"
+ ;; inherited from classic CMU CL. (Debian cmucl_2.4.8.deb compiling
+ ;; Debian cmucl_2.4.8.tar.gz raises the same warning). Thus, even though
+ ;; these warnings are severe enough that they would ordinarily abort
+ ;; compilation, for now we blithely ignore them and press on to more
+ ;; pressing problems. Someday, though, it would be nice to figure out
+ ;; what the problem is and fix it.. -- WHN 19990323
+ :ignore-failure-p)
+ ("src/compiler/target/pred")
+ ("src/compiler/target/type-vops")
+
+ ("src/assembly/target/assem-rtns" :assem)
+ ("src/assembly/target/array" :assem)
+ ("src/assembly/target/arith" :assem)
+ ("src/assembly/target/alloc" :assem)
+
+ ("src/compiler/pseudo-vops")
+
+ ("src/compiler/aliencomp")
+
+ ("src/compiler/ltv")
+ ("src/compiler/gtn")
+ ("src/compiler/ltn")
+ ("src/compiler/stack")
+ ("src/compiler/control")
+ ("src/compiler/entry")
+ ("src/compiler/ir2tran")
+
+ ("src/compiler/generic/vm-ir2tran")
+
+ ("src/compiler/copyprop")
+ ("src/compiler/represent")
+ ("src/compiler/generic/vm-tran")
+ ("src/compiler/pack")
+ ("src/compiler/codegen")
+ ("src/compiler/debug")
+
+ #!+sb-dyncount ("src/compiler/dyncount")
+ #!+sb-dyncount ("src/code/dyncount")
+
+ ;; needed by OPEN-FASL-OUTPUT, which is called by COMPILE-FILE
+ ("src/code/format-time")
+
+ ;; needed by various unhappy-path cases in the cross-compiler
+ ("src/code/error")
+
+ ;; This wasn't in classic CMU CL "comcom.lisp", but it has some stuff
+ ;; that Python-as-cross-compiler has turned out to need.
+ ("src/code/macroexpand")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; files which depend in some way (directly or indirectly) on stuff
+ ;; compiled as part of the compiler
+
+ ("src/code/late-extensions") ; needs condition system
+ ("src/compiler/generic/target-core" :not-host) ; uses stuff from
+ ; "compiler/generic/core"
+
+ ("src/code/eval" :not-host) ; uses INFO, wants compiler macro
+ ("src/code/target-sap" :not-host) ; uses SAP-INT-TYPE
+ ("src/code/target-package" :not-host) ; needs "code/package"
+ ("src/code/target-random" :not-host) ; needs "code/random"
+ ("src/code/target-hash-table" :not-host) ; needs "code/hash-table"
+ ("src/code/reader" :not-host) ; needs "code/readtable"
+ ("src/code/target-pathname" :not-host) ; needs "code/pathname"
+ ("src/code/filesys" :not-host) ; needs HOST from "code/pathname"
+ ("src/code/save" :not-host) ; uses the definition of PATHNAME
+ ; from "code/pathname"
+ ("src/code/sharpm" :not-host) ; uses stuff from "code/reader"
+
+ ;; defines SB!DI:DO-DEBUG-FUN-BLOCKS, needed by target-disassem.lisp
+ ("src/code/debug-int" :not-host)
+
+ ;; target-only assemblerish stuff
+ ("src/compiler/target-disassem" :not-host)
+ ("src/compiler/target/target-insts" :not-host)
+
+ ("src/code/debug" :not-host)
+
+ ;; The code here can't be compiled until CONDITION and
+ ;; DEFINE-CONDITION are defined and SB!DEBUG:*STACK-TOP-HINT* is
+ ;; declared special.
+ ("src/code/parse-defmacro-errors")
+
+ ("src/code/bit-bash" :not-host) ; needs %NEGATE from assembly/target/arith
+
+ ("src/code/target-load" :not-host) ; needs specials from code/load.lisp
+
+ ;; FIXME: Does this really need stuff from compiler/dump.lisp?
+ ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp
+
+ ("src/code/cold-init" :not-host ; needs (SETF EXTERN-ALIEN) macroexpansion
+ ;; FIXME: When building sbcl-0.pre7.14.flaky4.5 under sbcl-0.6.12.1
+ ;; with :SB-SHOW on the target *FEATURES* list, cross-compilation of
+ ;; this file gives a WARNING in HEXSTR,
+ ;; Lisp error during constant folding:
+ ;; Argument X is not a REAL: NIL
+ ;; This seems to come from DEF!MACRO %WITH-ARRAY-DATA-MACRO code
+ ;; which looks like
+ ;; (cond (,end
+ ;; (unless (or ,unsafe? (<= ,end ,size))
+ ;; ..))
+ ;; ..)
+ ;; where the system is trying to constant-fold the <= form when the
+ ;; ,END binding is known to be NIL at compile time. Since the <= form
+ ;; is unreachable in that case, this shouldn't be signalling a WARNING;
+ ;; but as long as it is, we have to ignore it in order to go on.
+ :ignore-failure-p)
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ ;; target macros and DECLAIMs installed at build-the-cross-compiler time
+
+ ;; Declare all target special variables defined by ANSI now, so that
+ ;; we don't have to worry about any of them being bound incorrectly
+ ;; when the compiler processes code which appears before the appropriate
+ ;; DEFVAR or DEFPARAMETER.
+ ("src/code/cl-specials")
+
+ ;; fundamental target macros (e.g. CL:DO and CL:DEFUN) and support
+ ;; for them
+ ("src/code/defboot")
+ ("src/code/destructuring-bind")
+ ("src/code/early-setf")
+ ("src/code/macros")
+ ("src/code/loop")
+ ("src/code/late-setf")
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ;; other target-code-building stuff which can't be processed until
+ ;; machinery like SB!XC:DEFMACRO exists
+
+ ("src/code/late-format") ; needs SB!XC:DEFMACRO
+ ("src/code/sxhash") ; needs SB!XC:DEFINE-MODIFY-MACRO
+ ("src/code/signal")
+ ("src/code/late-defbangmethod"))
"ASSQ" "DELQ" "MEMQ" "POSQ" "NEQ"
"%FIND-PACKAGE-OR-LOSE" "FIND-UNDELETED-PACKAGE-OR-LOSE"
"SANE-PACKAGE"
- "CIRCULAR-LIST-P"
+ "CYCLIC-LIST-P"
+ "COMPOUND-OBJECT-P"
"SWAPPED-ARGS-FUN"
"ANY/TYPE" "EVERY/TYPE"
"TYPE-BOUND-NUMBER"
"%DOUBLE-FLOAT" "%DPB" "%EXP" "%EXPM1"
"%FIND-POSITION" "%FIND-POSITION-VECTOR-MACRO"
"%FIND-POSITION-IF" "%FIND-POSITION-IF-VECTOR-MACRO"
- "%HYPOT" "%INSTANCE-SET-CONDITIONAL" "%LDB"
+ "%HYPOT" "%LDB"
"%LOG" "%LOGB" "%LOG10" "%LOG1P" "%LONG-FLOAT"
"%MAKE-COMPLEX" "%MAKE-FUNCALLABLE-INSTANCE" "%MAKE-RATIO"
"%MAP" "%MAP-TO-SIMPLE-VECTOR-ARITY-1" "%MAP-TO-LIST-ARITY-1"
;;; FIXME: It would be good to arrange for this to be called when the
;;; cross-compiler is being built, not just when the target Lisp is
;;; being cold loaded. Perhaps this could be moved to its own file
-;;; late in the stems-and-flags.lisp-expr sequence, and be put in
+;;; late in the build-order.lisp-expr sequence, and be put in
;;; !COLD-INIT-FORMS there?
(defun !class-finalize ()
(dohash (name layout *forward-referenced-layouts*)
(eval-when (:compile-toplevel :execute)
(defmacro-mundanely maybe-find-stack-top-hint ()
`(or sb!debug:*stack-top-hint*
- (nth-value 1 (sb!kernel:find-caller-name-and-frame)))))
+ (nth-value 1 (find-caller-name-and-frame)))))
(defun error (datum &rest arguments)
#!+sb-doc
(sb!impl::cold-print argument))
(/show0 "done cold-printing ERROR arguments")
- (sb!kernel:infinite-error-protect
+ (infinite-error-protect
(let ((condition (coerce-to-condition datum arguments
'simple-error 'error))
(sb!debug:*stack-top-hint* (maybe-find-stack-top-hint)))
(invoke-debugger condition))))
(defun cerror (continue-string datum &rest arguments)
- (sb!kernel:infinite-error-protect
+ (infinite-error-protect
(with-simple-restart
(continue "~A" (apply #'format nil continue-string arguments))
- (let ((condition (if (typep datum 'condition)
- datum
- (coerce-to-condition datum
- arguments
- 'simple-error
- 'error)))
+ (let ((condition (coerce-to-condition datum
+ arguments
+ 'simple-error
+ 'error))
(sb!debug:*stack-top-hint* (maybe-find-stack-top-hint)))
(with-condition-restarts condition (list (find-restart 'continue))
(let ((sb!debug:*stack-top-hint* nil))
;;; *DEBUGGER-HOOK*); or for that matter, without messing up ordinary
;;; applications which try to do similar things with *DEBUGGER-HOOK*
(defun %break (what &optional (datum "break") &rest arguments)
- (sb!kernel:infinite-error-protect
+ (infinite-error-protect
(with-simple-restart (continue "Return from ~S." what)
(let ((sb!debug:*stack-top-hint* (maybe-find-stack-top-hint)))
(invoke-debugger
(/show0 "ignoring WARN in cold init, arguments=..")
#!+sb-show (dolist (argument arguments)
(sb!impl::cold-print argument)))
- (sb!kernel:infinite-error-protect
+ (infinite-error-protect
(/show0 "doing COERCE-TO-CONDITION")
(let ((condition (coerce-to-condition datum arguments
'simple-warning 'warn)))
(1- max))))
(t nil))))
-;;; Is X a circular list?
-(defun circular-list-p (x)
+;;; Is X a list containing a cycle?
+(defun cyclic-list-p (x)
(and (listp x)
(labels ((safe-cddr (x) (if (listp (cdr x)) (cddr x))))
(do ((y x (safe-cddr y))
((or (= r 0) (> d q)) (/= r 0))
(declare (fixnum inc))
(multiple-value-setq (q r) (truncate x d))))))
+
+;;; Could this object contain other objects? (This is important to
+;;; the implementation of things like *PRINT-CIRCLE* and the dumper.)
+(defun compound-object-p (x)
+ (or (consp x)
+ (typep x 'instance)
+ (typep x '(array t *))))
\f
;;;; the COLLECT macro
;;;;
;;; that there is no pretty printer installed.
(defvar *pretty-printer* nil)
+;;; Objects whose print representation identifies them EQLly don't
+;;; need to be checked for circularity.
+(defun uniquely-identified-by-print-p (x)
+ (or (numberp x)
+ (characterp x)
+ (and (symbolp x)
+ (symbol-package x))))
+
;;; Output OBJECT to STREAM observing all printer control variables.
(defun output-object (object stream)
(labels ((print-it (stream)
(t
(when (handle-circularity marker stream)
(print-it stream)))))))
- (cond ((or (not *print-circle*)
- (numberp object)
- (characterp object)
- (and (symbolp object)
- (symbol-package object)))
- ;; If it's a number, character, or interned symbol, we
- ;; don't want to check for circularity/sharing.
+ (cond (;; Maybe we don't need to bother with circularity detection.
+ (or (not *print-circle*)
+ (uniquely-identified-by-print-p object))
(print-it stream))
- ((or *circularity-hash-table*
- (consp object)
- (typep object 'instance)
- (typep object '(array t *)))
- ;; If we have already started circularity detection, this
+ (;; If we have already started circularity detection, this
;; object might be a shared reference. If we have not, then
- ;; if it is a cons, an instance, or an array of element
- ;; type T it might contain a circular reference to itself
- ;; or multiple shared references.
+ ;; if it is a compound object it might contain a circular
+ ;; reference to itself or multiple shared references.
+ (or *circularity-hash-table*
+ (compound-object-p x))
(check-it stream))
(t
(print-it stream)))))
;;; the current alien stack pointer; saved/restored for non-local exits
(defvar *alien-stack*)
-(defun sb!kernel::%instance-set-conditional (object slot test-value new-value)
- (declare (type instance object)
- (type index slot))
- #!+sb-doc
- "Atomically compare object's slot value to test-value and if EQ store
- new-value in the slot. The original value of the slot is returned."
- (sb!kernel::%instance-set-conditional object slot test-value new-value))
-
;;; Support for the MT19937 random number generator. The update
;;; function is implemented as an assembly routine. This definition is
;;; transformed to a call to the assembly routine allowing its use in
;; warnings and remove support for this flag. -- WHN 19990323)
:ignore-failure-p))
-(defparameter *stems-and-flags* (read-from-file "stems-and-flags.lisp-expr"))
+(defparameter *stems-and-flags* (read-from-file "build-order.lisp-expr"))
(defmacro do-stems-and-flags ((stem flags) &body body)
(let ((stem-and-flags (gensym "STEM-AND-FLAGS-")))
(let ((stems (make-hash-table :test 'equal)))
(do-stems-and-flags (stem flags)
(if (gethash stem stems)
- (error "duplicate stem ~S in stems-and-flags data" stem)
+ (error "duplicate stem ~S in *STEMS-AND-FLAGS*" stem)
(setf (gethash stem stems) t))
(let ((set-difference (set-difference flags *expected-stem-flags*)))
(when set-difference
;;;
;;; FIXME: This has mutated into a hack which crudely duplicates
;;; functionality from the existing mechanism to load files from
-;;; stems-and-flags.lisp-expr, without being quite parallel. (E.g.
-;;; object files end up alongside the source files instead of ending
-;;; up in parallel directory trees.) Maybe we could merge the
-;;; filenames here into stems-and-flags.lisp-expr with some new flag
-;;; (perhaps :WARM) to indicate that the files should be handled not
-;;; in cold load but afterwards. Alternatively, we could call
-(dolist (stem '(
- ;; CLOS, derived from the PCL reference implementation
+;;; build-order.lisp-expr, without being quite parallel. (E.g. object
+;;; files end up alongside the source files instead of ending up in
+;;; parallel directory trees.) Maybe we could merge the filenames here
+;;; into build-order.lisp-expr with some new flag (perhaps :WARM) to
+;;; indicate that the files should be handled not in cold load but
+;;; afterwards.
+(dolist (stem '(;; CLOS, derived from the PCL reference implementation
;;
;; This PCL build order is based on a particular
;; linearization of the declared build order
;; take a little more care while dumping these.
;; So if better list coalescing is needed, start here.
;; -- WHN 2000-11-07
- (if (circular-list-p x)
+ (if (cyclic-list-p x)
(progn
(dump-list x file)
(eq-save-object x file))
;;; We peek at the object type so that we only pay the circular
;;; detection overhead on types of objects that might be circular.
(defun dump-object (x file)
- (if (or (array-header-p x)
- (simple-vector-p x)
- (consp x)
- (typep x 'instance))
+ (if (compound-object-p x)
(let ((*circularities-detected* ())
(circ (fasl-output-circularity-table file)))
(clrhash circ)
(define-full-setter instance-index-set * instance-slots-offset
instance-pointer-lowtag (any-reg descriptor-reg) * %instance-set)
-
-(defknown sb!kernel::%instance-set-conditional (instance index t t) t
- (unsafe))
-
-(define-vop (instance-set-conditional-c slot-set-conditional)
- (:policy :fast-safe)
- (:translate sb!kernel::%instance-set-conditional)
- (:variant instance-slots-offset instance-pointer-lowtag)
- (:arg-types instance (:constant index) * *))
-
-(define-vop (instance-set-conditional)
- (:translate sb!kernel::%instance-set-conditional)
- (:args (object :scs (descriptor-reg) :to :eval)
- (slot :scs (any-reg) :to :result)
- (old-value :scs (descriptor-reg any-reg) :target eax)
- (new-value :scs (descriptor-reg any-reg) :target temp))
- (:arg-types instance positive-fixnum * *)
- (:temporary (:sc descriptor-reg :offset eax-offset
- :from (:argument 1) :to :result :target result) eax)
- (:temporary (:sc descriptor-reg :from (:argument 2) :to :result) temp)
- (:results (result :scs (descriptor-reg)))
- (:policy :fast-safe)
- (:generator 5
- (move eax old-value)
- (move temp new-value)
- (inst cmpxchg (make-ea :dword :base object :index slot :scale 1
- :disp (- (* instance-slots-offset n-word-bytes)
- instance-pointer-lowtag))
- temp)
- (move result eax)))
-
-(defknown %instance-xadd (instance index fixnum) fixnum ())
-(define-vop (instance-xadd-c slot-xadd)
- (:policy :fast-safe)
- (:translate %instance-xadd)
- (:variant instance-slots-offset instance-pointer-lowtag)
- (:arg-types instance (:constant index) tagged-num))
\f
;;;; code object frobbing
+++ /dev/null
-;;;; -*- Lisp -*-
-
-;;;; This software is part of the SBCL system. See the README file for
-;;;; more information.
-;;;;
-;;;; This software is derived from the CMU CL system, which was
-;;;; written at Carnegie Mellon University and released into the
-;;;; public domain. The software is in the public domain and is
-;;;; provided with absolutely no warranty. See the COPYING and CREDITS
-;;;; files for more information.
-
-;;; This is a linear ordering of system sources which works both to
-;;; compile/load the cross-compiler under the host Common Lisp and to
-;;; cross-compile the compiler into the under-construction target
-;;; Common Lisp.
-;;;
-;;; Of course, it'd be very nice to have this be a dependency DAG
-;;; instead, so that we could do automated incremental recompilation.
-;;; But the dependencies are varied and subtle, and it'd be extremely
-;;; difficult to extract them automatically, and it'd be extremely
-;;; tedious and error-prone to extract them manually, so we don't
-;;; extract them. (It would be nice to fix this someday. The most
-;;; feasible approach that I can think of would be to make the
-;;; dependencies work on a package level, not an individual file
-;;; level. Doing it at the package level would make the granularity
-;;; coarse enough that it would probably be pretty easy to maintain
-;;; the dependency information manually, and the brittleness of the
-;;; package system would help make most violations of the declared
-;;; dependencies obvious at build time. -- WHN 20000803
-(
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; miscellaneous
-
- ;; This comes early because it's useful for debugging everywhere.
- ("src/code/show")
-
- ;; This comes early because the cross-compilation host's backquote logic
- ;; expand into something which can't be executed on the target Lisp (e.g.
- ;; in CMU CL where it expands into internal functions like BACKQ-LIST), and
- ;; by replacing the host backquote logic with our own as early as possible,
- ;; we minimize the chance of any forms referring to host Lisp internal
- ;; functions leaking into target Lisp code.
- ("src/code/backq")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; various DEFSETFs and/or other DEFMACROish things, defined as early as
- ;; possible so we don't need to fiddle with any subtleties of defining them
- ;; before any possible use
-
- ;; KLUDGE: It would be nice to reimplement most or all of these as
- ;; functions (possibly inlined functions) so that we wouldn't need to
- ;; worry so much about forcing them all to be defined before any possible
- ;; use. It might be pretty tedious, though, working through any
- ;; transforms and translators and optimizers and so forth to make sure
- ;; that they can handle the change. -- WHN 19990919
- ("src/code/defsetfs")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; cross-compiler-only replacements for stuff which in target Lisp would be
- ;;; supplied by basic machinery
-
- ("src/code/cross-misc" :not-target)
- ("src/code/cross-float" :not-target)
- ("src/code/cross-io" :not-target)
- ("src/code/cross-sap" :not-target)
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; stuff needed early both in cross-compilation host and in target Lisp
-
- ("src/code/uncross")
- ("src/code/early-defbangmethod")
-
- ("src/code/defbangtype")
- ("src/code/defbangmacro")
-
- ("src/code/primordial-extensions")
-
- ;; for various constants e.g. SB!VM:*TARGET-MOST-POSITIVE-FIXNUM* and
- ;; SB!VM:N-LOWTAG-BITS, needed by "early-objdef" and others
- ("src/compiler/generic/early-vm")
- ("src/compiler/generic/early-objdef")
- ("src/compiler/target/parms")
- ("src/code/early-array") ; needs "early-vm" numbers
-
- ("src/code/parse-body") ; on host for PARSE-BODY
- ("src/code/parse-defmacro") ; on host for PARSE-DEFMACRO
- ("src/code/early-extensions") ; on host for COLLECT, SYMBOLICATE, etc.
- ("src/compiler/deftype") ; on host for SB!XC:DEFTYPE
- ("src/code/early-alieneval") ; for vars needed both at build and run time
-
- ("src/code/specializable-array")
-
- ("src/code/early-cl")
- ("src/code/early-fasl")
-
- ;; mostly needed by stuff from comcom, but also used by "x86-vm"
- ("src/code/debug-var-io")
-
- ("src/code/cold-init-helper-macros")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; basic machinery for the target Lisp. Note that although most of these
- ;;; files are flagged :NOT-HOST, a few might not be.
-
- ("src/code/target-defbangmethod" :not-host)
-
- ("src/code/early-print" :not-host)
- ("src/code/early-pprint" :not-host)
- ("src/code/early-impl" :not-host)
-
- ("src/code/target-extensions" :not-host)
-
- ("src/code/early-defstructs" :not-host) ; gotta-be-first DEFSTRUCTs
-
- ("src/code/defbangstruct")
-
- ("src/code/funutils" :not-host)
-
- ;; This needs DEF!STRUCT, and is itself needed early so that structure
- ;; accessors and inline functions defined here can be compiled inline
- ;; later. (Avoiding full calls not only increases efficiency, but also
- ;; avoids some cold init issues involving full calls to structure
- ;; accessors.)
- ("src/code/type-class")
-
- ("src/code/pcounter" :not-host)
-
- ("src/code/ansi-stream" :not-host)
-
- ("src/code/sysmacs" :not-host)
-
- ;; "assembly/assemfile" was here in the sequence inherited from
- ;; CMU CL worldcom.lisp, but also appears later in the sequence
- ;; inherited from CMU CL comcom.lisp. We shouldn't need two versions,
- ;; so I've deleted the one here. -- WHN 19990620
-
- ("src/code/target-error" :not-host)
-
- ;; a comment from classic CMU CL:
- ;; "These guys can supposedly come in any order, but not really.
- ;; Some are put at the end so that macros don't run interpreted
- ;; and stuff."
- ;; Dunno exactly what this meant or whether it still holds. -- WHN 19990803
- ;; FIXME: more informative and up-to-date comment?
- ("src/code/globals" :not-host)
- ("src/code/kernel" :not-host)
- ("src/code/toplevel" :not-host)
- ("src/code/cold-error" :not-host)
- ("src/code/fdefinition" :not-host)
- ;; FIXME: Figure out some way to make the compiler macro for INFO
- ;; available for compilation of "code/fdefinition".
-
- ;; In classic CMU CL, code/type was here. I've since split that into
- ;; lots of smaller pieces, some of which are here and some of which
- ;; are handled later in the sequence, when the cross-compiler is
- ;; built. -- WHN 19990620
- ("src/code/target-type" :not-host)
-
- ("src/code/pred" :not-host)
-
- ("src/code/target-alieneval" :not-host)
- ("src/code/target-c-call" :not-host)
- ("src/code/target-allocate" :not-host)
-
- ;; This needs DEF-ALIEN-ROUTINE from target-alieneval.
- ("src/code/misc-aliens" :not-host)
-
- ("src/code/array" :not-host)
- ("src/code/target-sxhash" :not-host)
-
- ("src/code/list" :not-host)
- ("src/code/seq" :not-host) ; "code/seq" should come after "code/list".
- ("src/code/coerce" :not-host)
-
- ("src/code/string" :not-host)
- ("src/code/mipsstrops" :not-host)
-
- ;; "src/code/unix.lisp" needs this. It's generated automatically by
- ;; grovel_headers.c, i.e. it's not in CVS.
- ("output/stuff-groveled-from-headers" :not-host)
-
- ("src/code/unix" :not-host)
-
- #!+mach ("src/code/mach" :not-host)
- #!+mach ("src/code/mach-os" :not-host)
- #!+sunos ("src/code/sunos-os" :not-host)
- #!+hpux ("src/code/hpux-os" :not-host)
- #!+osf1 ("src/code/osf1-os" :not-host)
- #!+irix ("src/code/irix-os" :not-host)
- #!+bsd ("src/code/bsd-os" :not-host)
- #!+linux ("src/code/linux-os" :not-host)
-
- ;; KLUDGE: I'd prefer to have this done with a "code/target" softlink
- ;; instead of a bunch of reader macros. -- WHN 19990308
- #!+pmax ("src/code/pmax-vm" :not-host)
- #!+(and sparc svr4) ("src/code/sparc-svr4-vm" :not-host)
- #!+(and sparc (not svr4)) ("src/code/sparc-vm" :not-host)
- #!+rt ("src/code/rt-vm" :not-host)
- #!+hppa ("src/code/hppa-vm" :not-host)
- #!+x86 ("src/code/x86-vm" :not-host)
- #!+alpha ("src/code/alpha-vm" :not-host)
- #!+sgi ("src/code/sgi-vm" :not-host)
-
- ("src/code/target-signal" :not-host) ; needs OS-CONTEXT-T from x86-vm
-
- ("src/code/symbol" :not-host)
- ("src/code/bignum" :not-host)
- ("src/code/numbers" :not-host)
- ("src/code/float-trap" :not-host)
- ("src/code/float" :not-host)
- ("src/code/irrat" :not-host)
-
- ("src/code/char")
- ("src/code/target-char" :not-host)
- ("src/code/target-misc" :not-host)
- ("src/code/misc")
-
- ("src/code/room" :not-host)
- ("src/code/gc" :not-host)
- ("src/code/purify" :not-host)
-
- ("src/code/stream" :not-host)
- ("src/code/print" :not-host)
- ("src/code/pprint" :not-host)
- ("src/code/early-format")
- ("src/code/target-format" :not-host)
- ("src/code/defpackage" :not-host)
- ("src/code/pp-backq" :not-host)
-
- ("src/code/error-error" :not-host) ; needs WITH-STANDARD-IO-SYNTAX macro
-
- ("src/code/serve-event" :not-host)
- ("src/code/fd-stream" :not-host)
-
- ("src/code/module" :not-host)
-
- ("src/code/interr" :not-host)
-
- ("src/code/query" :not-host)
-
- ("src/code/sort" :not-host)
- ("src/code/time" :not-host)
- ("src/code/weak" :not-host)
- ("src/code/final" :not-host)
-
- #!+mp ("src/code/multi-proc" :not-host)
-
- ("src/code/setf-funs" :not-host)
-
- ("src/code/stubs" :not-host)
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;; compiler (and a few miscellaneous files whose dependencies make it
- ;;; convenient to stick them here)
-
- ("src/compiler/early-c")
- ("src/compiler/policy")
- ("src/code/typedefs")
-
- ;; ("src/code/defbangmacro" was here until sbcl-0.6.7.3.)
-
- ("src/compiler/macros")
- ("src/compiler/generic/vm-macs")
-
- ;; needed by "compiler/vop"
- ("src/compiler/sset")
-
- ;; for e.g. BLOCK-ANNOTATION, needed by "compiler/vop"
- ("src/compiler/node")
-
- ;; for e.g. PRIMITIVE-TYPE, needed by "vmdef"
- ("src/compiler/vop")
-
- ;; needed by "vm" and "primtype"
- ("src/compiler/backend")
-
- ;; for e.g. MAX-VOP-TN-REFS, needed by "meta-vmdef"
- ("src/compiler/vmdef")
-
- ;; needs "backend"
- ("src/compiler/target/backend-parms")
-
- ;; for INFO and SB!XC:MACRO-FUNCTION, needed by defmacro.lisp
- ("src/compiler/globaldb")
- ("src/compiler/info-functions")
-
- ("src/code/defmacro")
- ("src/code/force-delayed-defbangmacros")
-
- ("src/compiler/late-macros")
-
- ;; for e.g. !DEF-PRIMITIVE-TYPE, needed by primtype.lisp, and
- ;; DEFINE-STORAGE-CLASS, needed by target/vm.lisp
- ("src/compiler/meta-vmdef")
-
- ;; for e.g. DESCRIPTOR-REG, needed by primtype.lisp
- ("src/compiler/target/vm")
-
- ;; for e.g. SPECIFIER-TYPE, needed by primtype.lisp
- ("src/code/early-type")
-
- ;; FIXME: Classic CMU CL had SAFETY 2 DEBUG 2 set around the compilation
- ;; of "code/class". Why?
- ("src/code/class")
-
- ;; The definition of CONDITION-CLASS depends on SLOT-CLASS, defined
- ;; in class.lisp.
- ("src/code/condition" :not-host)
-
- ("src/compiler/generic/primtype")
-
- ;; the implementation of the compiler-affecting part of forms like
- ;; DEFMACRO and DEFTYPE; must be loaded before we can start
- ;; defining types
- ("src/compiler/parse-lambda-list")
-
- ;; for DEFSTRUCT ALIEN-TYPE, needed by host-type.lisp
- ("src/code/host-alieneval")
-
- ;; can't be done until definition of e.g. DEF-ALIEN-TYPE-CLASS in
- ;; host-alieneval.lisp
- ("src/code/host-c-call")
-
- ;; SB!XC:DEFTYPE is needed in order to compile late-type
- ;; in the host Common Lisp, and in order to run, it needs
- ;; %COMPILER-DEFTYPE.
- ("src/compiler/compiler-deftype")
-
- ;; These appear here in the build sequence because they require
- ;; * the macro INFO, defined in globaldb.lisp, and
- ;; * the function PARSE-DEFMACRO, defined in parse-defmacro.lisp,
- ;; and because they define
- ;; * the function SPECIFIER-TYPE, which is used in fndb.lisp.
- ("src/code/late-type")
- ("src/code/deftypes-for-target")
-
- ;; defines IR1-ATTRIBUTES macro, needed by proclaim.lisp
- ("src/compiler/knownfun")
-
- ;; stuff needed by "code/defstruct"
- ("src/code/cross-type" :not-target)
- ("src/compiler/generic/vm-type")
- ("src/compiler/proclaim")
- ("src/code/typecheckfuns")
-
- ;; The DEFSTRUCT machinery needs SB!XC:SUBTYPEP, defined in
- ;; "code/late-type", and SB!XC:TYPEP, defined in "code/cross-type",
- ;; and SPECIALIZE-ARRAY-TYPE, defined in "compiler/generic/vm-type",
- ;; and SB!XC:PROCLAIM, defined in "src/compiler/proclaim"
- ("src/code/defstruct")
- ("src/code/target-defstruct" :not-host)
-
- ;; ALIEN-VALUE has to be defined as a class (done by DEFSTRUCT
- ;; machinery) before we can set its superclasses here.
- ("src/code/alien-type")
-
- ;; This needs not just the SB!XC:DEFSTRUCT machinery, but also
- ;; the TYPE= stuff defined in late-type.lisp, and the
- ;; CHECK-FUN-NAME defined in proclaim.lisp.
- ("src/code/force-delayed-defbangstructs")
-
- ("src/code/typep" :not-host)
-
- ("src/compiler/compiler-error")
-
- ("src/code/type-init")
-
- ;; These define target types needed by fndb.lisp.
- ("src/code/package")
- ("src/code/random")
- ("src/code/hash-table")
- ("src/code/readtable")
- ("src/code/pathname")
- ("src/compiler/lexenv")
-
- ;; KLUDGE: Much stuff above here is the type system and/or the INFO
- ;; system, not really the compiler proper. It might be easier to
- ;; understand the system if those things were split off into packages
- ;; SB-TYPE and SB-INFO and built in their own sections. -- WHN 20000124
-
- ;; In classic CMU CL (re)build order, these were done later, but
- ;; in building from scratch, these must be loaded before
- ;; "compiler/generic/objdef" in order to allow forms like
- ;; (DEFINE-PRIMITIVE-OBJECT (..) (CAR ..) ..) to work.
- ("src/compiler/fndb")
- ("src/compiler/generic/vm-fndb")
-
- ("src/compiler/generic/objdef")
-
- ("src/compiler/generic/interr")
-
- ("src/compiler/bit-util")
-
- ;; This has ASSEMBLY-UNIT-related stuff needed by core.lisp.
- ("src/compiler/early-assem")
-
- ;; core.lisp contains DEFSTRUCT CORE-OBJECT, and "compiler/main.lisp"
- ;; does lots of (TYPEP FOO 'CORE-OBJECT), so it's nice to compile this
- ;; before "compiler/main.lisp" so that those can be coded efficiently
- ;; (and so that they don't cause lots of annoying compiler warnings
- ;; about undefined types).
- ("src/compiler/generic/core")
-
- ("src/code/load")
-
- ("src/code/fop") ; needs macros from code/load.lisp
-
- ("src/compiler/ctype")
- ("src/compiler/disassem")
- ("src/compiler/assem")
-
- ("src/compiler/trace-table") ; needs EMIT-LABEL macro from compiler/assem.lisp
-
- ;; Compiling this requires fop definitions from code/fop.lisp and
- ;; trace table definitions from compiler/trace-table.lisp.
- ("src/compiler/dump"
- ;; FIXME: When building sbcl-0.pre7.14.flaky4.5 under sbcl-0.6.12.1
- ;; with :SB-SHOW on the target *FEATURES* list, cross-compilation of
- ;; this file gives a WARNING in HEXSTR,
- ;; Lisp error during constant folding:
- ;; Argument X is not a REAL: NIL
- ;; This seems to come from DEF!MACRO %WITH-ARRAY-DATA-MACRO code
- ;; which looks like
- ;; (cond (,end
- ;; (unless (or ,unsafe? (<= ,end ,size))
- ;; ..))
- ;; ..)
- ;; where the system is trying to constant-fold the <= form when the
- ;; ,END binding is known to be NIL at compile time. Since the <= form
- ;; is unreachable in that case, this shouldn't be signalling a WARNING;
- ;; but as long as it is, we have to ignore it in order to go on.
- :ignore-failure-p)
-
- ("src/compiler/main") ; needs DEFSTRUCT FASL-OUTPUT from dump.lisp
- ("src/compiler/target-main" :not-host)
- ("src/compiler/ir1tran")
- ("src/compiler/ir1-translators")
- ("src/compiler/ir1util")
- ("src/compiler/ir1report")
- ("src/compiler/ir1opt")
-
- ;; Compiling this file requires the macros SB!ASSEM:EMIT-LABEL and
- ;; SB!ASSEM:EMIT-POST-IT, defined in assem.lisp.
- ("src/compiler/late-vmdef")
-
- ("src/compiler/ir1final")
- ("src/compiler/array-tran")
- ("src/compiler/seqtran")
- ("src/compiler/typetran")
- ("src/compiler/generic/vm-typetran")
- ("src/compiler/float-tran")
- ("src/compiler/saptran")
- ("src/compiler/srctran")
- ("src/compiler/locall")
- ("src/compiler/dfo")
- ("src/compiler/checkgen")
- ("src/compiler/constraint")
- ("src/compiler/physenvanal")
-
- ("src/compiler/tn")
- ("src/compiler/life")
-
- ("src/code/debug-info")
-
- ("src/compiler/debug-dump")
- ("src/compiler/generic/utils")
- ("src/assembly/assemfile")
-
- ("src/compiler/fixup") ; for DEFSTRUCT FIXUP, used by insts.lisp
-
- ("src/compiler/target/insts")
- ("src/compiler/target/macros")
-
- ("src/assembly/target/support")
-
- ("src/compiler/target/move")
- ("src/compiler/target/float")
- ("src/compiler/target/sap")
- ("src/compiler/target/system")
- ("src/compiler/target/char")
- ("src/compiler/target/memory")
- ("src/compiler/target/static-fn")
- ("src/compiler/target/arith")
- ("src/compiler/target/subprim")
-
- ("src/compiler/target/debug")
- ("src/compiler/target/c-call")
- ("src/compiler/target/cell")
- ("src/compiler/target/values")
- ("src/compiler/target/alloc")
- ("src/compiler/target/call")
- ("src/compiler/target/nlx")
- ("src/compiler/target/show")
- ("src/compiler/target/array"
- ;; KLUDGE: Compiling this file raises alarming warnings of the form
- ;; Argument FOO to VOP CHECK-BOUND has SC restriction
- ;; DESCRIPTOR-REG which is not allowed by the operand type:
- ;; (:OR POSITIVE-FIXNUM)
- ;; This seems not to be something that I broke, but rather a "feature"
- ;; inherited from classic CMU CL. (Debian cmucl_2.4.8.deb compiling
- ;; Debian cmucl_2.4.8.tar.gz raises the same warning). Thus, even though
- ;; these warnings are severe enough that they would ordinarily abort
- ;; compilation, for now we blithely ignore them and press on to more
- ;; pressing problems. Someday, though, it would be nice to figure out
- ;; what the problem is and fix it.. -- WHN 19990323
- :ignore-failure-p)
- ("src/compiler/target/pred")
- ("src/compiler/target/type-vops")
-
- ("src/assembly/target/assem-rtns" :assem)
- ("src/assembly/target/array" :assem)
- ("src/assembly/target/arith" :assem)
- ("src/assembly/target/alloc" :assem)
-
- ("src/compiler/pseudo-vops")
-
- ("src/compiler/aliencomp")
-
- ("src/compiler/ltv")
- ("src/compiler/gtn")
- ("src/compiler/ltn")
- ("src/compiler/stack")
- ("src/compiler/control")
- ("src/compiler/entry")
- ("src/compiler/ir2tran")
-
- ("src/compiler/generic/vm-ir2tran")
-
- ("src/compiler/copyprop")
- ("src/compiler/represent")
- ("src/compiler/generic/vm-tran")
- ("src/compiler/pack")
- ("src/compiler/codegen")
- ("src/compiler/debug")
-
- #!+sb-dyncount ("src/compiler/dyncount")
- #!+sb-dyncount ("src/code/dyncount")
-
- ;; needed by OPEN-FASL-OUTPUT, which is called by COMPILE-FILE
- ("src/code/format-time")
-
- ;; needed by various unhappy-path cases in the cross-compiler
- ("src/code/error")
-
- ;; This wasn't in classic CMU CL "comcom.lisp", but it has some stuff
- ;; that Python-as-cross-compiler has turned out to need.
- ("src/code/macroexpand")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; files which depend in some way (directly or indirectly) on stuff
- ;; compiled as part of the compiler
-
- ("src/code/late-extensions") ; needs condition system
- ("src/compiler/generic/target-core" :not-host) ; uses stuff from
- ; "compiler/generic/core"
-
- ("src/code/eval" :not-host) ; uses INFO, wants compiler macro
- ("src/code/target-sap" :not-host) ; uses SAP-INT-TYPE
- ("src/code/target-package" :not-host) ; needs "code/package"
- ("src/code/target-random" :not-host) ; needs "code/random"
- ("src/code/target-hash-table" :not-host) ; needs "code/hash-table"
- ("src/code/reader" :not-host) ; needs "code/readtable"
- ("src/code/target-pathname" :not-host) ; needs "code/pathname"
- ("src/code/filesys" :not-host) ; needs HOST from "code/pathname"
- ("src/code/save" :not-host) ; uses the definition of PATHNAME
- ; from "code/pathname"
- ("src/code/sharpm" :not-host) ; uses stuff from "code/reader"
-
- ;; defines SB!DI:DO-DEBUG-FUN-BLOCKS, needed by target-disassem.lisp
- ("src/code/debug-int" :not-host)
-
- ;; target-only assemblerish stuff
- ("src/compiler/target-disassem" :not-host)
- ("src/compiler/target/target-insts" :not-host)
-
- ("src/code/debug" :not-host)
-
- ;; The code here can't be compiled until CONDITION and
- ;; DEFINE-CONDITION are defined and SB!DEBUG:*STACK-TOP-HINT* is
- ;; declared special.
- ("src/code/parse-defmacro-errors")
-
- ("src/code/bit-bash" :not-host) ; needs %NEGATE from assembly/target/arith
-
- ("src/code/target-load" :not-host) ; needs specials from code/load.lisp
-
- ;; FIXME: Does this really need stuff from compiler/dump.lisp?
- ("src/compiler/target-dump" :not-host) ; needs stuff from compiler/dump.lisp
-
- ("src/code/cold-init" :not-host ; needs (SETF EXTERN-ALIEN) macroexpansion
- ;; FIXME: When building sbcl-0.pre7.14.flaky4.5 under sbcl-0.6.12.1
- ;; with :SB-SHOW on the target *FEATURES* list, cross-compilation of
- ;; this file gives a WARNING in HEXSTR,
- ;; Lisp error during constant folding:
- ;; Argument X is not a REAL: NIL
- ;; This seems to come from DEF!MACRO %WITH-ARRAY-DATA-MACRO code
- ;; which looks like
- ;; (cond (,end
- ;; (unless (or ,unsafe? (<= ,end ,size))
- ;; ..))
- ;; ..)
- ;; where the system is trying to constant-fold the <= form when the
- ;; ,END binding is known to be NIL at compile time. Since the <= form
- ;; is unreachable in that case, this shouldn't be signalling a WARNING;
- ;; but as long as it is, we have to ignore it in order to go on.
- :ignore-failure-p)
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; target macros and DECLAIMs installed at build-the-cross-compiler time
-
- ;; Declare all target special variables defined by ANSI now, so that
- ;; we don't have to worry about any of them being bound incorrectly
- ;; when the compiler processes code which appears before the appropriate
- ;; DEFVAR or DEFPARAMETER.
- ("src/code/cl-specials")
-
- ;; fundamental target macros (e.g. CL:DO and CL:DEFUN) and support
- ;; for them
- ("src/code/defboot")
- ("src/code/destructuring-bind")
- ("src/code/early-setf")
- ("src/code/macros")
- ("src/code/loop")
- ("src/code/late-setf")
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ;; other target-code-building stuff which can't be processed until
- ;; machinery like SB!XC:DEFMACRO exists
-
- ("src/code/late-format") ; needs SB!XC:DEFMACRO
- ("src/code/sxhash") ; needs SB!XC:DEFINE-MODIFY-MACRO
- ("src/code/signal")
- ("src/code/late-defbangmethod"))