0.8.6.28:
[sbcl.git] / src / code / fdefinition.lisp
index 78a574a..e4634f8 100644 (file)
@@ -83,7 +83,7 @@
                                             (type definition))
                               (:copier nil))
   ;; This is definition's encapsulation type. The encapsulated
-  ;; definition is in the previous encapsulation-info element or
+  ;; definition is in the previous ENCAPSULATION-INFO element or
   ;; installed as the global definition of some function name.
   type
   ;; the previous, encapsulated definition. This used to be installed
     ;; an encapsulation that no longer exists.
     (let ((info (make-encapsulation-info type (fdefn-fun fdefn))))
       (setf (fdefn-fun fdefn)
-           (lambda (&rest arg-list)
+           (named-lambda encapsulate (&rest arg-list)
              (declare (special arg-list))
              (let ((basic-definition (encapsulation-info-definition info)))
                (declare (special basic-definition))
 ;;; This is like FIND-IF, except that we do it on a compiled closure's
 ;;; environment.
 (defun find-if-in-closure (test fun)
+  (declare (type function test))
   (dotimes (index (1- (get-closure-length fun)))
     (let ((elt (%closure-index-ref fun index)))
       (when (funcall test elt)
 
 ;;; When removing an encapsulation, we must remember that
 ;;; encapsulating definitions close over a reference to the
-;;; encapsulation-info that describes the encapsulating definition.
+;;; ENCAPSULATION-INFO that describes the encapsulating definition.
 ;;; When you find an info with the target type, the previous info in
 ;;; the chain has the ensulating definition of that type. We take the
 ;;; encapsulated definition from the info with the target type, and we
 
 (defvar *setf-fdefinition-hook* nil
   #!+sb-doc
-  "This holds functions that (SETF FDEFINITION) invokes before storing the
-   new value. These functions take the function name and the new value.")
+  "A list of functions that (SETF FDEFINITION) invokes before storing the
+   new value. The functions take the function name and the new value.")
 
 (defun %set-fdefinition (name new-value)
   #!+sb-doc
     ;; top level forms in the kernel core startup.
     (when (boundp '*setf-fdefinition-hook*)
       (dolist (f *setf-fdefinition-hook*)
+        (declare (type function f))
        (funcall f name new-value)))
 
     (let ((encap-info (encapsulation-info (fdefn-fun fdefn))))