0.9.18.15: fix adjust-array :fill-pointer buglet, plus housekeeping
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 29 Oct 2006 21:05:58 +0000 (21:05 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 29 Oct 2006 21:05:58 +0000 (21:05 +0000)
 * Reported by Lars Brinkhoff: "An error of type error is signaled if
   fill-pointer is supplied and non-nil but array has no fill pointer."
 * Test-case.
 * Improve the localtime/gmtime KLUDGE for Windows: instead of
   flipping the sign of time, use zero -- still arbitrary, but
   slightly less so. "Where there timezones before 1970, geez!"
 * Oops! Broken test-case from 0.9.18.12 fixed.

NEWS
src/code/array.lisp
src/runtime/time.c
tests/array.pure.lisp
tests/compiler.test.sh
version.lisp-expr

diff --git a/NEWS b/NEWS
index 98e4471..d753a76 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ changes in sbcl-0.9.19 (1.0.0?) relative to sbcl-0.9.18:
     declaration in a LET* was fixed. (reported by Kaersten Poeck)
   * bug fix: file compiler no longer confuses validated and already
     dumped structurres. (reported by Kaersten Poeck)
+  * bug fix: ADJUST-ARRAY :FILL-POINTER T on an array without a
+    fill-pointer signals a type-error as required. (thanks to
+    Lars Brinkhoff)
   * improvements to the Windows port:
     ** floating point exceptions are now reported correctly.
     ** stack exhaustion detection works partially.
@@ -16,7 +19,8 @@ changes in sbcl-0.9.19 (1.0.0?) relative to sbcl-0.9.18:
        process.
     ** PROBE-FILE now simplifies pathnames correctly.
     ** DIRECTORY now works correctly with :WILD-INFERIORS.
-    ** (DECODE-UNIVERSAL-TIME 0) works.
+    ** DECODE-UNIVERSAL-TIME works on times before 00:00:00 January
+       1st 1970 (although time timezone data will be unreliable).
 
 changes in sbcl-0.9.18 (1.0.beta?) relative to sbcl-0.9.17:
   * enhancement: SB-POSIX now supports cfsetispeed(3), cfsetospeed(3),
index a3c6793..308b762 100644 (file)
@@ -764,7 +764,11 @@ of specialized arrays is supported."
            (error "The number of dimensions not equal to rank of array."))
           ((not (subtypep element-type (array-element-type array)))
            (error "The new element type, ~S, is incompatible with old type."
-                  element-type)))
+                  element-type))
+          ((and fill-pointer (not (array-has-fill-pointer-p array)))
+           (error 'type-error
+                  :datum array
+                  :expected-type '(satisfies array-has-fill-pointer-p))))
     (let ((array-rank (length (the list dimensions))))
       (declare (fixnum array-rank))
       (unless (= array-rank 1)
index 59a6fff..82ffab2 100644 (file)
@@ -32,7 +32,7 @@ void get_timezone(time_t when, int *secwest, boolean *dst)
      * The Windows versions also don't support times before the
      * epoch, so we kludge it. */
     if (when < 0)
-        when = -when;
+        when = 0;
     ltm = *localtime(&when);
     gtm = *gmtime(&when);
 #else
index a44193b..f8ed9f5 100644 (file)
                                  collect (logand 1 (funcall lf (aref v1 i) (aref v2 i))))
                            'bit-vector)
           do (assert (bit-vector-equal r1 r2)))))
+
+;;; CLHS, ADJUST-ARRAY: An error of type error is signaled if
+;;; fill-pointer is supplied and non-nil but array has no fill pointer.
+(assert (eq :good
+            (handler-case
+                (let ((array (make-array 12)))
+                  (assert (not (array-has-fill-pointer-p array)))
+                  (adjust-array array 12 :fill-pointer t)
+                  array)
+              (type-error ()
+                :good))))
index f7c9218..5b891d2 100644 (file)
@@ -365,7 +365,8 @@ cat > $tmpfilename <<EOF
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (defstruct foox)
   (defmethod make-load-form ((foo foox) &optional env)
-    `(make-foox)))
+    (declare (ignore env))
+    '(make-foox)))
 (defstruct bar
   (foo #.(make-foox)))
 EOF
index d3e37d0..7d46731 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.9.18.14"
+"0.9.18.15"