1.0.43.16: compiler: Fix non-unicode build.
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sun, 3 Oct 2010 14:50:53 +0000 (14:50 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sun, 3 Oct 2010 14:50:53 +0000 (14:50 +0000)
  * Building #-sb-unicode has been broken since 1.0.36.15, due
to a bug in the then-new element type handling for unions of
array types.

  * The value originally selected as a sentinel value for not
having processed any of the types in a union was *empty-type*,
which is also the element-type of (array nil (*)), also known
as a subtype of string.

  * Simple-string is a union type of (array nil (*)), (array
character (*)), and simple-base-string on sb-unicode targets.
It is a union type of (array nil (*)) and simple-base-string
on non-unicode targets.

  * Because the (array nil (*)) came first in the list of
types in the union, and because its element-type was
*empty-type*, the sentinel value, it was ignored when
computing the overall array element type.

  * Because the character and base-char types are disjoint,
the overall array element type calculation came up with the
correct answer on unicode builds.

  * To correct the problem, select a sentinel value that is
not a type object: NIL.

  * From IRC, this morning:
[9:40] * nikodemus hates (array nil)
[9:40] <nikodemus> and it hates me right back

NEWS
src/compiler/array-tran.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 75b3db0..2034447 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ changes relative to sbcl-1.0.43:
     ** bug fix: build now works on cygwin with GCC 4.x installed. (thanks to
        Kalyanov Dmitry)
     ** bug fix: run-sbcl.sh now works on Cygwin. (thanks to Kalyanov Dmitry)
+  * bug fix: non-unicode builds no longer fail (broken since 1.0.36.15).
 
 changes in sbcl-1.0.43 relative to sbcl-1.0.42:
   * incompatible change: FD-STREAMS no longer participate in the serve-event
index efa768b..75b11b9 100644 (file)
@@ -73,7 +73,7 @@
                  (apply #'type-intersection element-supertypes)))))
     (union-type
      (let ((union-types (union-type-types type))
-           (element-type *empty-type*)
+           (element-type nil)
            (element-supertypes nil))
        (dolist (union-type union-types)
          (multiple-value-bind (cur-type cur-supertype)
@@ -81,7 +81,7 @@
            (cond
              ((eq element-type *wild-type*)
               nil)
-             ((eq element-type *empty-type*)
+             ((eq element-type nil)
               (setf element-type cur-type))
              ((or (eq cur-type *wild-type*)
                   ;; If each of the two following tests fail, it is not
index 5145eea..9da58fa 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.43.15"
+"1.0.43.16"