0.8.11.13:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 16 Jun 2004 13:21:36 +0000 (13:21 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 16 Jun 2004 13:21:36 +0000 (13:21 +0000)
OK, OK, you (the hordes of complaining users) win.
... no more optimization notes in default compilation policy.

NEWS
src/compiler/array-tran.lisp
src/compiler/generic/vm-tran.lisp
src/compiler/seqtran.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 48a1e79..f7e4284 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2519,6 +2519,11 @@ changes in sbcl-0.8.11 relative to sbcl-0.8.10:
        print using #P"..." syntax.
 
 changes in sbcl-0.8.12 relative to sbcl-0.8.11:
+  * minor incompatible change: the system no longer provides
+    optimization hints (conditions which are TYPEP
+    SB-EXT:COMPILER-NOTE) for conforming code in default compilation
+    mode; these hints are emitted when higher SPEED optimization is
+    requested, as before.
   * the behaviour of the standard function ED is now customizeable by
     third parties through a hook variable: see ED's documentation
     string for information on the protocol.
index 3d6448a..970c92d 100644 (file)
                                ;; WHN, and also CSR 2002-05-26
                                ((or vector simple-array) index (or index null))
                                *
-                               :important t
                                :node node
                                :policy (> speed space))
   "inline non-SIMPLE-vector-handling logic"
index d843d1c..baf07fc 100644 (file)
@@ -50,7 +50,7 @@
          ((simple-array character (*)) (data-vector-ref string index))
          ((simple-array nil (*)) (data-vector-ref string index))))))
 
-(deftransform hairy-data-vector-ref ((array index) (array t) * :important t)
+(deftransform hairy-data-vector-ref ((array index) (array t) *)
   "avoid runtime dispatch on array element type"
   (let ((element-ctype (extract-upgraded-element-type array))
        (declared-element-ctype (extract-declared-element-type array)))
 
 (deftransform hairy-data-vector-set ((array index new-value)
                                     (array t t)
-                                    *
-                                    :important t)
+                                    *)
   "avoid runtime dispatch on array element type"
   (let ((element-ctype (extract-upgraded-element-type array))
        (declared-element-ctype (extract-declared-element-type array)))
 
 (deftransform %data-vector-and-index ((%array %index)
                                      (simple-array t)
-                                     *
-                                     :important t)
+                                     *)
   ;; KLUDGE: why the percent signs?  Well, ARRAY and INDEX are
   ;; respectively exported from the CL and SB!INT packages, which
   ;; means that they're visible to all sorts of things.  If the
index f13cd2e..8b0215a 100644 (file)
             `(deftransform ,name ((predicate sequence from-end start end key)
                                   (function list t t t function)
                                   *
-                                  :policy (> speed space)
-                                  :important t)
+                                  :policy (> speed space))
                "expand inline"
                `(let ((index 0)
                       (find nil)
 (deftransform %find-position ((item sequence from-end start end key test)
                              (t list t t t t t)
                              *
-                             :policy (> speed space)
-                             :important t)
+                             :policy (> speed space))
   "expand inline"
   '(%find-position-if (let ((test-fun (%coerce-callable-to-fun test)))
                        ;; The order of arguments for asymmetric tests
 (deftransform %find-position-if ((predicate sequence from-end start end key)
                                 (function vector t t t function)
                                 *
-                                :policy (> speed space)
-                                :important t)
+                                :policy (> speed space))
   "expand inline"
   (check-inlineability-of-find-position-if sequence from-end)
   '(%find-position-if-vector-macro predicate sequence
 (deftransform %find-position-if-not ((predicate sequence from-end start end key)
                                     (function vector t t t function)
                                     *
-                                    :policy (> speed space)
-                                    :important t)
+                                    :policy (> speed space))
   "expand inline"
   (check-inlineability-of-find-position-if sequence from-end)
   '(%find-position-if-not-vector-macro predicate sequence
 (deftransform %find-position ((item sequence from-end start end key test)
                              (t vector t t t function function)
                              *
-                             :policy (> speed space)
-                             :important t)
+                             :policy (> speed space))
   "expand inline"
   (check-inlineability-of-find-position-if sequence from-end)
   '(%find-position-vector-macro item sequence
index 234c9b1..e6d6518 100644 (file)
         0 0))))
    391833530 -32785211)))
 
-;;; Efficiency notes for FUNCALL
-(handler-case
-    (compile nil '(lambda (x) (funcall x)))
-  (sb-ext:compiler-note (e)
-    (error "bogus compiler note: ~S." e)))
-
-(catch :got-note
-  (handler-case
-      (compile nil '(lambda (x) (declare (optimize speed)) (funcall x)))
-    (sb-ext:compiler-note (e)
-      (throw :got-note nil)))
-  (error "missing compiler note for FUNCALL"))
+;;; efficiency notes for ordinary code
+(macrolet ((frob (arglist &body body)
+            `(progn
+              (handler-case
+                  (compile nil '(lambda ,arglist ,@body))
+                (sb-ext:compiler-note (e)
+                  (error "bad compiler note for ~S:~%  ~A" ',body e)))
+              (catch :got-note
+                (handler-case
+                    (compile nil '(lambda ,arglist (declare (optimize speed))
+                                   ,@body))
+                  (sb-ext:compiler-note (e) (throw :got-note nil)))
+                (error "missing compiler note for ~S" ',body)))))
+  (frob (x) (funcall x))
+  (frob (x y) (find x y))
+  (frob (x y) (find-if x y))
+  (frob (x y) (find-if-not x y))
+  (frob (x y) (position x y))
+  (frob (x y) (position-if x y))
+  (frob (x y) (position-if-not x y))
+  (frob (x) (aref x 0)))
index 2673bee..a8072d3 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.11.12"
+"0.8.11.13"