0.8.14.10: quoth the FORMAT, LOOP for on!
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 11 Sep 2004 12:54:25 +0000 (12:54 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 11 Sep 2004 12:54:25 +0000 (12:54 +0000)
            * Merge FORMAT and LOOP patches by Julian Squires
               and Teemu Kalvas respectively, plus test-cases.

NEWS
src/code/loop.lisp
src/code/target-format.lisp
tests/loop.pure.lisp
tests/print.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index eb417ce..54d76b0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,11 @@ changes in sbcl-0.8.15 relative to sbcl-0.8.14:
   * new feature: saving cores with foreign code loaded is now
     supported on x86/FreeBSD, x86/Linux, and sparc/SunOS. (based
     on Timothy Moore's work for CMUCL)
+  * bug fix: FOR ... ON ... -clauses in LOOP now work on dotted lists
+    (thanks for Teemu Kalvas)
+  * bug fix: in FORMAT ~^ inside ~:{ now correctly steps to the next
+    case instead of terminating the iteration (thanks for Julian Squires,
+    Sean Champ and Raymond Toy)
   * bug fix: incorrect expansion of defgeneric that caused
     a style warning. (thanks for Zach Beane)
 
index 674c701..a02038c 100644 (file)
@@ -1495,7 +1495,7 @@ code to be loaded.
     (let ((listvar var))
       (cond ((and var (symbolp var))
             (loop-make-iteration-var var list data-type))
-           (t (loop-make-var (setq listvar (gensym)) list 'list)
+           (t (loop-make-var (setq listvar (gensym)) list 't)
               (loop-make-iteration-var var nil data-type)))
       (let ((list-step (loop-list-step listvar)))
        (let* ((first-endtest
index e3c4475..f03d70f 100644 (file)
                          (*logical-block-popper* nil)
                          (*outside-args* args))
                     (catch 'up-and-out
-                      (do-guts arg arg)
-                      args))
+                      (do-guts arg arg))
+                     args)
                   (do-guts orig-args args)))
             (do-loop (orig-args args)
               (catch (if colonp 'up-up-and-out 'up-and-out)
index 408d18b..8f7b8dd 100644 (file)
        (y (list nil 2 nil)))
     (declare (special x y))
     (assert (= (funcall fn) 2))))
+
+;;; Incorrect LIST type declaration, reported and patched by Teemu
+;;; Kalvas: end testing is done "as if by atom" so this is supposed
+;;; to work.
+(assert (equal '(1 2) (loop for (a . b) on '(1 2 . 3)  collect a)))
index e3184bc..7ce3498 100644 (file)
   (assert (string= (princ-to-string #\7)
                   (write-to-string #\7 :escape nil :readably nil))))
 
+;;; in FORMAT, ~^ inside ~:{ should go to the next case, not break
+;;; iteration, even if one argument is just a one-element list.
+(assert (string= (format nil "~:{~A~^~}" '((A) (C D))) "AC"))
+
 ;;; success
 (quit :unix-status 104)
index 56c5052..3da2fce 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.14.9"
+"0.8.14.10"