(defun shrink-vector (vector new-length)
(declare (vector vector))
- (cond ((eq (length vector) new-length)
- vector)
- ((array-has-fill-pointer-p vector)
- (setf (%array-fill-pointer vector) new-length))
- (t (subseq vector 0 new-length))))
+ (cond
+ ((eq (length vector) new-length)
+ vector)
+ ((array-has-fill-pointer-p vector)
+ (setf (%array-fill-pointer vector) new-length)
+ vector)
+ (t (subseq vector 0 new-length))))
;;; Fill in array header with the provided information, and return the array.
(defun set-array-header (array data length fill-pointer displacement dimensions
;;;; ZAP-ARRAY-DATA for ADJUST-ARRAY
;;; a temporary to be used when OLD-DATA and NEW-DATA are EQ.
-;;; KLUDGE: Boy, DYNAMIC-EXTENT would be nice.
+;;; KLUDGE: Boy, DYNAMIC-EXTENT would be nice. This is rebound
+;;; to length zero array in each new thread.
+;;;
+;;; DX is probably a bad idea, because a with a big array it would
+;;; be fairly easy to blow the stack.
+;;;
+;;; Rebound per thread.
(defvar *zap-array-data-temp* (make-array 1000 :initial-element t))
(defun zap-array-data-temp (length element-type initial-element