;;; If a simple array with known dimensions, then VECTOR-LENGTH is a
;;; compile-time constant.
-(deftransform vector-length ((vector) ((simple-array * (*))))
+(deftransform vector-length ((vector))
(let ((vtype (continuation-type vector)))
- (if (array-type-p vtype)
+ (if (and (array-type-p vtype)
+ (not (array-type-complexp vtype)))
(let ((dim (first (array-type-dimensions vtype))))
(when (eq dim '*) (give-up-ir1-transform))
dim)
(simple-u32 (make-array 50
:element-type '(unsigned-byte 32)))
(simple-character (make-string 44))
- (complex-t (make-array 35 :fill-pointer 3))
+ (complex-t (make-array 4 :fill-pointer 3))
(complex-u32 (make-array 88
+ :adjustable t
:element-type '(unsigned-byte 32)))
(complex-character (make-array 14
:element-type 'character
:fill-pointer t)))
- (assert (= (length simple-t) 35)))))
+ (assert (= (length simple-t) 35))
+ (assert (= (length simple-u32) 50))
+ (assert (= (length simple-character) 44))
+ (assert (= (length complex-t) 3))
+ (assert (= (length complex-u32) 88))
+ (assert (= (length complex-character) 14))
+ (vector-push-extend #\a complex-t)
+ (assert (= (length complex-t) 4))
+ (assert (raises-error? (vector-push-extend #\b simple-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.0.41"
+"0.8.0.42"