X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fknownfun.lisp;h=8d9613841a1e8fc5d2d12db8191d8f8839c96cf1;hb=dc78da1842ccba35e49ca8ca91fd0ab88b1a08b3;hp=d28f79eef4c6473ffdd18c86559969221d946b41;hpb=09cd508206ea4d5da08d3950f9cddb862e81dffd;p=sbcl.git diff --git a/src/compiler/knownfun.lisp b/src/compiler/knownfun.lisp index d28f79e..8d96138 100644 --- a/src/compiler/knownfun.lisp +++ b/src/compiler/knownfun.lisp @@ -272,7 +272,8 @@ ;;; Derive the type to be the type specifier which is the Nth arg, ;;; with the additional restriptions noted in the CLHS for STRING and -;;; SIMPLE-STRING. +;;; SIMPLE-STRING, defined to specialize on CHARACTER, and for VECTOR +;;; (under the page for MAKE-SEQUENCE). (defun creation-result-type-specifier-nth-arg (n) (lambda (call) (declare (type combination call)) @@ -293,6 +294,20 @@ (declare (ignore simple-string)) (careful-specifier-type `(simple-array character ,@(if size (list size) '((*))))))) - (t (careful-specifier-type specifier)))))))) + (t + (let ((ctype (careful-specifier-type specifier))) + (if (and (array-type-p ctype) + (eq (array-type-specialized-element-type ctype) + *wild-type*)) + ;; I don't think I'm allowed to modify what I get + ;; back from SPECIFIER-TYPE; it is, after all, + ;; cached. Better copy it, then. + (let ((real-ctype (copy-structure ctype))) + (setf (array-type-element-type real-ctype) + *universal-type* + (array-type-specialized-element-type real-ctype) + *universal-type*) + real-ctype) + ctype))))))))) (/show0 "knownfun.lisp end of file")