1.0.42.5: revert 1.0.42.2, "correct defknown for data-vector-ref-with-offset"
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 31 Aug 2010 11:27:35 +0000 (11:27 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 31 Aug 2010 11:27:35 +0000 (11:27 +0000)
 Adjusting the defknown also requires adjusting the VOPs to accept negative
 indexes, and since I don't have time right now to audit the sign handling
 in them, I'm reverting for now.

 Saga continues on https://bugs.launchpad.net/sbcl/+bug/622958

NEWS
src/compiler/fndb.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 5d8ddb1..7f8b07b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,5 @@
 ;;;; -*- 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)
   * bug fix: DOTIMES accepted literal non-integer reals. (lp#619393, thanks to
     Roman Marynchak)
   * bug fix: WRITE-TO-STRING compiler macro binding special variable names,
index 5991492..dfb0dcd 100644 (file)
 (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 fixnum fixnum) t
+(defknown data-vector-ref-with-offset (simple-array index fixnum) t
   (foldable explicit-check always-translatable))
 (defknown data-vector-set (array index t) t
   (unsafe explicit-check always-translatable))
index 52187e5..19640d9 100644 (file)
                                                (* 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)))))
-
 (with-test (:name :dotimes-non-integer-counter-value)
   (assert (raises-error? (dotimes (i 8.6)) type-error)))
index 817b46a..74234d3 100644 (file)
@@ -17,4 +17,4 @@
 ;;; 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.4"
+"1.0.42.5"