From 4d58eac755342319f7a25391606fed86541e5fef Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 10 Jun 2004 16:32:46 +0000 Subject: [PATCH] 0.8.11.7: Less noise from the compiler ... Remove :IMPORTANT T from %COERCE-CALLABLE-TO-FUN transform, so that it complains about uncertain type only with (OPTIMIZE SPEED). ... Test. --- NEWS | 3 +++ src/compiler/ir1-translators.lisp | 3 +-- tests/compiler.pure.lisp | 13 +++++++++++++ version.lisp-expr | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 5ba9e90..48a1e79 100644 --- a/NEWS +++ b/NEWS @@ -2522,6 +2522,9 @@ changes in sbcl-0.8.12 relative to sbcl-0.8.11: * 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. + * the compiler no longer emits efficiency notes for (FUNCALL X) + when the type of X is uncertain under default optimization + settings. * fixed bugs 45d and 118: DOUBLE-FLOAT[-NEGATIVE]-EPSILON now exhibit the required behaviour on the x86 platform. (thanks to Peter van Eynde, Eric Marsden and Bruno Haible) diff --git a/src/compiler/ir1-translators.lisp b/src/compiler/ir1-translators.lisp index eb93a2e..3c65f27 100644 --- a/src/compiler/ir1-translators.lisp +++ b/src/compiler/ir1-translators.lisp @@ -479,8 +479,7 @@ `(%funcall ,function ,@args) (values nil t))) -(deftransform %coerce-callable-to-fun ((thing) (function) * - :important t) +(deftransform %coerce-callable-to-fun ((thing) (function) *) "optimize away possible call to FDEFINITION at runtime" 'thing) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 28b3242..234c9b1 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1372,3 +1372,16 @@ (progn (if (ldb-test (byte 0 0) (rational (throw 'ct7 0))) 0 0) 0)))) 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")) diff --git a/version.lisp-expr b/version.lisp-expr index 0501bdf..bfce415 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.6" +"0.8.11.7" -- 1.7.10.4