X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fslots.lisp;h=e726ba4a8723eee37f9f64b64d9f81c437d7a406;hb=94ac5b7c3ff37850210b6fc9a7593cf1c5752993;hp=7b217e36403a7e53a273a2067aed1337caacfbc7;hpb=203c15eefffd996fd20bd28d461ea1aa3865dbbe;p=sbcl.git diff --git a/src/pcl/slots.lisp b/src/pcl/slots.lisp index 7b217e3..e726ba4 100644 --- a/src/pcl/slots.lisp +++ b/src/pcl/slots.lisp @@ -28,7 +28,7 @@ (define-condition unbound-slot (cell-error) ((instance :reader unbound-slot-instance :initarg :instance) (slot :reader unbound-slot-slot :initarg :slot)) - (:report (lambda(condition stream) + (:report (lambda (condition stream) (format stream "The slot ~S is unbound in the object ~S." (unbound-slot-slot condition) (unbound-slot-instance condition))))) @@ -191,16 +191,14 @@ (value (typecase location (fixnum (cond ((std-instance-p object) - ;; FIXME: EQ T (WRAPPER-STATE ..) is better done - ;; through INVALID-WRAPPER-P (here and below). - (unless (eq t (wrapper-state (std-instance-wrapper - object))) + (when (invalid-wrapper-p (std-instance-wrapper + object)) (check-wrapper-validity object)) (clos-slots-ref (std-instance-slots object) location)) ((fsc-instance-p object) - (unless (eq t (wrapper-state (fsc-instance-wrapper - object))) + (when (invalid-wrapper-p (fsc-instance-wrapper + object)) (check-wrapper-validity object)) (clos-slots-ref (fsc-instance-slots object) location)) @@ -224,12 +222,12 @@ (typecase location (fixnum (cond ((std-instance-p object) - (unless (eq t (wrapper-state (std-instance-wrapper object))) + (when (invalid-wrapper-p (std-instance-wrapper object)) (check-wrapper-validity object)) (setf (clos-slots-ref (std-instance-slots object) location) new-value)) ((fsc-instance-p object) - (unless (eq t (wrapper-state (fsc-instance-wrapper object))) + (when (invalid-wrapper-p (fsc-instance-wrapper object)) (check-wrapper-validity object)) (setf (clos-slots-ref (fsc-instance-slots object) location) new-value)) @@ -249,14 +247,14 @@ (value (typecase location (fixnum (cond ((std-instance-p object) - (unless (eq t (wrapper-state (std-instance-wrapper - object))) + (when (invalid-wrapper-p (std-instance-wrapper + object)) (check-wrapper-validity object)) (clos-slots-ref (std-instance-slots object) location)) ((fsc-instance-p object) - (unless (eq t (wrapper-state (fsc-instance-wrapper - object))) + (when (invalid-wrapper-p (fsc-instance-wrapper + object)) (check-wrapper-validity object)) (clos-slots-ref (fsc-instance-slots object) location)) @@ -278,12 +276,12 @@ (typecase location (fixnum (cond ((std-instance-p object) - (unless (eq t (wrapper-state (std-instance-wrapper object))) + (when (invalid-wrapper-p (std-instance-wrapper object)) (check-wrapper-validity object)) (setf (clos-slots-ref (std-instance-slots object) location) +slot-unbound+)) ((fsc-instance-p object) - (unless (eq t (wrapper-state (fsc-instance-wrapper object))) + (when (invalid-wrapper-p (fsc-instance-wrapper object)) (check-wrapper-validity object)) (setf (clos-slots-ref (fsc-instance-slots object) location) +slot-unbound+))