X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1opt.lisp;h=dc6769b6abfaa28e1d994eb05ae5ae8d29a0a6d8;hb=de3bfc084239fa962ef001eaa68e5b6f4b9bbf81;hp=7d4fdd2d274ff0936272a070752d124d082c2189;hpb=d90c8a75da90925a51a587f7bd4d9c494256f68a;p=sbcl.git diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index 7d4fdd2..dc6769b 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -166,7 +166,14 @@ :specialized-element-type (array-type-specialized-element-type type)) ;; Simple arrays cannot change at all. type)) + ((union-type-p type) + ;; Conservative union type is an union of conservative types. + (let ((res *empty-type*)) + (dolist (part (union-type-types type) res) + (setf res (type-union res (conservative-type part)))))) (t + ;; Catch-all. + ;; ;; If the type contains some CONS types, the conservative type contains all ;; of them. (when (types-equal-or-intersect type (specifier-type 'cons))