1.0.30.19: optimize (COERCE X 'VECTOR) as well
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 30 Jul 2009 11:37:12 +0000 (11:37 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 30 Jul 2009 11:37:12 +0000 (11:37 +0000)
NEWS
src/compiler/typetran.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 9ee33af..3071cb2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ changes relative to sbcl-1.0.30:
   * new feature: experimental :EMIT-CFASL parameter to COMPILE-FILE can
     be used to output toplevel compile-time effects into a separate .CFASL
     file.
-  * optimization: COERCE to STRING, SIMPLE-STRING and recognizable
+  * optimization: COERCE to VECTOR, STRING, SIMPLE-STRING and recognizable
     one-dimenstional subtypes of ARRAY is upto 70% faster when the coercion is
     actually needed.
   * optimization: division of floating point numbers by constants uses
index eb23711..06d7b07 100644 (file)
               `(if (typep x ',tval)
                    x
                    (replace (make-array (length x) :element-type 'character) x)))
+             ;; Special case VECTOR
+             ((eq tval 'vector)
+              `(if (vectorp x)
+                   x
+                   (replace (make-array (length x)) x)))
              ;; Handle specialized element types for 1D arrays.
              ((csubtypep tspec (specifier-type '(array * (*))))
               ;; Can we avoid checking for dimension issues like (COERCE FOO
index ff6c301..41de5f1 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.30.18"
+"1.0.30.19"