-*- Mode:Text -*- Keith Corbett 11/2/88 COLDLOAD-LOSSAGE.TEXT Ways to lose (things not to do) in system cold-load source files: 1. MAKING COLD-LOAD BAND: The process of making the CLD (cold-load) band is terminated by things COLD:COLD-FASLOAD won't handle. For example: - 8-bit binary format .QFASL files (could be made to work) - QFASL ops added to system but not added to SYM:FASL-OPS and SYS:COLD;COLDLD.LISP I haven't seen these lose, but according to FERRORs in COLDLD.LISP these aren't handled: - Initializing a displaced array. - Arrays other than 1- or 2-dimensional, art-16b or numeric. (But strings are OK.) - DEFUN function specs other than symbol or property; e.g., the following won't load: (DEFUN (FOO PROP) ...) {What does that mean???} - Pathnames that can't be handled as phony pathname strings. (???) 2. BUILDING THE NEW SYSTEM BAND: Both booting the CLD band and running QLD to load the inner system will terminate on anything that generates an error. The most common problems are caused by initializations that refer to things that aren't defined yet, such as DEFVARs that EVAL can't handle. These are easy to mess up. Forward references in general are a common problem. For example, references to COMPILER functions at top level in QFASL.LISP caused problems when I built system 128. QFASL is a cold-loaded file, but the compiler gets loaded much later, in the third stage, during (MAKE-SYSTEM 'SYSTEM). Remember, top-level initializations are EVAL'd in cold-load during LISP-REINITIALIZE, but before ADD-INITIALIZATIONS are done. For example: - (DEFCONST X (BYTE 3 0)) blows up during load of an INNER-SYSTEM-FILE-ALIST file - BYTE just isn't there yet. - Anything that uses SIGNAL or other error-handling. However, a crude warning function is used in place of FERROR. This version is automatically called in place of FERROR. It accepts only simple string args. For example: (ferror "Error in cold load!") - works (signal (make-condition ...)) - fails - Subtle uses of EVAL. For example, defining a make-system variable that uses CASE - when MAKE-SYSTEM gets evaluated in the cold load, it chokes because the macro CASE isn't present; and the use of CASE in MAKSYS.LISP is not macro-expanded, it's just data... --Keith 11/2/88