X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-introspect%2Fintrospect.lisp;h=2bfcc683efc1dc587623286d321f87b0c37cd8d3;hb=1c7203e529734f7abcf908e1c3fb0ef5970cc570;hp=f0312845f06e4500542c0b9b8893661de15679ed;hpb=0593a8eb81492752c5dcca29a4ddbdfe2956f132;p=sbcl.git diff --git a/contrib/sb-introspect/introspect.lisp b/contrib/sb-introspect/introspect.lisp index f031284..2bfcc68 100644 --- a/contrib/sb-introspect/introspect.lisp +++ b/contrib/sb-introspect/introspect.lisp @@ -451,7 +451,19 @@ function designator." "Returns the lambda list of TYPESPEC-OPERATOR as first return value, and a flag whether the arglist could be found as second value." - (sb-int:info :type :lambda-list typespec-operator)) + (check-type typespec-operator symbol) + (case (sb-int:info :type :kind typespec-operator) + (:defined + (sb-int:info :type :lambda-list typespec-operator)) + (:primitive + (let ((translator-fun (sb-int:info :type :translator typespec-operator))) + (if translator-fun + (values (sb-kernel:%fun-lambda-list translator-fun) t) + ;; Some builtin types (e.g. STRING) do not have a + ;; translator, but they were actually defined via DEFTYPE + ;; in src/code/deftypes-for-target.lisp. + (sb-int:info :type :lambda-list typespec-operator)))) + (t (values nil nil)))) (defun struct-accessor-structure-class (function) (let ((self (sb-vm::%simple-fun-self function)))