"VALUES-TYPE-P" "VALUES-TYPE-REQUIRED"
"VALUES-TYPE-REST" "VALUES-TYPE-UNION"
"VALUES-TYPE-TYPES" "VALUES-TYPES"
- "VALUES-TYPE-START"
"VALUES-TYPES-EQUAL-OR-INTERSECT" "VECTOR-T-P"
+ "VECTOR-NIL-P"
"VECTOR-TO-VECTOR*"
"VECTOR-OF-CHECKED-LENGTH-GIVEN-LENGTH"
"WITH-ARRAY-DATA"
;;; semistandard types
(sb!xc:deftype generalized-boolean () t)
+(sb!xc:deftype format-control ()
+ '(or string function))
+
+(sb!xc:deftype restart-designator ()
+ '(or (and symbol (not null)) restart))
+
- ;;; a type specifier
- ;;;
- ;;; FIXME: The SB!KERNEL:INSTANCE here really means CL:CLASS.
- ;;; However, the CL:CLASS type is only defined once PCL is loaded,
- ;;; which is before this is evaluated. Once PCL is moved into cold
- ;;; init, this might be fixable.
- (sb!xc:deftype type-specifier () '(or list symbol sb!kernel:instance))
-
;;; array rank, total size...
(sb!xc:deftype array-rank () `(integer 0 (,sb!xc:array-rank-limit)))
(sb!xc:deftype array-total-size ()
(len (if (constant-continuation-p length)
(continuation-value length)
'*))
- (result-type-spec `(simple-array ,eltype (,len)))
(eltype-type (ir1-transform-specifier-type eltype))
+ (result-type-spec
+ `(simple-array
+ ,(if (unknown-type-p eltype-type)
+ (give-up-ir1-transform
+ "ELEMENT-TYPE is an unknown type: ~S" eltype)
+ (sb!xc:upgraded-array-element-type eltype))
+ (,len)))
(saetp (find-if (lambda (saetp)
- (csubtypep eltype-type (saetp-ctype saetp)))
- *specialized-array-element-type-properties*)))
+ (csubtypep eltype-type (sb!vm:saetp-ctype saetp)))
+ sb!vm:*specialized-array-element-type-properties*)))
(unless saetp
(give-up-ir1-transform
"cannot open-code creation of ~S" result-type-spec))
\f
;;;; simplifying HAIRY-DATA-VECTOR-REF and HAIRY-DATA-VECTOR-SET
+ (deftransform hairy-data-vector-ref ((string index) (simple-string t))
+ (let ((ctype (continuation-type string)))
+ (if (array-type-p ctype)
+ ;; the other transform will kick in, so that's OK
+ (give-up-ir1-transform)
+ `(typecase string
+ ((simple-array character (*)) (data-vector-ref string index))
+ ((simple-array nil (*)) (data-vector-ref string index))))))
+
(deftransform hairy-data-vector-ref ((array index) (array t) * :important t)
"avoid runtime dispatch on array element type"
- (let ((element-ctype (extract-upgraded-element-type array)))
+ (let ((element-ctype (extract-upgraded-element-type array))
+ (declared-element-ctype (extract-declared-element-type array)))
(declare (type ctype element-ctype))
(when (eq *wild-type* element-ctype)
(give-up-ir1-transform
(%array-data-vector array))
index)))))
++(deftransform hairy-data-vector-set ((string index new-value)
++ (simple-string t t))
++ (let ((ctype (continuation-type string)))
++ (if (array-type-p ctype)
++ ;; the other transform will kick in, so that's OK
++ (give-up-ir1-transform)
++ `(typecase string
++ ((simple-array character (*))
++ (data-vector-set string index new-value))
++ ((simple-array nil (*))
++ (data-vector-set string index new-value))))))
++
(deftransform hairy-data-vector-set ((array index new-value)
(array t t)
*
;;; 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".)
- "0.8.1.33"
-"0.8.0.78.vector-nil-string.15"
++"0.8.1.34"