X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-fasl.lisp;h=a5b95e688b9a1d4b4c9830eea70bcd6a08060fd6;hb=095564c28a259002c7e34fd1d861f5bbd0a959b6;hp=2f63d5c506753818723f0ed2c8a313b88ae3b0da;hpb=a23903deaf6348cc088eb0f992a99cdba0a37d66;p=sbcl.git diff --git a/src/code/early-fasl.lisp b/src/code/early-fasl.lisp index 2f63d5c..a5b95e6 100644 --- a/src/code/early-fasl.lisp +++ b/src/code/early-fasl.lisp @@ -33,46 +33,84 @@ ;;; against. (defparameter *fasl-header-string-start-string* "# FASL") +(macrolet ((define-fasl-format-features () + (let (;; master value for *F-P-A-F-F* + (fpaff '(:sb-thread :sb-package-locks :sb-unicode))) + `(progn + ;; a list of *(SHEBANG-)FEATURES* flags which affect + ;; binary compatibility, i.e. which must be the same + ;; between the SBCL which compiles the code and the + ;; SBCL which executes the code + ;; + ;; This is a property of SBCL executables in the + ;; abstract, not of this particular SBCL executable, + ;; so any flag in this list may or may not be present + ;; in the *FEATURES* list of this particular build. + (defparameter *features-potentially-affecting-fasl-format* + ',fpaff) + ;; a string representing flags of *F-P-A-F-F* which + ;; are in this particular build + ;; + ;; (A list is the natural logical representation for + ;; this, but we represent it as a string because + ;; that's physically convenient for writing to and + ;; reading from fasl files, and because we don't + ;; need to do anything sophisticated with its + ;; logical structure, just test it for equality.) + (defparameter *features-affecting-fasl-format* + ,(let ((*print-pretty* nil)) + (prin1-to-string + (sort + (copy-seq + (intersection sb-cold:*shebang-features* fpaff)) + #'string< + :key #'symbol-name)))))))) + (define-fasl-format-features)) + ;;; the code for a character which terminates a fasl file header (def!constant +fasl-header-string-stop-char-code+ 255) ;;; This value should be incremented when the system changes in such a ;;; way that it will no longer work reliably with old fasl files. In -;;; practice, I (WHN) fairly often forget to increment it for CVS +;;; practice, I (WHN) have often forgotten to increment it for CVS ;;; versions which break binary compatibility. But it certainly should ;;; be incremented for release versions which break binary ;;; compatibility. -(def!constant +fasl-file-version+ 36) -;;; (record of versions before 0.7.0 deleted in 0.7.1.41) -;;; 23 = sbcl-0.7.0.1 deleted no-longer-used EVAL-STACK stuff, -;;; causing changes in *STATIC-SYMBOLS*. -;;; 24 = sbcl-0.7.1.19 changed PCL service routines which might be -;;; called from macroexpanded code -;;; 25 = sbcl-0.7.1.41 (and immediately preceding versions, actually) -;;; introduced new functions to check for control stack exhaustion -;;; 26 = sbcl-0.7.2.4 or so added :VARIABLE :MACRO-EXPANSION to INFO codes -;;; 27: (2002-04-08) added MIGHT-CONTAIN-OTHER-TYPES? slot to CTYPE -;;; 28: (2002-05-08) new convention for foreign symbols to support -;;; dynamic loading in OpenBSD -;;; 29: (2002-06-24) removed *!INITIAL-FDEFN-OBJECTS* from static symbols -;;; 30: (2002-07-26) deleted all references to %DETECT-STACK-EXHAUSTION, -;;; which was introduced in version 25, since now control stack -;;; is checked using mmap() page protection -;;; 31: (2002-08-14) changed encoding of PCL internal MAKE-INSTANCE -;;; function names so they're insensitive to whether the class name -;;; is currently external to its package -;;; 32: (2002-09-21) changes in implementation of sequence functions, -;;; causing old utility functions like COERCE-TO-SIMPLE-VECTOR to go away -;;; 33: (2002-10-02) (again) changes in implementation of sequence functions, -;;; causing old utility functions like COERCE-TO-SIMPLE-VECTOR to go away -;;; 34: (2002-10-05) changed implementation of DEFMACRO, so %%DEFMACRO -;;; was deleted -;;; 35: (2002-11-27) (incremented version before 0.7.10 release, -;;; reflecting changes from a week or more ago) changed layout of -;;; CLOS objects to support SXHASH returning values other than 42 -;;; for STANDARD-OBJECT -;;; 36: (2002-12-04) DEFSTRUCT-DESCRIPTION layout changed to accommodate -;;; correct behaviour of colliding accessors +(def!constant +fasl-file-version+ 52) +;;; (record of versions before 2003 deleted in 2003-04-26/0.pre8.107 or so) +;;; 38: (2003-01-05) changed names of internal SORT machinery +;;; 39: (2003-02-20) in 0.7.12.1 a slot was added to +;;; DEFSTRUCT-SLOT-DESCRIPTION +;;; 40: (2003-03-11) changed value of (SXHASH NIL) +;;; 41: (2003-04-26) enforced binary incompatibility between +SB-THREAD +;;; and -SB-THREAD builds +;;; 42: (2003-05-22) %NAME slot changed to NAME in +;;; DEFSTRUCT-SLOT-DESCRIPTION +;;; 43: (2003-07-18) Something could easily have changed incompatibly in +;;; recent maintenance, e.g. from (VECTOR NIL)-as-string support. +;;; (And experimental results suggest that compatibility was broken +;;; between about 0.8.1.29 and 0.8.1.39.) +;;; 44: (2003-08-25) various changes leading up to 0.8.3 +;;; what happened this month to stalate the fasls? +;;; I think I renumbered everything again +;;; simple-array-unsigned-byte-7, probably +;;; (thanks to pfdietz) +;;; 45: (2003-10-02) I (WHN) incremented the version for the 0.8.4 +;;; release because I couldn't immediately convince myself that +;;; .fasl files could never possibly ever refer to the SB-C +;;; CONTINUATION-related data types which were changed +;;; incompatibly in 0.8.3.62. +;;; 46: (2003-11-11) Tim Daly, Jr. (and Christophe Rhodes) reported +;;; .fasl incompatibility on sbcl-devel 2003-11-09. +;;; 47: (2003-11-30) Static variables were rearranged in 0.8.6.11. +;;; 48: (2004-03-01) Renumbered all the widetags to allow for more +;;; microefficiency in sbcl-0.8.8.10 +;;; 49: (2004-05-04) Changed implementation of DEFFOO macros and the +;;; functions they expand to. +;;; 50: (2004-05-20) Changed %COMPILER-DEFUN signature again. +;;; 51: (2004-07-24) Package locks (SBCL 0.8.12.7) changed signature of +;;; %DEFPACKAGE. +;;; 52: (2004-11-02) Merge of SB-UNICODE. ;;; the conventional file extension for our fasl files (declaim (type simple-string *fasl-file-type*)) @@ -84,16 +122,9 @@ ;;; Assembler routines are named by full Lisp symbols: they ;;; have packages and that sort of native Lisp stuff associated ;;; with them. We can compare them with EQ. -;;; Foreign symbols are named by Lisp STRINGs: the Lisp package -;;; system doesn't extend out to symbols in languages like C. -;;; We want to use EQUAL to compare them. -;;; *STATIC-FOREIGN-SYMBOLS* are static as opposed to "dynamic" (not -;;; as opposed to C's "extern"). The table contains symbols known at -;;; the time that the program was built, but not symbols defined -;;; in object files which have been loaded dynamically since then. -(declaim (type hash-table *assembler-routines* *static-foreign-symbols*)) +(declaim (type hash-table *assembler-routines*)) (defvar *assembler-routines* (make-hash-table :test 'eq)) -(defvar *static-foreign-symbols* (make-hash-table :test 'equal)) + ;;;; the FOP database @@ -109,9 +140,6 @@ :initial-element (lambda () (error "corrupt fasl file: losing FOP")))) -;;;; other miscellaneous loading-related stuff - - ;;;; variables (defvar *load-depth* 0 @@ -123,15 +151,4 @@ (defvar *fasl-input-stream*) (declaim (type ansi-stream *fasl-input-stream*)) -(defvar *load-print* nil - #!+sb-doc - "the default for the :PRINT argument to LOAD") -(defvar *load-verbose* nil - ;; Note that CMU CL's default for this was T, and ANSI says it's - ;; implementation-dependent. We choose NIL on the theory that it's - ;; a nicer default behavior for Unix programs. - #!+sb-doc - "the default for the :VERBOSE argument to LOAD") - (defvar *load-code-verbose* nil) -