;;; trying to optimize it.
(defun source-transform-union-typep (object type)
(let* ((types (union-type-types type))
- (ltype (specifier-type 'list))
- (mtype (find-if #'member-type-p types)))
- (if (and mtype (csubtypep ltype type))
- (let ((members (member-type-members mtype)))
- (once-only ((n-obj object))
- `(or (listp ,n-obj)
- (typep ,n-obj
- '(or ,@(mapcar #'type-specifier
- (remove (specifier-type 'cons)
- (remove mtype types)))
- (member ,@(remove nil members)))))))
+ (type-list (specifier-type 'list))
+ (type-cons (specifier-type 'cons))
+ (mtype (find-if #'member-type-p types))
+ (members (when mtype (member-type-members mtype))))
+ (if (and mtype
+ (memq nil members)
+ (memq type-cons types))
+ (once-only ((n-obj object))
+ `(or (listp ,n-obj)
+ (typep ,n-obj
+ '(or ,@(mapcar #'type-specifier
+ (remove type-cons
+ (remove mtype types)))
+ (member ,@(remove nil members))))))
(once-only ((n-obj object))
`(or ,@(mapcar (lambda (x)
`(typep ,n-obj ',(type-specifier x)))
(compile nil '(lambda (x)
(declare (type (simple-array (simple-string 3) (5)) x))
(aref (aref x 0) 0))))
+
+;; compiler failure
+(let ((f (compile nil '(lambda (x) (typep x '(not (member 0d0)))))))
+ (assert (funcall f 1d0)))
;;; 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.8.1.16"
+"0.8.1.17"