Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30261/src/compiler
Modified Files:
typetran.lisp
Log Message:
1.0.3.5: slightly different SEQUENCE type handling.
The UNION TYPE= issue affects type derivation as in
(defun foo (x)
(declare (type (simple-array character) x))
(subseq x 1 2))
where the system fails to derive that the intersection of
consed-sequence and (simple-array character) is distinct from
consed-sequence. Change SEQUENCE to be an explicit union of
LIST, VECTOR and an EXTENDED-SEQUENCE named type, defining
appropriate type methods, and the symptom (but not the cause)
goes away.
(Note: it may well be that the EXTENDED-SEQUENCE named type
disappears again, to be replaced by an actual protocol class
similar to FUNDAMENTAL-STREAM for Gray streams, for reasons of
future extensibility and ease of compatibility with other Lisps.
Waiting for ILC feedback...)
Index: typetran.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/typetran.lisp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- typetran.lisp 6 Feb 2007 06:12:07 -0000 1.55
+++ typetran.lisp 28 Feb 2007 16:06:02 -0000 1.56
@@ -137,6 +137,7 @@
(define-type-predicate rationalp rational)
(define-type-predicate realp real)
(define-type-predicate sequencep sequence)
+ (define-type-predicate extended-sequence-p extended-sequence)
(define-type-predicate simple-bit-vector-p simple-bit-vector)
(define-type-predicate simple-string-p simple-string)
(define-type-predicate simple-vector-p simple-vector)
|