(defgeneric compute-applicable-methods-using-classes
(generic-function classes))
-(defgeneric compute-effective-slot-definition (class dslotds))
-
(defgeneric compute-effective-slot-definition-initargs (class direct-slotds))
(defgeneric describe-object (object stream))
combin
applicable-methods))
+(defgeneric compute-effective-slot-definition (class name dslotds))
+
(defgeneric compute-slot-accessor-info (slotd type gf))
(defgeneric default-initargs (class initargs defaults))
(push (list name slot) name-dslotds-alist)))))
(mapcar (lambda (direct)
(compute-effective-slot-definition class
+ (car direct)
(nreverse (cdr direct))))
name-dslotds-alist)))
(defmethod compute-slots ((class structure-class))
(mapcan (lambda (superclass)
(mapcar (lambda (dslotd)
- (compute-effective-slot-definition class
- (list dslotd)))
+ (compute-effective-slot-definition
+ class
+ (slot-definition-name dslotd)
+ (list dslotd)))
(class-direct-slots superclass)))
(reverse (slot-value class 'class-precedence-list))))
(mapc #'initialize-internal-slot-functions eslotds)
eslotds))
-(defmethod compute-effective-slot-definition ((class slot-class) dslotds)
+(defmethod compute-effective-slot-definition ((class slot-class) name dslotds)
+ (declare (ignore name))
(let* ((initargs (compute-effective-slot-definition-initargs class dslotds))
(class (effective-slot-definition-class class initargs)))
(apply #'make-instance class initargs)))
(defvar *automethod-object* (make-instance 'automethod-object))
(assert (typep *automethod-object* 'automethod-object))
\f
+;;; COMPUTE-EFFECTIVE-SLOT-DEFINITION should take three arguments, one
+;;; of which is the name of the slot.
+(defvar *compute-effective-slot-definition-count* 0)
+(defmethod compute-effective-slot-definition :before
+ (class (name (eql 'foo)) dsds)
+ (incf *compute-effective-slot-definition-count*))
+(defclass cesd-test-class ()
+ ((foo :initarg :foo)))
+(make-instance 'cesd-test-class :foo 3)
+;;; FIXME: this assertion seems a little weak. I don't know why
+;;; COMPUTE-EFFECTIVE-SLOT-DEFINITION gets called twice in this
+;;; sequence, nor whether that's compliant with AMOP. -- CSR,
+;;; 2003-04-17
+(assert (> *compute-effective-slot-definition-count* 0))
+\f
;;;; success
(sb-ext:quit :unix-status 104)
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.64"
+"0.pre8.65"