0.pre7.129:
[sbcl.git] / src / compiler / generic / genesis.lisp
index 0c575dc..fa0dc2f 100644 (file)
 
 (defun list-all-fdefn-objects ()
   (let ((result *nil-descriptor*))
-    (maphash #'(lambda (key value)
-                (declare (ignore key))
-                (cold-push value result))
+    (maphash (lambda (key value)
+              (declare (ignore key))
+              (cold-push value result))
             *cold-fdefn-objects*)
     result))
 \f
 ;;;; general machinery for cold-loading FASL files
 
 ;;; FOP functions for cold loading
-(defvar *cold-fop-functions*
-  ;; We start out with a copy of the ordinary *FOP-FUNCTIONS*. The
-  ;; ones which aren't appropriate for cold load will be destructively
+(defvar *cold-fop-funs*
+  ;; We start out with a copy of the ordinary *FOP-FUNS*. The ones
+  ;; which aren't appropriate for cold load will be destructively
   ;; modified.
-  (copy-seq *fop-functions*))
+  (copy-seq *fop-funs*))
 
-(defvar *normal-fop-functions*)
+(defvar *normal-fop-funs*)
 
 ;;; Cause a fop to have a special definition for cold load.
 ;;; 
 ;;; This is similar to DEFINE-FOP, but unlike DEFINE-FOP, this version
 ;;;   (1) looks up the code for this name (created by a previous
 ;;        DEFINE-FOP) instead of creating a code, and
