X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-type.lisp;h=47fc196a9a684a7c371c5269e952866a274baecc;hb=69d60b456b07a0256f08df0d02484f361ce5737c;hp=e44501f2806baedcb6c10e1b84a4f56400f8edba;hpb=b953c186cfe68e48801cb54715da0120c9580888;p=sbcl.git diff --git a/src/code/cross-type.lisp b/src/code/cross-type.lisp index e44501f..47fc196 100644 --- a/src/code/cross-type.lisp +++ b/src/code/cross-type.lisp @@ -82,6 +82,9 @@ '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) @@ -360,6 +363,11 @@ (make-member-type :members (list x))) (number (ctype-of-number x)) + (string + (make-array-type :dimensions (array-dimensions x) + :complexp (not (typep x 'simple-array)) + :element-type (specifier-type 'base-char) + :specialized-element-type (specifier-type 'base-char))) (array (let ((etype (specifier-type (array-element-type x)))) (make-array-type :dimensions (array-dimensions x) @@ -371,7 +379,7 @@ (cond ((typep x 'standard-char) ;; (Note that SBCL doesn't distinguish between BASE-CHAR and ;; CHARACTER.) - (find-classoid 'base-char)) + (specifier-type 'base-char)) ((not (characterp x)) nil) (t