-;;; KLUDGE: new broken version -- 20000504
-#+nil
-(deftransform coerce ((x type) (* *) * :when :both)
- (unless (constant-continuation-p type)
- (give-up-ir1-transform))
- (let ((tspec (specifier-type (continuation-value type))))
- (if (csubtypep (continuation-type x) tspec)
- 'x
- `(if #+nil (typep x type) #-nil nil
- x
- (the ,(continuation-value type)
- ,(cond ((csubtypep tspec (specifier-type 'double-float))
- '(%double-float x))
- ;; FIXME: If LONG-FLOAT is to be supported,
- ;; we need to pick it off here before falling
- ;; through to %SINGLE-FLOAT.
- ((csubtypep tspec (specifier-type 'float))
- '(%single-float x))
- #+nil
- ((csubtypep tspec (specifier-type 'list))
- '(coerce-to-list x))
- #+nil
- ((csubtypep tspec (specifier-type 'string))
- '(coerce-to-simple-string x))
- #+nil
- ((csubtypep tspec (specifier-type 'bit-vector))
- '(coerce-to-bit-vector x))
- #+nil
- ((csubtypep tspec (specifier-type 'vector))
- '(coerce-to-vector x type))
- (t
- (give-up-ir1-transform))))))))