-;;;   (2) stores its definition in the *COLD-FOP-FUNCTIONS* vector,
-;;;       instead of storing in the *FOP-FUNCTIONS* vector.
+;;;   (2) stores its definition in the *COLD-FOP-FUNS* vector,
+;;;       instead of storing in the *FOP-FUNS* vector.
 (defmacro define-cold-fop ((name &optional (pushp t)) &rest forms)
   (aver (member pushp '(nil t :nope)))
   (let ((code (get name 'fop-code))
         ,@(if (eq pushp :nope)
             forms
             `((with-fop-stack ,pushp ,@forms))))
-       (setf (svref *cold-fop-functions* ,code) #',fname))))
+       (setf (svref *cold-fop-funs* ,code) #',fname))))
 
 (defmacro clone-cold-fop ((name &optional (pushp t)) (small-name) &rest forms)
   (aver (member pushp '(nil t :nope)))
 (defun cold-load (filename)
   #!+sb-doc
   "Load the file named by FILENAME into the cold load image being built."
-  (let* ((*normal-fop-functions* *fop-functions*)
-        (*fop-functions* *cold-fop-functions*)
+  (let* ((*normal-fop-funs* *fop-funs*)
+        (*fop-funs* *cold-fop-funs*)
         (*cold-load-filename* (etypecase filename
                                 (string filename)
                                 (pathname (namestring filename)))))
 (define-cold-fop (fop-truth) (cold-intern t))
 
 (define-cold-fop (fop-normal-load :nope)
-  (setq *fop-functions* *normal-fop-functions*))
+  (setq *fop-funs* *normal-fop-funs*))
 
 (define-fop (fop-maybe-cold-load 82 :nope)
   (when *cold-load-filename*
-    (setq *fop-functions* *cold-fop-functions*)))
+    (setq *fop-funs* *cold-fop-funs*)))
 
 (define-cold-fop (fop-maybe-cold-load :nope))
 
        (code (pop-stack)))
     (write-wordindexed code slot value)))
 
-(define-cold-fop (fop-function-entry)
+(define-cold-fop (fop-fun-entry)
   (let* ((type (pop-stack))
         (arglist (pop-stack))
         (name (pop-stack))
            (maybe-record-with-translated-name '("-START" "-END") 6)))))
     (setf constants
          (sort constants
-               #'(lambda (const1 const2)
-                   (if (= (second const1) (second const2))
+               (lambda (const1 const2)
+                 (if (= (second const1) (second const2))
                      (< (third const1) (third const2))
                      (< (second const1) (second const2))))))
     (let ((prev-priority (second (car constants))))
 
   ;; writing primitive object layouts
   (let ((structs (sort (copy-list sb!vm:*primitive-objects*) #'string<
-                      :key #'(lambda (obj)
-                               (symbol-name
-                                (sb!vm:primitive-object-name obj))))))
+                      :key (lambda (obj)
+                             (symbol-name
+                              (sb!vm:primitive-object-name obj))))))
     (format t "#ifndef LANGUAGE_ASSEMBLY~2%")
     (format t "#define LISPOBJ(x) ((lispobj)x)~2%")
     (dolist (obj structs)
     ;; in #define statements.
     (format t "#define ~A LISPOBJ(0x~X)~%"
            (nsubstitute #\_ #\-
-                        (remove-if #'(lambda (char)
-                                       (member char '(#\% #\* #\. #\!)))
+                        (remove-if (lambda (char)
+                                     (member char '(#\% #\* #\. #\!)))
                                    (symbol-name symbol)))
            (if *static*                ; if we ran GENESIS
              ;; We actually ran GENESIS, use the real value.
       (format t "#X~8,'0X: ~S~%" (cdr routine) (car routine)))
     (let ((funs nil)
          (undefs nil))
-      (maphash #'(lambda (name fdefn)
-                  (let ((fun (read-wordindexed fdefn
-                                               sb!vm:fdefn-fun-slot)))
-                    (if (= (descriptor-bits fun)
-                           (descriptor-bits *nil-descriptor*))
-                        (push name undefs)
-                        (let ((addr (read-wordindexed
-                                     fdefn sb!vm:fdefn-raw-addr-slot)))
-                          (push (cons name (descriptor-bits addr))
-                                funs)))))
+      (maphash (lambda (name fdefn)
+                (let ((fun (read-wordindexed fdefn
+                                             sb!vm:fdefn-fun-slot)))
+                  (if (= (descriptor-bits fun)
+                         (descriptor-bits *nil-descriptor*))
+                      (push name undefs)
+                      (let ((addr (read-wordindexed
+                                   fdefn sb!vm:fdefn-raw-addr-slot)))
+                        (push (cons name (descriptor-bits addr))
+                              funs)))))
               *cold-fdefn-objects*)
       (format t "~%~|~%initially defined functions:~2%")
       (setf funs (sort funs #'< :key #'cdr))
@@ -2716,10 +2716,10 @@ initially undefined function references:~2%")
 
     (format t "~%~|~%layout names:~2%")
     (collect ((stuff))
-      (maphash #'(lambda (name gorp)
-                   (declare (ignore name))
-                   (stuff (cons (descriptor-bits (car gorp))
-                                (cdr gorp))))
+      (maphash (lambda (name gorp)
+                 (declare (ignore name))
+                 (stuff (cons (descriptor-bits (car gorp))
+                              (cdr gorp))))
                *cold-layouts*)
       (dolist (x (sort (stuff) #'< :key #'car))
         (apply #'format t "~8,'0X: ~S[~D]~%~10T~S~%" x))))
@@ -2738,7 +2738,7 @@ initially undefined function references:~2%")
 (defparameter validate-entry-type-code 3845)
 (defparameter directory-entry-type-code 3841)
 (defparameter new-directory-entry-type-code 3861)
-(defparameter initial-function-entry-type-code 3863)
+(defparameter initial-fun-entry-type-code 3863)
 (defparameter end-entry-type-code 3840)
 
 (declaim (ftype (function (sb!vm:word) sb!vm:word) write-long))
@@ -2838,16 +2838,16 @@ initially undefined function references:~2%")
       (output-gspace *dynamic*)
 
       ;; Write the initial function.
-      (write-long initial-function-entry-type-code)
+      (write-long initial-fun-entry-type-code)
       (write-long 3)
       (let* ((cold-name (cold-intern '!cold-init))
             (cold-fdefn (cold-fdefinition-object cold-name))
-            (initial-function (read-wordindexed cold-fdefn
-                                                sb!vm:fdefn-fun-slot)))
+            (initial-fun (read-wordindexed cold-fdefn
+                                           sb!vm:fdefn-fun-slot)))
        (format t
-               "~&/(DESCRIPTOR-BITS INITIAL-FUNCTION)=#X~X~%"
-               (descriptor-bits initial-function))
-       (write-long (descriptor-bits initial-function)))
+               "~&/(DESCRIPTOR-BITS INITIAL-FUN)=#X~X~%"
+               (descriptor-bits initial-fun))
+       (write-long (descriptor-bits initial-fun)))
 
       ;; Write the End entry.
       (write-long end-entry-type-code)