0.8.0.70:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 14 Jun 2003 13:39:30 +0000 (13:39 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 14 Jun 2003 13:39:30 +0000 (13:39 +0000)
A couple of fixes:
... SEARCH and test predicate argument ordering: patch from
Wolfhard Buss cmucl-imp 2003-06-13
... VECTOR-PUSH-EXTEND and type inference: disable MAKE-ARRAY
dimension type inferencing for non-simple 1d arrays, as
the dimension can change too easily.  Regressions noted
by pfdietz' test suite.

NEWS
src/code/seq.lisp
src/compiler/array-tran.lisp
tests/vector.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 6617ba6..cda9759 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1831,6 +1831,8 @@ changes in sbcl-0.8.1 relative to sbcl-0.8.0:
     (reported by Markus Krummenacker)
   * bug fix: FORMATTER can successfully compile pretty-printer format
     strings which use variants of the ~* directive inside.
+  * bug fix: SEARCH now applies its TEST predicate to the elements of
+    the arguments in the correct order.  (thanks to Wolfhard Buss)
   * fixed some bugs revealed by Paul Dietz' test suite:
     ** NIL is now allowed as a structure slot name.
     ** arbitrary numbers, not just reals, are allowed in certain
index ec14add..b081375 100644 (file)
        ((or (null main) (null sub) (= (the fixnum end1) jndex))
        t)
      (declare (fixnum jndex))
-     (compare-elements (car main) (car sub))))
+     (compare-elements (car sub) (car main))))
 
 (sb!xc:defmacro search-compare-list-vector (main sub)
   `(do ((main ,main (cdr main))
        (index start1 (1+ index)))
        ((or (null main) (= index (the fixnum end1))) t)
      (declare (fixnum index))
-     (compare-elements (car main) (aref ,sub index))))
+     (compare-elements (aref ,sub index) (car main))))
 
 (sb!xc:defmacro search-compare-vector-list (main sub index)
   `(do ((sub (nthcdr start1 ,sub) (cdr sub))
        (index ,index (1+ index)))
        ((or (= (the fixnum end1) jndex) (null sub)) t)
      (declare (fixnum jndex index))
-     (compare-elements (aref ,main index) (car sub))))
+     (compare-elements (car sub) (aref ,main index))))
 
 (sb!xc:defmacro search-compare-vector-vector (main sub index)
   `(do ((index ,index (1+ index))
        (sub-index start1 (1+ sub-index)))
        ((= sub-index (the fixnum end1)) t)
      (declare (fixnum sub-index index))
-     (compare-elements (aref ,main index) (aref ,sub sub-index))))
+     (compare-elements (aref ,sub sub-index) (aref ,main index))))
 
 (sb!xc:defmacro search-compare (main-type main sub index)
   (if (eq main-type 'list)
index 3bce548..9d0df27 100644 (file)
                    (t
                     '*))
             ,(cond ((constant-continuation-p dims)
-                    (let ((val (continuation-value dims)))
-                      (if (listp val) val (list val))))
+                    (let* ((val (continuation-value dims))
+                          (cdims (if (listp val) val (list val))))
+                     (if (or simple (/= (length cdims) 1))
+                         cdims
+                         '(*))))
                    ((csubtypep (continuation-type dims)
                                (specifier-type 'integer))
                     '(*))
index 210f7b6..595d588 100644 (file)
             (vector-push-extend #\a complex-t)
             (assert (= (length complex-t) 4))
             (assert (raises-error? (vector-push-extend #\b simple-t))))))
+
+(multiple-value-bind (fp1 index fp2 bool)
+    (let ((a (make-array '(5) :fill-pointer 5 :adjustable 5
+                        :initial-contents '(a b c d e))))
+      (values (fill-pointer a)
+             (vector-push-extend 'x a)
+             (fill-pointer a)
+             (<= (array-total-size a) 5)))
+  (assert (= fp1 5))
+  (assert (= index 5))
+  (assert (= fp2 6))
+  (assert (not bool)))
index 16961ff..6d3862c 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".)
-"0.8.0.69"
+"0.8.0.70"