0.8.3.6:
authorAlexey Dejneka <adejneka@comail.ru>
Wed, 27 Aug 2003 06:49:16 +0000 (06:49 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Wed, 27 Aug 2003 06:49:16 +0000 (06:49 +0000)
        * Fix bug 278b: remove second return value of
          VALUES-TYPE-INTERSECTION (it is not any worse than
          TYPE-INTERSECTION).

BUGS
NEWS
src/code/late-type.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index fd1d7b0..3bd05e6 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -360,6 +360,8 @@ WORKAROUND:
   your pre-0.7.0 state of grace with
     #+sbcl (declaim (notinline find position find-if position-if)) ; bug 117..
 
+  (see also bug 279)
+
 118:
    as reported by Eric Marsden on cmucl-imp@cons.org 2001-08-14:
      (= (FLOAT 1 DOUBLE-FLOAT-EPSILON)
@@ -1116,6 +1118,7 @@ WORKAROUND:
   uses generic arithmetic.
 
   b. For the example above, the compiler does not issue a note.
+     (fixed in 0.8.3.6, but a test case would be good)
 
 279: type propagation error -- correctly inferred type goes astray?
   In sbcl-0.8.3 and sbcl-0.8.1.47, the warning
@@ -1140,6 +1143,8 @@ WORKAROUND:
         (declare (type (integer 1 100) abs-foo))
         (print abs-foo)))
 
+ (see also bug 117)
+
 280: bogus WARNING about duplicate function definition 
   In sbcl-0.8.3 and sbcl-0.8.1.47, if BS.MIN is defined inline,
   e.g. by 
diff --git a/NEWS b/NEWS
index 33c0c57..59d5bdf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2011,6 +2011,8 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
   * optimization: restored some effective method precomputation in
     CLOS (turned off by an ANSI fix in sbcl-0.8.3); the amount of
     precomputation is now tunable.
+  * bug fix: in some situations compiler did not report usage of
+    generic arithmetic in (SPEED 3) policy.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 4e16fbb..da4f37f 100644 (file)
 
 (defun-cached (values-type-intersection :hash-function type-cache-hash
                                        :hash-bits 8
-                                       :values 2
-                                       :default (values nil :empty)
+                                       :default (values nil)
                                        :init-wrapper !cold-init-forms)
     ((type1 eq) (type2 eq))
   (declare (type ctype type1 type2))
-  (cond ((eq type1 *wild-type*) (values (coerce-to-values type2) t))
+  (cond ((eq type1 *wild-type*)
+         (coerce-to-values type2))
         ((or (eq type2 *wild-type*) (eq type2 *universal-type*))
-         (values type1 t))
+         type1)
         ((or (eq type1 *empty-type*) (eq type2 *empty-type*))
          *empty-type*)
         ((and (not (values-type-p type2))
               (values-type-required type1))
          (let ((req1 (values-type-required type1)))
-         (make-values-type :required (cons (type-intersection (first req1) type2)
-                                           (rest req1))
-                           :optional (values-type-optional type1)
-                           :rest (values-type-rest type1)
-                           :allowp (values-type-allowp type1))))
+           (make-values-type :required (cons (type-intersection (first req1) type2)
+                                             (rest req1))
+                             :optional (values-type-optional type1)
+                             :rest (values-type-rest type1)
+                             :allowp (values-type-allowp type1))))
         (t
-         (values-type-op type1 (coerce-to-values type2)
-                         #'type-intersection
-                         #'max))))
+         (values (values-type-op type1 (coerce-to-values type2)
+                                 #'type-intersection
+                                 #'max)))))
 
 ;;; This is like TYPES-EQUAL-OR-INTERSECT, except that it sort of
 ;;; works on VALUES types. Note that due to the semantics of
         ((or (eq type1 *wild-type*) (eq type2 *wild-type*))
          (values t t))
        (t
-        (multiple-value-bind (res win) (values-type-intersection type1 type2)
+        (let ((res (values-type-intersection type1 type2)))
           (values (not (eq res *empty-type*))
-                  win)))))
+                  t)))))
 
 ;;; a SUBTYPEP-like operation that can be used on any types, including
 ;;; VALUES types
index 82b1e2b..9805867 100644 (file)
                          (loop for i from 1 to (the (integer -17 10) n) by 2
                                collect (when (> (random 10) 5)
                                          (the ,type (- i 11)))))))))
+
+;;; bug 278b
+;;;
+;;; We suppose that INTEGER arithmetic cannot be efficient, and the
+;;; compiler has an optimized VOP for +; so this code should cause an
+;;; efficiency note.
+(assert (eq (handler-case
+                (compile nil '(lambda (i)
+                               (declare (optimize speed))
+                               (declare (type integer i))
+                               (+ i 2)))
+              (sb-ext:compiler-note (c) (return :good)))
+            :good))
index 0fe153f..189488d 100644 (file)
@@ -16,4 +16,4 @@
 ;;; with something arbitrary in the fourth field, is used for CVS
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
-"0.8.3.5"
+"0.8.3.6"