From 1217810e750e3e6b04641309fb8475eb5963e35e Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 16 Jun 2004 13:21:36 +0000 Subject: [PATCH] 0.8.11.13: OK, OK, you (the hordes of complaining users) win. ... no more optimization notes in default compilation policy. --- NEWS | 5 +++++ src/compiler/array-tran.lisp | 1 - src/compiler/generic/vm-tran.lisp | 8 +++----- src/compiler/seqtran.lisp | 15 +++++---------- tests/compiler.pure.lisp | 33 +++++++++++++++++++++------------ version.lisp-expr | 2 +- 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/NEWS b/NEWS index 48a1e79..f7e4284 100644 --- 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. diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 3d6448a..970c92d 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -638,7 +638,6 @@ ;; 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" diff --git a/src/compiler/generic/vm-tran.lisp b/src/compiler/generic/vm-tran.lisp index d843d1c..baf07fc 100644 --- a/src/compiler/generic/vm-tran.lisp +++ b/src/compiler/generic/vm-tran.lisp @@ -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))) @@ -103,8 +103,7 @@ (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))) @@ -153,8 +152,7 @@ (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 diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index f13cd2e..8b0215a 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -822,8 +822,7 @@ `(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) @@ -869,8 +868,7 @@ (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 @@ -963,8 +961,7 @@ (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 @@ -973,8 +970,7 @@ (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 @@ -983,8 +979,7 @@ (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 diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 234c9b1..e6d6518 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1373,15 +1373,24 @@ 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))) diff --git a/version.lisp-expr b/version.lisp-expr index 2673bee..a8072d3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4