0.pre7.110:
[sbcl.git] / src / compiler / generic / genesis.lisp
index 405ebba..0c575dc 100644 (file)
                                     (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)))))
                                   sb!vm:word-shift))))
                         (#.sb!vm:closure-header-widetag
                          (make-random-descriptor
-                          (cold-foreign-symbol-address-as-integer "closure_tramp")))))
+                          (cold-foreign-symbol-address-as-integer
+                           "closure_tramp")))))
     fdefn))
 
 (defun initialize-static-fns ()
             (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)))