* USE-VALUE and STORE-VALUE have obvious meanings here, so use them.
* Missing NEWS for .31.
on OS X/x86.
* feature: SBCL now tries to signal a STORAGE-CONDITION when running out
of heap.
+ * feature: SBCL now provides USE-VALUE and STORE-VALUE restarts in the
+ default method for SLOT-UNBOUND.
* minor incompatible change: prevent the user from specializing the
new-value argument to SB-MOP:SLOT-VALUE-USING-CLASS. It's
somewhat counter to the intent of the protocol, I (CSR) think, and
additionally it just doesn't work in SBCL as currently
implemented, thanks to optimizations (that are always valid for
the other three SLOT-VALUEish functions, but not for the setter).
+ * bug fix: native unparsing of pathnames with :DIRECTORY NIL failed
+ with a type error. (reported by blitz_ on #lisp)
* bug fix: unparsing logical pathnames with :NAME :WILD :TYPE NIL
failed with a type error. (reported by Pascal Bourguignon)
* bug fix: merging pathnames against defaults with :DIRECTORY
"NTH-BUT-WITH-SANE-ARG-ORDER"
"DEPRECATION-WARNING"
"BIT-VECTOR-="
+ "READ-EVALUATED-FORM"
;; ..and macros..
"COLLECT"
instance))
(defmethod slot-unbound ((class t) instance slot-name)
- (error 'unbound-slot :name slot-name :instance instance))
+ (restart-case
+ (error 'unbound-slot :name slot-name :instance instance)
+ (use-value (v)
+ :report "Return a value as the slot-value."
+ :interactive read-evaluated-form
+ v)
+ (store-value (v)
+ :report "Store and return a value as the slot-value."
+ :interactive read-evaluated-form
+ (setf (slot-value instance slot-name) v))))
(defun slot-unbound-internal (instance position)
(values
(list (find-class 'integer))))))
(assert (= (remove-method-1 3) 4))
(assert (= (remove-method-2 3) 2))
+
+;;; ANSI doesn't require these restarts, but now that we have them we
+;;; better test them too.
+(defclass slot-unbound-restart-test () ((x)))
+(let ((test (make-instance 'slot-unbound-restart-test)))
+ (assert (not (slot-boundp test 'x)))
+ (assert (= 42 (handler-bind ((unbound-slot (lambda (c) (use-value 42 c))))
+ (slot-value test 'x))))
+ (assert (not (slot-boundp test 'x)))
+ (assert (= 13 (handler-bind ((unbound-slot (lambda (c) (store-value 13 c))))
+ (slot-value test 'x))))
+ (assert (= 13 (slot-value test 'x))))
+
\f
;;;; success
;;; 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".)
-"0.9.13.31"
+"0.9.13.32"