0.pre8.9:
[sbcl.git] / src / pcl / methods.lisp
index 8d5b2f0..06e0260 100644 (file)
                              &rest other-initargs)
   (unless (and (fboundp generic-function-name)
               (typep (fdefinition generic-function-name) 'generic-function))
-    (sb-kernel::style-warn "implicitly creating new generic function ~S"
-                          generic-function-name))
+    (style-warn "implicitly creating new generic function ~S"
+               generic-function-name))
   ;; XXX What about changing the class of the generic function if
   ;; there is one? Whose job is that, anyway? Do we need something
   ;; kind of like CLASS-FOR-REDEFINITION?
        (pushnew other-class (class-incompatible-superclass-list class))))))
 
 (defun superclasses-compatible-p (class1 class2)
-  (let ((cpl1 (class-precedence-list class1))
-       (cpl2 (class-precedence-list class2)))
+  (let ((cpl1 (cpl-or-nil class1))
+       (cpl2 (cpl-or-nil class2)))
     (dolist (sc1 cpl1 t)
       (dolist (ic (class-incompatible-superclass-list sc1))
        (when (memq ic cpl2)
                                      ((eq valuep :constant-value)
                                       (value-for-caching generic-function
                                                          classes)))))
-                    (setq cache (fill-cache cache wrappers value t))))))))
+                    (setq cache (fill-cache cache wrappers value))))))))
       (if classes-list
          (mapc #'add-class-list classes-list)
          (dolist (method (generic-function-methods generic-function))
   (cond ((eq class *the-class-t*)
         t)
        ((eq class *the-class-slot-object*)
-        `(not (cl:typep (cl:class-of ,arg) 'cl:built-in-class)))
+        `(not (typep (classoid-of ,arg)
+                     'built-in-classoid)))
        ((eq class *the-class-std-object*)
         `(or (std-instance-p ,arg) (fsc-instance-p ,arg)))
        ((eq class *the-class-standard-object*)
                        (make-fast-method-call-lambda-list metatypes applyp))))
       (multiple-value-bind (cfunction constants)
          (get-fun1 `(,(if function-p
-                          'sb-kernel:instance-lambda
+                          'instance-lambda
                           'lambda)
                      ,arglist
                      ,@(unless function-p
 ;;; the funcallable instance function of the generic function for which
 ;;; it was computed.
 ;;;
-;;; More precisely, if compute-discriminating-function is called with an
-;;; argument <gf1>, and returns a result <df1>, that result must not be
-;;; passed to apply or funcall directly. Rather, <df1> must be stored as
-;;; the funcallable instance function of the same generic function <gf1>
-;;; (using set-funcallable-instance-fun). Then the generic function
-;;; can be passed to funcall or apply.
+;;; More precisely, if compute-discriminating-function is called with
+;;; an argument <gf1>, and returns a result <df1>, that result must
+;;; not be passed to apply or funcall directly. Rather, <df1> must be
+;;; stored as the funcallable instance function of the same generic
+;;; function <gf1> (using SET-FUNCALLABLE-INSTANCE-FUNCTION). Then the
+;;; generic function can be passed to funcall or apply.
 ;;;
 ;;; An important exception is that methods on this generic function are
 ;;; permitted to return a function which itself ends up calling the value
 ;;;     (lambda (arg)
 ;;;     (cond (<some condition>
 ;;;            <store some info in the generic function>
-;;;            (set-funcallable-instance-fun
+;;;            (set-funcallable-instance-function
 ;;;              gf
 ;;;              (compute-discriminating-function gf))
 ;;;            (funcall gf arg))
 ;;;   (defmethod compute-discriminating-function ((gf my-generic-function))
 ;;;     (lambda (arg)
 ;;;     (cond (<some condition>
-;;;            (set-funcallable-instance-fun
+;;;            (set-funcallable-instance-function
 ;;;              gf
 ;;;              (lambda (a) ..))
 ;;;            (funcall gf arg))