Type-check HANDLER-BIND more strictly, optimize condition handling a bit.
commit26330fddd684ca004aee82360d1916b910950c57
authorDouglas Katzman <dougk@google.com>
Tue, 4 Aug 2015 00:55:44 +0000 (3 20:55 -0400)
committerDouglas Katzman <dougk@google.com>
Tue, 4 Aug 2015 02:09:25 +0000 (3 22:09 -0400)
tree526ac5f1d109fedee7038eacaab68836953bd80a
parent7a230269623b4af21c02384e1ddcfd69d1e39ac9
Type-check HANDLER-BIND more strictly, optimize condition handling a bit.

Handlers which are global functions (system or user-defined) no longer
require a freshly allocated cons cell to establish a binding.
In the best case, any number of handlers are established using only
1 cell because the whole cluster of handlers is a load-time constant
which can be consed onto the *handler-clusters* chain.

Each type test is stored as its classoid rather than a local function
when possible, since ultimately TYPEP will usually need the classoid.
This reduces code size by removing umpteen lambdas for (TYPEP X 'ERROR)
and is at least as fast as funcalling a predicate, possibly faster.

And also generate an "undefined function" warning for
  (HANDLER-BIND (((SATISFIES NOT-DEFINED-FUN) #'action)) ..)
NEWS
src/code/cold-error.lisp
src/code/defboot.lisp
src/code/target-error.lisp
tests/condition.impure.lisp
tests/condition.pure.lisp