allow approximating unions of numeric types
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 18 Nov 2010 11:28:46 +0000 (11:28 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 18 Nov 2010 11:28:46 +0000 (11:28 +0000)
commitdbe82b489260b2ef76e916d0aeaee8b3850f5f52
tree0cda97c9eb0413168346e78e5475a04a83a3af5d
parent0aad674c39f58185115708b9312e2ef9ec980e4d
allow approximating unions of numeric types

 * Binding *APPROXIMATE-NUMERIC-UNIONS* does that. It must be bound
   only by callers of TYPE-UNION that know what they want -- in general

     (OR (INTEGER 1 2) (INTEGER 3 4)) => (INTEGER 1 4)

   is wrong, as (NOT (INTEGER 1 4)) doesn't include 3. But in special cases
   like deriving the return type of a function it can be done.

 * Rename MAKE-CANONICAL-UNION-TYPE MAKE-DERIVED-UNION-TYPE, and bind *A-N-U*
   there if we start accumulating an overly large union of numeric types.
   Definition of "overly large" can be adjusted via
   *DERIVED-NUMERIC-UNION-COMPLEXITY-LIMIT*.

 * Fixes lp#309448 and the recent compiler performance regression due
   to new CONCATENATE deftransform as reported on sbcl-devel.
NEWS
package-data-list.lisp-expr
src/code/late-type.lisp
src/compiler/srctran.lisp
tests/compiler.pure.lisp
version.lisp-expr