;;;; -*- coding: utf-8; fill-column: 78 -*-
+changes relative to sbcl-1.0.42
+ * bug fix: bogus type errors from (AREF A (+ POSITIVE-OFFSET N)) under
+ certain circumstances when N was negative but (+ POSITIVE-OFFSET N)
+ was non-negative. (lp#622958)
+
changes in sbcl-1.0.42 relative to sbcl-1.0.41
* build changes
** Cross-compilation host is now specified to make.sh using
(defknown %check-bound (array index fixnum) index (movable foldable flushable))
(defknown data-vector-ref (simple-array index) t
(foldable explicit-check always-translatable))
-(defknown data-vector-ref-with-offset (simple-array index fixnum) t
+(defknown data-vector-ref-with-offset (simple-array fixnum fixnum) t
(foldable explicit-check always-translatable))
(defknown data-vector-set (array index t) t
(unsafe explicit-check always-translatable))
(declare (optimize (sb-c::float-accuracy 0)))
(* x -1.0d0)))
1))))
+
+(with-test (:name :data-vector-ref-with-offset-neg-index)
+ (let ((fun (compile nil
+ `(lambda ()
+ (let ((table (make-array 7
+ :element-type 'fixnum
+ :initial-contents '(0 1 2 3 4 5 6))))
+ (loop for n from -3 upto 3
+ collect (aref table (+ 3 n))))))))
+ (assert (equal '(0 1 2 3 4 5 6) (funcall fun)))))
+
+(with-test (:name :aref-bignum-offset-and-index)
+ ;; These don't get the data-vector-ref-with-offset vop.
+ (let ((fun (compile nil
+ `(lambda ()
+ (let ((table (make-array 7
+ :element-type 'fixnum
+ :initial-contents '(0 1 2 3 4 5 6))))
+ (loop for n from most-negative-fixnum upto (+ most-negative-fixnum 6)
+ collect (aref table (+ #.(1+ most-positive-fixnum) n))))))))
+ (assert (equal '(0 1 2 3 4 5 6) (funcall fun))))
+ (let ((fun (compile nil
+ `(lambda ()
+ (let ((table (make-array 7
+ :element-type 'fixnum
+ :initial-contents '(0 1 2 3 4 5 6))))
+ (loop for n from (+ most-positive-fixnum 1) upto (+ most-positive-fixnum 7)
+ collect (aref table (- n (+ most-positive-fixnum 1)))))))))
+ (assert (equal '(0 1 2 3 4 5 6) (funcall fun)))))
;;; 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".)
-"1.0.42.1"
+"1.0.42.2"