X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-type.lisp;h=699271225315364359be4c2ab164a3ab70d19c40;hb=6a9bbe6f36179cee92001a1f9ed5ff38be512644;hp=799d6e9cb794c39a2c2fe9b72b4b942fcfcb23c7;hpb=2ead789c809434cafe7bed188c6de2670177614e;p=sbcl.git diff --git a/src/code/late-type.lisp b/src/code/late-type.lisp index 799d6e9..6992712 100644 --- a/src/code/late-type.lisp +++ b/src/code/late-type.lisp @@ -307,6 +307,10 @@ ((csubtypep type1 (specifier-type 'function)) nil) (t :call-other-method))) (!define-type-method (function :complex-union2) (type1 type2) + (declare (ignore type2)) + ;; TYPE2 is a FUNCTION type. If TYPE1 is a classoid type naming + ;; FUNCTION, then it is the union of the two; otherwise, there is no + ;; special union. (cond ((type= type1 (specifier-type 'function)) type1) (t nil))) @@ -1031,11 +1035,6 @@ (!define-type-class named) -(defvar *wild-type*) -(defvar *empty-type*) -(defvar *universal-type*) -(defvar *universal-fun-type*) - (!cold-init-forms (macrolet ((frob (name var) `(progn @@ -1223,7 +1222,9 @@ (negation-type-type x)) (!define-type-method (negation :unparse) (x) - `(not ,(type-specifier (negation-type-type x)))) + (if (type= (negation-type-type x) (specifier-type 'cons)) + 'atom + `(not ,(type-specifier (negation-type-type x))))) (!define-type-method (negation :simple-subtypep) (type1 type2) (csubtypep (negation-type-type type2) (negation-type-type type1))) @@ -2092,7 +2093,7 @@ (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, + ;; 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))) @@ -2108,7 +2109,7 @@ (!define-type-method (array :negate) (type) ;; FIXME (and hint to PFD): we're vulnerable here to attacks of the ;; form "are (AND ARRAY (NOT (ARRAY T))) and (OR (ARRAY BIT) (ARRAY - ;; NIL) (ARRAY CHAR) ...) equivalent? -- CSR, 2003-12-10 + ;; NIL) (ARRAY CHAR) ...) equivalent?" -- CSR, 2003-12-10 (make-negation-type :type type)) (!define-type-method (array :unparse) (type)