From 52a1549e7bd1621eaa2c9ccf217720d543ba3cdf Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 31 Aug 2010 11:27:35 +0000 Subject: [PATCH] 1.0.42.5: revert 1.0.42.2, "correct defknown for data-vector-ref-with-offset" 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 | 3 --- src/compiler/fndb.lisp | 2 +- tests/compiler.pure.lisp | 29 ----------------------------- version.lisp-expr | 2 +- 4 files changed, 2 insertions(+), 34 deletions(-) diff --git a/NEWS b/NEWS index 5d8ddb1..7f8b07b 100644 --- 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, diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 5991492..dfb0dcd 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1448,7 +1448,7 @@ (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)) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 52187e5..19640d9 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3503,34 +3503,5 @@ (* 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))) diff --git a/version.lisp-expr b/version.lisp-expr index 817b46a..74234d3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4