X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmethods.lisp;h=4acbaaeb99205bff01ce03160d825f0241fee3bb;hb=500fae719e1d6e138aff44a711941baab63bd405;hp=3358df958f132c064ad224ec009695fd450fe6df;hpb=2b0710d31c3fa1e5448ec842504d5276842e394f;p=sbcl.git diff --git a/src/pcl/methods.lisp b/src/pcl/methods.lisp index 3358df9..4acbaae 100644 --- a/src/pcl/methods.lisp +++ b/src/pcl/methods.lisp @@ -40,12 +40,6 @@ (setf (slot-value method '%function) (method-function-from-fast-function fmf))))) -(defmethod accessor-method-class ((method standard-accessor-method)) - (car (slot-value method 'specializers))) - -(defmethod accessor-method-class ((method standard-writer-method)) - (cadr (slot-value method 'specializers))) - ;;; initialization ;;; ;;; Error checking is done in before methods. Because of the simplicity of @@ -54,7 +48,7 @@ ;;; Methods are not reinitializable. (define-condition metaobject-initialization-violation - (reference-condition simple-condition) + (reference-condition simple-error) ()) (macrolet ((def (name args control) @@ -184,19 +178,6 @@ (setf (slot-value method 'closure-generator) (method-function-closure-generator (slot-value method '%function)))) -(defmethod shared-initialize :after ((method standard-accessor-method) - slot-names - &key) - (declare (ignore slot-names)) - (with-slots (slot-name %slot-definition) method - (unless %slot-definition - (let ((class (accessor-method-class method))) - (when (slot-class-p class) - (setq %slot-definition (find slot-name (class-direct-slots class) - :key #'slot-definition-name))))) - (when (and %slot-definition (null slot-name)) - (setq slot-name (slot-definition-name %slot-definition))))) - (defmethod method-qualifiers ((method standard-method)) (plist-value method 'qualifiers)) @@ -486,6 +467,18 @@ (loop (when (null methods) (return gf)) (real-add-method gf (pop methods) methods))) +(define-condition new-value-specialization (reference-condition error) + ((%method :initarg :method :reader new-value-specialization-method)) + (:report + (lambda (c s) + (format s "~@" + (new-value-specialization-method c) + #'(setf slot-value-using-class)))) + (:default-initargs :references + (list '(:sbcl :node "Metaobject Protocol") + '(:amop :generic-function (setf slot-value-using-class))))) + (defun real-add-method (generic-function method &optional skip-dfun-update-p) (when (method-generic-function method) (error "~@