;;;; for !COLD-INIT to be called at cold load time. !COLD-INIT is
;;;; responsible for explicitly initializing anything which has to be
;;;; initialized early before it transfers control to the ordinary
-;;;; top-level forms.
+;;;; top level forms.
;;;;
;;;; (In CMU CL, and in SBCL as of 0.6.9 anyway, functions not defined
;;;; by DEFUN aren't set up specially by GENESIS. In particular,
(defstruct (gspace (:constructor %make-gspace)
(:copier nil))
;; name and identifier for this GSPACE
- (name (required-argument) :type symbol :read-only t)
- (identifier (required-argument) :type fixnum :read-only t)
+ (name (missing-arg) :type symbol :read-only t)
+ (identifier (missing-arg) :type fixnum :read-only t)
;; the word address where the data will be loaded
- (word-address (required-argument) :type unsigned-byte :read-only t)
+ (word-address (missing-arg) :type unsigned-byte :read-only t)
;; the data themselves. (Note that in CMU CL this was a pair
;; of fields SAP and WORDS-ALLOCATED, but that wasn't very portable.)
(bytes (make-array target-space-alignment :element-type '(unsigned-byte 8))
(ash (descriptor-low des)
(- 1 sb!vm:n-lowtag-bits)))))
(format stream
- "for fixnum: ~D"
+ "for fixnum: ~W"
(if (> unsigned #x1FFFFFFF)
(- unsigned #x40000000)
unsigned))))
(defun make-fixnum-descriptor (num)
(when (>= (integer-length num)
(1+ (- sb!vm:n-word-bits sb!vm:n-lowtag-bits)))
- (error "~D is too big for a fixnum." num))
+ (error "~W is too big for a fixnum." num))
(make-random-descriptor (ash num (1- sb!vm:n-lowtag-bits))))
(defun make-other-immediate-descriptor (data type)
((> index words)
(unless (zerop (integer-length remainder))
;; FIXME: Shouldn't this be a fatal error?
- (warn "~D words of ~D were written, but ~D bits were left over."
+ (warn "~W words of ~W were written, but ~W bits were left over."
words n remainder)))
(let ((word (ldb (byte sb!vm:n-word-bits 0) remainder)))
(write-wordindexed handle index
(descriptor-low *nil-descriptor*))))
(unless (= offset-wanted offset-found)
;; FIXME: should be fatal
- (warn "Offset from ~S to ~S is ~D, not ~D"
+ (warn "Offset from ~S to ~S is ~W, not ~W"
symbol
nil
offset-found
;;; intern it.
(defun finish-symbols ()
- ;; FIXME: Why use SETQ (setting symbol value) instead of just using
- ;; the function values for these things?? I.e. why do we need this
- ;; section at all? Is it because all the FDEFINITION stuff gets in
- ;; the way of reading function values and is too hairy to rely on at
- ;; cold boot? FIXME: Most of these are in *STATIC-SYMBOLS* in
- ;; parms.lisp, but %HANDLE-FUN-END-BREAKPOINT is not. Why?
- ;; Explain.
+ ;; I think the point of setting these functions into SYMBOL-VALUEs
+ ;; here, instead of using SYMBOL-FUNCTION, is that in CMU CL
+ ;; SYMBOL-FUNCTION reduces to FDEFINITION, which is a pretty
+ ;; hairy operation (involving globaldb.lisp etc.) which we don't
+ ;; want to invoke early in cold init. -- WHN 2001-12-05
+ ;;
+ ;; FIXME: So OK, that's a reasonable reason to do something weird like
+ ;; this, but this is still a weird thing to do, and we should change
+ ;; the names to highlight that something weird is going on. Perhaps
+ ;; *MAYBE-GC-FUN*, *INTERNAL-ERROR-FUN*, *HANDLE-BREAKPOINT-FUN*,
+ ;; and *HANDLE-FUN-END-BREAKPOINT-FUN*...
(macrolet ((frob (symbol)
`(cold-set ',symbol
(cold-fdefinition-object (cold-intern ',symbol)))))
(defun initialize-static-fns ()
(let ((*cold-fdefn-gspace* *static*))
- (dolist (sym sb!vm:*static-functions*)
+ (dolist (sym sb!vm:*static-funs*)
(let* ((fdefn (cold-fdefinition-object (cold-intern sym)))
(offset (- (+ (- (descriptor-low fdefn)
sb!vm:other-pointer-lowtag)
(* sb!vm:fdefn-raw-addr-slot sb!vm:n-word-bytes))
(descriptor-low *nil-descriptor*)))
- (desired (sb!vm:static-function-offset sym)))
+ (desired (sb!vm:static-fun-offset sym)))
(unless (= offset desired)
;; FIXME: should be fatal
- (warn "Offset from FDEFN ~S to ~S is ~D, not ~D."
+ (warn "Offset from FDEFN ~S to ~S is ~W, not ~W."
sym nil offset desired))))))
(defun list-all-fdefn-objects ()
(8 sb!vm:simple-array-unsigned-byte-8-widetag)
(16 sb!vm:simple-array-unsigned-byte-16-widetag)
(32 sb!vm:simple-array-unsigned-byte-32-widetag)
- (t (error "losing element size: ~D" sizebits))))
+ (t (error "losing element size: ~W" sizebits))))
(result (allocate-vector-object *dynamic* sizebits len type))
(start (+ (descriptor-byte-offset result)
(ash sb!vm:vector-data-offset sb!vm:word-shift)))
#!+sb-show
(when *show-pre-fixup-code-p*
(format *trace-output*
- "~&/raw code from code-fop ~D ~D:~%"
+ "~&/raw code from code-fop ~W ~W:~%"
nconst
code-size)
(do ((i start (+ i sb!vm:n-word-bytes)))