X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-type.lisp;h=13e3368efd11a934662439c48d64fafdc9b8fb1c;hb=4255b37e50876702d2563f3418a44a3f5bf8a2e8;hp=34b5f0d9f435372216dc1b22ceee9369d5f2c724;hpb=dbe82b489260b2ef76e916d0aeaee8b3850f5f52;p=sbcl.git diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index 34b5f0d..13e3368 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -1731,7 +1731,7 @@ (eql low high) (eql (numeric-type-complexp type) :real) (member (numeric-type-class type) '(integer rational - #!-sb-xc-host float))) + #-sb-xc-host float))) (values t (numeric-type-low type)) (values nil nil)))) @@ -2403,14 +2403,8 @@ used for a COMPLEX component.~:@>" (values nil t)) ((or (unknown-type-p (array-type-element-type type1)) (unknown-type-p (array-type-element-type type2))) - (multiple-value-bind (equalp certainp) - (type= (array-type-element-type type1) - (array-type-element-type type2)) - ;; By its nature, the call to TYPE= should never return - ;; NIL, T, as we don't know what the UNKNOWN-TYPE will grow - ;; up to be. -- CSR, 2002-08-19 - (aver (not (and (not equalp) certainp))) - (values equalp certainp))) + (type= (array-type-element-type type1) + (array-type-element-type type2))) (t (values (type= (array-type-specialized-element-type type1) (array-type-specialized-element-type type2)) @@ -2909,11 +2903,12 @@ used for a COMPLEX component.~:@>" :high (if (null (numeric-type-high type1)) nil (list (1+ (numeric-type-high type1))))))) - (type-union type1 - (apply #'type-intersection - (remove (specifier-type '(not integer)) - (intersection-type-types type2) - :test #'type=)))) + (let* ((intersected (intersection-type-types type2)) + (remaining (remove (specifier-type '(not integer)) + intersected + :test #'type=))) + (and (not (equal intersected remaining)) + (type-union type1 (apply #'type-intersection remaining))))) (t (let ((accumulator *universal-type*)) (do ((t2s (intersection-type-types type2) (cdr t2s)))