X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-type.lisp;h=1b395f1830bda6c792b813412e607f5eb1e038dc;hb=a6a12ed609d5467ec43b411283e5b3568fee81df;hp=ec513da4c6f09e9e9b1fd8e7241c8ace44b43162;hpb=4084b6b95c1d5e0a45e073a9b875d8471efd8505;p=sbcl.git diff --git a/src/code/early-type.lisp b/src/code/early-type.lisp index ec513da..1b395f1 100644 --- a/src/code/early-type.lisp +++ b/src/code/early-type.lisp @@ -134,8 +134,14 @@ (:include args-type (class-info (type-class-or-lose 'values))) (:constructor %make-values-type) + (:predicate %values-type-p) (:copier nil))) +(declaim (inline value-type-p)) +(defun values-type-p (x) + (or (eq x *wild-type*) + (%values-type-p x))) + (defun-cached (make-values-type-cached :hash-bits 8 :hash-function (lambda (req opt rest allowp) @@ -547,6 +553,10 @@ (cond ((and (not (eq spec u)) (info :type :builtin spec))) + ((and (consp spec) (symbolp (car spec)) + (info :type :builtin (car spec)) + (let ((expander (info :type :expander (car spec)))) + (and expander (values-specifier-type (funcall expander spec)))))) ((eq (info :type :kind spec) :instance) (find-classoid spec)) ((typep spec 'classoid) @@ -615,6 +625,9 @@ expansion happened." (values nil nil)) ((symbolp spec) (values (info :type :expander spec) (list spec))) + ((and (consp spec) (symbolp (car spec)) (info :type :builtin (car spec))) + ;; see above + (values nil nil)) ((and (consp spec) (symbolp (car spec))) (values (info :type :expander (car spec)) spec)) (t nil)))