* fixed some bugs revealed by Paul Dietz' test suite:
** COPY-ALIST now signals an error if its argument is a dotted
list;
+ ** condition slots are now accessed more correctly in the presence
+ of multiple initargs for a given slot;
+ ** the USE-VALUE, CONTINUE and STORE-VALUE functions now correctly
+ exclude restarts of the same name associated with a different
+ condition;
planned incompatible changes in 0.7.x:
* (not done yet, but planned:) When the profiling interface settles
(when (eq (condition-slot-name cslot) name)
(return-from condition-reader-function
(car (condition-slot-cell cslot)))))
-
(let ((val (getf (condition-assigned-slots condition) name
*empty-condition-slot*)))
(if (eq val *empty-condition-slot*)
(slot (find-condition-class-slot class name)))
(unless slot
(error "missing slot ~S of ~S" name condition))
- (dolist (initarg (condition-slot-initargs slot))
- (let ((val (getf actual-initargs
- initarg
- *empty-condition-slot*)))
- (unless (eq val *empty-condition-slot*)
- (return-from condition-reader-function
- (setf (getf (condition-assigned-slots condition)
- name)
- val)))))
- (setf (getf (condition-assigned-slots condition) name)
- (find-slot-default class slot)))
+ (do ((initargs actual-initargs (cddr initargs)))
+ ((endp initargs)
+ (setf (getf (condition-assigned-slots condition) name)
+ (find-slot-default class slot)))
+ (when (member (car initargs) (condition-slot-initargs slot))
+ (return-from condition-reader-function
+ (setf (getf (condition-assigned-slots condition)
+ name)
+ (cadr initargs))))))
val))))
\f
;;;; MAKE-CONDITION
#!+sb-doc ,doc
;; FIXME: Perhaps this shared logic should be pulled out into
;; FLET MAYBE-INVOKE-RESTART? See whether it shrinks code..
- (when (find-restart ',name condition)
- (invoke-restart ',name ,@args)))))
+ (let ((restart (find-restart ',name condition)))
+ (when restart
+ (invoke-restart restart ,@args))))))
(define-nil-returning-restart continue ()
"Transfer control to a restart named CONTINUE, or return NIL if none exists.")
(define-nil-returning-restart store-value (value)