- (labels (;; FIXME: This function is a no-op now that we no longer
- ;; have a distinct package T%CL to translate
- ;; for-the-target-Lisp CL symbols to, and should go away
- ;; completely.
- (translate (expr) expr))
- (let ((raw-result (type-of object)))
- (cond ((or (subtypep raw-result 'float)
- (subtypep raw-result 'complex))
- (warn-possible-cross-type-float-info-loss
- `(sb!xc:type-of ,object))
- (translate raw-result))
- ((subtypep raw-result 'integer)
- (cond ((<= 0 object 1)
- 'bit)
- ((fixnump object)
- 'fixnum)
- (t
- 'integer)))
- ((some (lambda (type) (subtypep raw-result type))
- '(array character list symbol))
- (translate raw-result))
- (t
- (error "can't handle TYPE-OF ~S in cross-compilation"))))))
+ (let ((raw-result (type-of object)))
+ (cond ((or (subtypep raw-result 'float)
+ (subtypep raw-result 'complex))
+ (warn-possible-cross-type-float-info-loss
+ `(sb!xc:type-of ,object))
+ raw-result)
+ ((subtypep raw-result 'integer)
+ (cond ((<= 0 object 1)
+ 'bit)
+ (;; We can't rely on the host's opinion of whether
+ ;; it's a FIXNUM, but instead test against target
+ ;; MOST-fooITIVE-FIXNUM limits.
+ (fixnump object)
+ 'fixnum)
+ (t
+ 'integer)))
+ ((subtypep raw-result 'simple-string)
+ `(simple-base-string ,(length object)))
+ ((subtypep raw-result 'string) 'base-string)
+ ((some (lambda (type) (subtypep raw-result type))
+ '(array character list symbol))
+ raw-result)
+ (t
+ (error "can't handle TYPE-OF ~S in cross-compilation" object)))))