From 1d881f74d4c2c6099107544a5f337837eb281865 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sat, 24 Mar 2012 14:00:08 +0000 Subject: [PATCH] Fixup fewer complaints about hairy lexical environments In particular, if the function has been requested NOTINLINE, and that name has never been INLINE or MAYBE-INLINE, there should be no compiler note. Include a test case and a NEWS entry for posterity. --- NEWS | 2 ++ src/code/defboot.lisp | 7 +++---- tests/compiler.test.sh | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 6a2e7f2..39dbb6c 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ changes relative to sbcl-1.0.55: * enhancements ** SBCL can now be built using Clang. * bug fix: compiler errors when weakening hairy integer types. (lp#913232) + * bug fix: don't complain about a too-hairy lexical environment for inlining + when the function has never been requested for inlining. (lp#963530) changes in sbcl-1.0.55 relative to sbcl-1.0.54: * enhancements to building SBCL using make.sh: diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 778a7ab..2285b4f 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -152,7 +152,8 @@ evaluated as a PROGN." (defun inline-fun-name-p (name) (or ;; the normal reason for saving the inline expansion - (info :function :inlinep name) + (let ((inlinep (info :function :inlinep name))) + (member inlinep '(:inline :maybe-inline))) ;; another reason for saving the inline expansion: If the ;; ANSI-recommended idiom ;; (DECLAIM (INLINE FOO)) @@ -181,10 +182,8 @@ evaluated as a PROGN." (lambda `(lambda ,@lambda-guts)) #-sb-xc-host (named-lambda `(named-lambda ,name ,@lambda-guts)) - (inline-type (inline-fun-name-p name)) (inline-lambda - (when (and inline-type - (neq inline-type :notinline)) + (when (inline-fun-name-p name) ;; we want to attempt to inline, so complain if we can't (or (sb!c:maybe-inline-syntactic-closure lambda env) (progn diff --git a/tests/compiler.test.sh b/tests/compiler.test.sh index 447505c..f2921ef 100644 --- a/tests/compiler.test.sh +++ b/tests/compiler.test.sh @@ -504,5 +504,14 @@ cat > $tmpfilename < $tmpfilename <