* bug fix: direct superclasses of STANDARD-CLASS and
FUNCALLABLE-STANDARD-CLASS now default to STANDARD-OBJECT and
FUNCALLABLE-STANDARD-OBJECT as required by AMOP.
+ * bug fix: compiling a call to SLOT-VALUE with a constant slot-name
+ when no class with the named slot yet exists no longer causes a
+ compile-time style-warning.
changes in sbcl-1.0.23 relative to 1.0.22:
* enhancement: when disassembling method functions, disassembly
(initialize-slot-from-initfunction (class instance slotd)
;; CLHS: If a before method stores something in a slot,
;; that slot won't be initialized from its :INITFORM, if any.
- (if (typep instance 'structure-object)
- (when (eq (funcall
- ;; not SLOT-VALUE-USING-CLASS, as that
- ;; throws an error if the value is the
- ;; unbound marker.
- (slot-definition-internal-reader-function slotd)
- instance)
- +slot-unbound+)
- (setf (slot-value-using-class class instance slotd)
- (let ((initfn (slot-definition-initfunction slotd)))
- (when initfn
- (funcall initfn)))))
- (unless (or (null (slot-definition-initfunction slotd))
- (slot-boundp-using-class class instance slotd))
- (setf (slot-value-using-class class instance slotd)
- (funcall (slot-definition-initfunction slotd)))))))
+ (let ((initfun (slot-definition-initfunction slotd)))
+ (if (typep instance 'structure-object)
+ (when (eq (funcall
+ ;; not SLOT-VALUE-USING-CLASS, as that
+ ;; throws an error if the value is the
+ ;; unbound marker.
+ (slot-definition-internal-reader-function slotd)
+ instance)
+ +slot-unbound+)
+ (setf (slot-value-using-class class instance slotd)
+ (when initfun
+ (funcall initfun))))
+ (unless (or (not initfun)
+ (slot-boundp-using-class class instance slotd))
+ (setf (slot-value-using-class class instance slotd)
+ (funcall initfun)))))))
(let* ((class (class-of instance))
(initfn-slotds
(loop for slotd in (class-slots class)
unless (initialize-slot-from-initarg class instance slotd)
- collect slotd)))
+ collect slotd)))
(dolist (slotd initfn-slotds)
(if (eq (slot-definition-allocation slotd) :class)
(when (or (eq t slot-names)
(ensure-accessor 'reader ',reader-name ',slot-name))))
(declare (ignore .ignore.))
(truly-the (values t &optional)
- (funcall #',reader-name ,object)))))
+ ;; Don't give a style-warning about undefined function here.
+ (funcall (locally (declare (muffle-conditions style-warning))
+ #',reader-name)
+ ,object)))))
(defmacro accessor-set-slot-value (object slot-name new-value &environment env)
(aver (constantp slot-name env))
(setq name (slot-definition-name slotd)
namep t))
(unless initp
- (when (slot-definition-initfunction slotd)
+ (awhen (slot-definition-initfunction slotd)
(setq initform (slot-definition-initform slotd)
- initfunction (slot-definition-initfunction slotd)
+ initfunction it
initp t)))
(unless documentationp
- (when (%slot-definition-documentation slotd)
- (setq documentation (%slot-definition-documentation slotd)
+ (awhen (%slot-definition-documentation slotd)
+ (setq documentation it
documentationp t)))
(unless allocp
(setq allocation (slot-definition-allocation slotd)
(setf type-check-function
(if type-check-function
(let ((old-function type-check-function))
+ (declare (function old-function fun))
(lambda (value)
(funcall old-function value)
(funcall fun value)))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.23.34"
+"1.0.23.35"