0.8.4.30:
[sbcl.git] / src / pcl / braid.lisp
index ed010f8..9e65da9 100644 (file)
                   class)
              (dolist (slot slots)
                (unless (eq (getf slot :allocation :instance) :instance)
-                 (error "Slot allocation ~S is not supported in bootstrap.")))
+                 (error "Slot allocation ~S is not supported in bootstrap."
+                        (getf slot :allocation))))
 
              (when (typep wrapper 'wrapper)
                (setf (wrapper-instance-slots-layout wrapper)
     (set-slot 'wrapper wrapper)
     (set-slot 'predicate-name (or (cadr (assoc name *early-class-predicates*))
                                  (make-class-predicate-name name)))
+    (set-slot 'documentation nil)
     (set-slot 'plist
              `(,@(and direct-default-initargs
                       `(direct-default-initargs ,direct-default-initargs))
                        (list class-name)
                        (list class-name)
                        "automatically generated boundp method")))
-    (let ((gf (ensure-generic-function accessor-name)))
+    (let ((gf (ensure-generic-function accessor-name
+                                      :lambda-list arglist)))
       (if (find specls (early-gf-methods gf)
                :key #'early-method-specializers
                :test 'equal)
 (pushnew 'maybe-reinitialize-structure-class sb-kernel::*defstruct-hooks*)
 \f
 (defun make-class-predicate (class name)
-  (let* ((gf (ensure-generic-function name))
+  (let* ((gf (ensure-generic-function name :lambda-list '(object)))
         (mlist (if (eq *boot-state* 'complete)
                    (generic-function-methods gf)
                    (early-gf-methods gf))))
 (setq *boot-state* 'braid)
 
 (defmethod no-applicable-method (generic-function &rest args)
-  (error "~@<There is no matching method for the generic function ~2I~_~S~
+  (error "~@<There is no applicable method for the generic function ~2I~_~S~
          ~I~_when called with arguments ~2I~_~S.~:>"
         generic-function
         args))
          ~I~_when called with arguments ~2I~_~S.~:>"
         generic-function
         args))
+
+(defmethod invalid-qualifiers ((gf generic-function)
+                              combin
+                              method)
+  (let ((qualifiers (method-qualifiers method)))
+    (let ((why (cond
+                ((cdr qualifiers) "has too many qualifiers")
+                (t (aver (not (member (car qualifiers)
+                                      '(:around :before :after))))
+                   "has an invalid qualifier"))))
+      (invalid-method-error
+       method
+       "The method ~S on ~S ~A.~%~
+        Standard method combination requires all methods to have one~%~
+        of the single qualifiers :AROUND, :BEFORE and :AFTER or to~%~
+        have no qualifier at all."
+       method gf why))))