0.6.10.13:
[sbcl.git] / src / code / profile.lisp
index 6efe9b7..dbb9603 100644 (file)
 ;;; CLEAR-STATS-FUN clears the statistics.
 ;;;
 ;;; (The reason for implementing this as coupled closures, with the
-;;; counts built into the lexical environment, is that we hopes this
+;;; counts built into the lexical environment, is that we hope this
 ;;; will minimize profiling overhead.)
 (defun profile-encapsulation-lambdas (encapsulated-fun)
   (declare (type function encapsulated-fun))
 \f
 ;;; interfaces
 
-;;; A symbol names a function, a string names all the functions named
-;;; by symbols in the named package.
+;;; A symbol or (SETF FOO) list names a function, a string names all
+;;; the functions named by symbols in the named package.
 (defun mapc-on-named-functions (function names)
   (dolist (name names)
     (etypecase name
       (symbol (funcall function name))
+      (list
+       ;; We call this just for the side effect of checking that
+       ;; NAME is a legal function name:
+       (function-name-block-name name)
+       ;; Then we map onto it.
+       (funcall function name))
       (string (let ((package (find-undeleted-package-or-lose name)))
                (do-symbols (symbol package)
                  (when (eq (symbol-package symbol) package)
               (warn "preserving current definition of redefined function ~S"
                     name)))
          (t
-          (warn "~S is not a profiled function."))))
+          (warn "~S is not a profiled function." name))))
   (values))
 
 (defmacro profile (&rest names)