(defun result-type-open-class (call)
(declare (type sb-c::combination call))
(let* ((not-set '#:not-set)
(defun result-type-open-class (call)
(declare (type sb-c::combination call))
(let* ((not-set '#:not-set)
;; find (the first occurence of) each interesting keyword argument
(do ((args (cdr (combination-args call)) (cddr args)))
;; find (the first occurence of) each interesting keyword argument
(do ((args (cdr (combination-args call)) (cddr args)))
- `(when (and (eq ,var not-set) (cadr args))
- (if (constant-continuation-p (cadr args))
- (setq ,var (continuation-value (cadr args)))
- (setq ,var not-constant)))))
- (case (continuation-value (car args))
- (:direction (maybe-set direction))
- (:if-exists (maybe-set if-exists))
- (:if-does-not-exist (maybe-set if-does-not-exist))
- (:class (maybe-set class)))))
+ `(when (and (eq ,var not-set) (cadr args))
+ (if (constant-continuation-p (cadr args))
+ (setq ,var (continuation-value (cadr args)))
+ (setq ,var not-constant)))))
+ (case (continuation-value (car args))
+ (:direction (maybe-set direction))
+ (:if-exists (maybe-set if-exists))
+ (:if-does-not-exist (maybe-set if-does-not-exist))
+ (:class (maybe-set class)))))
;; and set default values for any that weren't set above
(when (eq direction not-set) (setq direction :input))
(when (eq if-exists not-constant) (setq if-exists nil))
;; and set default values for any that weren't set above
(when (eq direction not-set) (setq direction :input))
(when (eq if-exists not-constant) (setq if-exists nil))
;; direction is :output or :io or not-constant and :if-exists is nil
;; :if-does-not-exist is nil
(if (or (and (or (eq direction :probe) (eq direction not-constant))
;; direction is :output or :io or not-constant and :if-exists is nil
;; :if-does-not-exist is nil
(if (or (and (or (eq direction :probe) (eq direction not-constant))
- (not (eq if-does-not-exist :error)))
- (and (or (eq direction :output) (eq direction :io)
- (eq direction not-constant))
- (eq if-exists nil))
- (eq if-does-not-exist nil))
+ (not (eq if-does-not-exist :error)))
+ (and (or (eq direction :output) (eq direction :io)
+ (eq direction not-constant))
+ (eq if-exists nil))
+ (eq if-does-not-exist nil))
(specifier-type `(or null ,class))
(specifier-type class))))
(specifier-type `(or null ,class))
(specifier-type class))))