X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fslots-boot.lisp;h=43bf09ae619e5a43a4032d662152a11914714b64;hb=f10dce4be24d44e1db0fb3d5b1d3689d6caa062a;hp=dc46d563899cf100a661810350e6636867ea4293;hpb=937a46e64983862cb9e21761db95e58700341940;p=sbcl.git diff --git a/src/pcl/slots-boot.lisp b/src/pcl/slots-boot.lisp index dc46d56..43bf09a 100644 --- a/src/pcl/slots-boot.lisp +++ b/src/pcl/slots-boot.lisp @@ -78,8 +78,12 @@ (slot-missing-fun slot-name type) "generated slot-missing method" slot-name))))) - (unless (fboundp fun-name) - (let ((gf (ensure-generic-function fun-name))) + (unless (fboundp fun-name) + (let ((gf (ensure-generic-function + fun-name + :lambda-list (ecase type + ((reader boundp) '(object)) + (writer '(new-value object)))))) (ecase type (reader (add-slot-missing-method gf slot-name 'slot-value)) (boundp (add-slot-missing-method gf slot-name 'slot-boundp)) @@ -94,7 +98,8 @@ `(let ((.ignore. (load-time-value (ensure-accessor 'reader ',reader-name ',slot-name)))) (declare (ignore .ignore.)) - (funcall #',reader-name ,object)))) + (truly-the (values t &optional) + (funcall #',reader-name ,object))))) (defmacro accessor-set-slot-value (object slot-name new-value &environment env) (aver (constantp slot-name)) @@ -464,15 +469,16 @@ initargs))) (defun initialize-internal-slot-gfs (slot-name &optional type) - (macrolet ((frob (type name-fun add-fun) + (macrolet ((frob (type name-fun add-fun ll) `(when (or (null type) (eq type ',type)) (let* ((name (,name-fun slot-name)) - (gf (ensure-generic-function name)) + (gf (ensure-generic-function name + :lambda-list ',ll)) (methods (generic-function-methods gf))) (when (or (null methods) (plist-value gf 'slot-missing-method)) (setf (plist-value gf 'slot-missing-method) nil) (,add-fun *the-class-slot-object* gf slot-name)))))) - (frob reader slot-reader-name add-reader-method) - (frob writer slot-writer-name add-writer-method) - (frob boundp slot-boundp-name add-boundp-method))) + (frob reader slot-reader-name add-reader-method (object)) + (frob writer slot-writer-name add-writer-method (new-value object)) + (frob boundp slot-boundp-name add-boundp-method (object))))