0.7.8.45:
[sbcl.git] / src / code / dyncount.lisp
index 16ad8bc..76a0399 100644 (file)
@@ -100,7 +100,7 @@ comments from CMU CL:
            (:constructor %make-vop-stats (name))
            (:constructor make-vop-stats-key)
            (:copier nil))
-  (name (required-argument) :type simple-string)
+  (name (missing-arg) :type simple-string)
   (data (make-array 2 :element-type 'double-float) :type count-vector))
 
 (defmacro vop-stats-count (x) `(aref (vop-stats-data ,x) 0))
@@ -172,10 +172,10 @@ comments from CMU CL:
     (without-gcing
       (dolist (space spaces)
        (sb!vm::map-allocated-objects
-        #'(lambda (object type-code size)
-            (declare (ignore type-code size))
-            (when (dyncount-info-p object)
-              (clear-dyncount-info object)))
+        (lambda (object type-code size)
+          (declare (ignore type-code size))
+          (when (dyncount-info-p object)
+            (clear-dyncount-info object)))
         space)))))
 
 ;;; Call NOTE-DYNCOUNT-INFO on all DYNCOUNT-INFO structure allocated in the
@@ -186,19 +186,19 @@ comments from CMU CL:
   #!+sb-doc
   "Return a hash-table mapping string VOP names to VOP-STATS structures
    describing the VOPs executed. If clear is true, then reset all counts to
-   zero as a side-effect."
+   zero as a side effect."
   (locally
       (declare (optimize (speed 3) (safety 0))
               (inline sb!vm::map-allocated-objects))
     (without-gcing
       (dolist (space spaces)
        (sb!vm::map-allocated-objects
-        #'(lambda (object type-code size)
-            (declare (ignore type-code size))
-            (when (dyncount-info-p object)
-              (note-dyncount-info object)
-              (when clear
-                (clear-dyncount-info object))))
+        (lambda (object type-code size)
+          (declare (ignore type-code size))
+          (when (dyncount-info-p object)
+            (note-dyncount-info object)
+            (when clear
+              (clear-dyncount-info object))))
         space))))
 
   (let ((counts (make-hash-table :test 'equal)))
@@ -214,8 +214,8 @@ comments from CMU CL:
 ;;; Return the DYNCOUNT-INFO for FUNCTION.
 (defun find-info-for (function)
   (declare (type function function))
-  (let* ((function (%primitive closure-function function))
-        (component (sb!di::function-code-header function)))
+  (let* ((function (%primitive closure-fun function))
+        (component (sb!di::fun-code-header function)))
     (do ((end (get-header-data component))
         (i sb!vm:code-constants-offset (1+ i)))
        ((= end i))
@@ -232,8 +232,8 @@ comments from CMU CL:
   (clear-vop-counts spaces)
   (apply function args)
   (if by-space
-      (mapcar #'(lambda (space)
-                 (get-vop-counts (list space) :clear t))
+      (mapcar (lambda (space)
+               (get-vop-counts (list space) :clear t))
              spaces)
       (get-vop-counts spaces)))
 \f
@@ -273,7 +273,7 @@ comments from CMU CL:
     ("Simple type predicate" "STRUCTUREP" "LISTP" "FIXNUMP")
     ("Simple type check" "CHECK-LIST" "CHECK-FIXNUM" "CHECK-STRUCTURE")
     ("Array bounds check" "CHECK-BOUND")
-    ("Complex type check" "$CHECK-" "COERCE-TO-FUNCTION")
+    ("Complex type check" "$CHECK-" "COERCE-TO-FUN")
     ("Special read" "SYMBOL-VALUE")
     ("Special bind" "BIND$")
     ("Tagging" "MOVE-FROM")
@@ -286,7 +286,7 @@ comments from CMU CL:
     ("List/string utility" "LENGTH/LIST" "SXHASH" "BIT-BASH" "$LENGTH$")
     ("Alien operations" "SAP" "ALLOC-NUMBER-STACK" "$CALL-OUT$")
     ("Function call/return" "CALL" "RETURN" "ALLOCATE-FRAME"
-     "COPY-MORE-ARG" "LISTIFY-REST-ARG" "VERIFY-ARGUMENT-COUNT")
+     "COPY-MORE-ARG" "LISTIFY-REST-ARG" "VERIFY-ARG-COUNT")
     ("Allocation" "MAKE-" "ALLOC" "$CONS$" "$LIST$" "$LIST*$")
     ("Float conversion" "%SINGLE-FLOAT" "%DOUBLE-FLOAT" "-BITS$")
     ("Complex type predicate" "P$")))
@@ -403,10 +403,10 @@ comments from CMU CL:
 
 (defun sort-result (table by)
   (sort (hash-list table) #'>
-       :key #'(lambda (x)
-                (abs (ecase by
-                       (:count (vop-stats-count x))
-                       (:cost (vop-stats-cost x)))))))
+       :key (lambda (x)
+              (abs (ecase by
+                     (:count (vop-stats-count x))
+                     (:cost (vop-stats-cost x)))))))
 
 ;;; Report about VOPs in the list of stats structures.
 (defun entry-report (entries cut-off compensated compare total-cost)
@@ -430,7 +430,7 @@ comments from CMU CL:
                     cost)
                 total-cost))
       (when (zerop (decf counter))
-       (format t "[End of top ~D]~%" cut-off))))))
+       (format t "[End of top ~W]~%" cut-off))))))
 
 ;;; Divide SORTED into two lists, the first CUT-OFF elements long. Any VOP
 ;;; names that match one of the report strings are moved into the REPORT list
@@ -532,7 +532,6 @@ comments from CMU CL:
         (compared (if compare
                       (compare-stats compensated compare)
                       compensated))
-        (*gc-verbose* nil)
         (*gc-notify-stream* nil))
     (multiple-value-bind (total-count total-cost) (cost-summary compensated)
       (multiple-value-bind (compare-total-count compare-total-cost)