New feature: signal a style-warning on most failures to inline.
commit065577617c4af5b9ae8a9d2b7cde3585482f0c01
authorDouglas Katzman <dougk@google.com>
Fri, 5 Dec 2014 02:29:08 +0000 (4 21:29 -0500)
committerDouglas Katzman <dougk@google.com>
Fri, 5 Dec 2014 02:40:51 +0000 (4 21:40 -0500)
tree3786c171d33ffcc3a8c6770be1228a2c0e52cfdb
parent5891d567eab1e9cd34304c419f718f26fe1f5ce2
New feature: signal a style-warning on most failures to inline.

This is a further enhancement to the full-call detector.
Among the inlining failures that won't be signaled:

- (MAPfoo #'FN x) or a quantifier (SOME, etc) in which, had the
  function been defined earlier, the compiler could have inlined,
  whereas since #'FN is a reference and not onstensibly a call,
  it does not get counted as a missed opportunity to inline.

- almost anything in build systems that enforce dependencies by not
  giving you visibility to any file except explicitly stated requisites
  *and* that create a fresh Lisp image for each step.
  At least two build systems isolate compilations as such,
  one being Fare's XCVB, the other an in-house complicated beast.
  False negatives result from the fact that the file which performs
  DECLAIM INLINE is (usually) the one that should warn, but if you
  neither compile nor load that file, then nothing knows simultaneously
  that there should not have been a full call and that there was.
  To remedy this would mean propagating codegen status across Lisp images
  by either a hideous hack involving cfasls, or a new artifact file.

But good ol' ASDF should not exhibit many false negatives.

INLINING-DEPENDENCY-FAILURE is the new condition class, the message
for which appears in a few variants (see new tests). It isn't yet
exported from SB-EXT as this code is still slightly experimental.

Meta-compile of SBCL is now expectedly much more warning-prone :-(
12 files changed:
NEWS
contrib/sb-aclrepl/inspect.lisp
contrib/sb-bsd-sockets/name-service.lisp
contrib/sb-introspect/introspect.lisp
package-data-list.lisp-expr
src/code/condition.lisp
src/code/cross-condition.lisp
src/compiler/ir1report.lisp
src/compiler/ir2tran.lisp
src/compiler/proclaim.lisp
tests/compiler.impure.lisp
tests/style-warnings.impure.lisp [new file with mode: 0644]