(logior res (ash bits (truly-the (integer 0 ,(- sb!vm:n-word-bits n-bits)) i))))))))
res)))))
(values
- `(with-array-data ((data seq)
- (start start)
- (end end)
- :check-fill-pointer t)
- (declare (type (simple-array ,element-type 1) data))
- (declare (type index start end))
- (declare (optimize (safety 0) (speed 3)))
- (,basher ,bash-value data start (- end start))
- seq)
+ ;; KLUDGE: WITH-ARRAY data in its full glory is going to mess up
+ ;; dynamic-extent for MAKE-ARRAY :INITIAL-ELEMENT initialization.
+ (if (csubtypep (lvar-type seq) (specifier-type '(simple-array * (*))))
+ `(let* ((len (length seq))
+ (end (or end len))
+ (bound (1+ end)))
+ ;; Minor abuse %CHECK-BOUND for bounds checking.
+ ;; (- END START) may still end up negative, but
+ ;; the basher handle that.
+ (,basher ,bash-value seq
+ (%check-bound seq bound start)
+ (- (if end (%check-bound seq bound end) len)
+ start)))
+ `(with-array-data ((data seq)
+ (start start)
+ (end end)
+ :check-fill-pointer t)
+ (declare (type (simple-array ,element-type 1) data))
+ (declare (type index start end))
+ (declare (optimize (safety 0) (speed 3)))
+ (,basher ,bash-value data start (- end start))
+ seq))
`((declare (type ,element-type item))))))
((policy node (> speed space))
(values
(let ((v (make-array (min n 1))))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-1 ()
(let ((v (make-array '(42) :element-type 'single-float)))
(declare (dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-2 (n x)
(let ((v (make-array n :initial-contents x)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-3 (x y z)
:element-type t :initial-contents x)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-4 ()
(let ((v (make-array 3 :initial-contents '(1 2 3))))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-5 ()
(let ((v (make-array 3 :initial-element 12 :element-type t)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-6 ()
(let ((v (make-array 3 :initial-element 12 :element-type '(unsigned-byte 8))))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-7 ()
(let ((v (make-array 3 :initial-element 12 :element-type '(signed-byte 8))))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-8 ()
(let ((v (make-array 3 :initial-element 12 :element-type 'word)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-9 ()
(let ((v (make-array 3 :initial-element 12.0 :element-type 'single-float)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx make-array-on-stack-10 ()
(let ((v (make-array 3 :initial-element 12.0d0 :element-type 'double-float)))
(declare (sb-int:truly-dynamic-extent v))
(true v)
+ (true v)
nil))
(defun-with-dx vector-on-stack (x y)