(eval-when (:compile-toplevel :execute)
-(sb!xc:defmacro vector-reverse (sequence type)
+(sb!xc:defmacro vector-reverse (sequence)
`(let ((length (length ,sequence)))
(declare (fixnum length))
(do ((forward-index 0 (1+ forward-index))
(backward-index (1- length) (1- backward-index))
- (new-sequence (make-sequence ,type length)))
+ (new-sequence (make-sequence-like sequence length)))
((= forward-index length) new-sequence)
(declare (fixnum forward-index backward-index))
(setf (aref new-sequence forward-index)
(list-reverse-macro sequence))
(defun vector-reverse* (sequence)
- (vector-reverse sequence (type-of sequence)))
+ (vector-reverse sequence))
\f
;;;; NREVERSE
(aref rmdr ,i)))
vector)
0))))
+
+;;; Following refactoring of sequence functions to detect bad type
+;;; specifiers, REVERSE was left broken on vectors with fill pointers.
+(let ((a (make-array 10
+ :fill-pointer 5
+ :element-type 'character
+ :initial-contents "abcdefghij")))
+ (assert (string= (reverse a) "edcba")))
\ No newline at end of file
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.9.20"
+"0.7.9.21"