((eq type *empty-type*)
nil)
(t
- (give-up-ir1-transform)))))
+ (let ((intersect (type-intersection2 type otype)))
+ (unless intersect
+ (give-up-ir1-transform))
+ (multiple-value-bind (constantp value)
+ (type-singleton-p intersect)
+ (if constantp
+ `(eql object ',value)
+ (give-up-ir1-transform))))))))
;;; Flush %TYPEP tests whose result is known at compile time.
(deftransform %typep ((object type))
(or (when (not ctype)
(compiler-warn "illegal type specifier for TYPEP: ~S" type)
(return-from source-transform-typep (values nil t)))
+ (multiple-value-bind (constantp value) (type-singleton-p ctype)
+ (and constantp
+ `(eql ,object ',value)))
(let ((pred (cdr (assoc ctype *backend-type-predicates*
:test #'type=))))
(when pred `(,pred ,object)))
;;; 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".)
-"1.0.43.45"
+"1.0.43.46"