(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))
`(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))
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))))