X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-introspect%2Fintrospect.lisp;h=f4041fdb2ec00f001df675b53856d62e3fc12de1;hb=315285fcf8bf1f7e732da307cfaf31f18f412811;hp=3a683e7c66628203674171dbc41f8bd9e6b8eb37;hpb=17b58770189ea2427f7fc13e76a73ff543d58b03;p=sbcl.git diff --git a/contrib/sb-introspect/introspect.lisp b/contrib/sb-introspect/introspect.lisp index 3a683e7..f4041fd 100644 --- a/contrib/sb-introspect/introspect.lisp +++ b/contrib/sb-introspect/introspect.lisp @@ -42,7 +42,6 @@ "DEFINITION-SOURCE-CHARACTER-OFFSET" "DEFINITION-SOURCE-FILE-WRITE-DATE" "DEFINITION-SOURCE-PLIST" - "DEFINITION-NOT-FOUND" "DEFINITION-NAME" "FIND-FUNCTION-CALLEES" "FIND-FUNCTION-CALLERS" "MAP-ROOT" @@ -246,9 +245,9 @@ If an unsupported TYPE is requested, the function will return NIL. (let ((expander (or (sb-int:info :setf :inverse name) (sb-int:info :setf :expander name)))) (when expander - (sb-introspect:find-definition-source (if (symbolp expander) - (symbol-function expander) - expander))))) + (find-definition-source (if (symbolp expander) + (symbol-function expander) + expander))))) ((:structure) (let ((class (get-class name))) (if class @@ -296,20 +295,22 @@ If an unsupported TYPE is requested, the function will return NIL. (list note))) collect source))))) ((:optimizer) - (when (symbolp name) - (let ((fun-info (sb-int:info :function :info name))) - (when fun-info - (let ((otypes '((sb-c::fun-info-derive-type . sb-c:derive-type) - (sb-c::fun-info-ltn-annotate . sb-c:ltn-annotate) - (sb-c::fun-info-ltn-annotate . sb-c:ltn-annotate) - (sb-c::fun-info-optimizer . sb-c:optimizer)))) - (loop for (reader . name) in otypes - for fn = (funcall reader fun-info) - when fn collect - (let ((source (find-definition-source fn))) - (setf (definition-source-description source) - (list name)) - source))))))) + (let ((fun-info (and (symbolp name) + (sb-int:info :function :info name)))) + (when fun-info + (let ((otypes '((sb-c:fun-info-derive-type . sb-c:derive-type) + (sb-c:fun-info-ltn-annotate . sb-c:ltn-annotate) + (sb-c:fun-info-optimizer . sb-c:optimizer) + (sb-c:fun-info-ir2-convert . sb-c:ir2-convert) + (sb-c::fun-info-stack-allocate-result + . sb-c::stack-allocate-result)))) + (loop for (reader . name) in otypes + for fn = (funcall reader fun-info) + when fn collect + (let ((source (find-definition-source fn))) + (setf (definition-source-description source) + (list name)) + source)))))) ((:vop) (when (symbolp name) (find-vop-source name))) @@ -317,7 +318,7 @@ If an unsupported TYPE is requested, the function will return NIL. (when (symbolp name) (let ((transform-fun (sb-int:info :function :source-transform name))) (when transform-fun - (sb-introspect:find-definition-source transform-fun))))) + (find-definition-source transform-fun))))) (t nil))))) @@ -611,8 +612,7 @@ list of the symbols :dynamic, :static, or :read-only." (lambda (obj header size) (when (= sb-vm:code-header-widetag header) (funcall fn obj size))) - space - t))) + space))) (declaim (inline map-caller-code-components)) (defun map-caller-code-components (function spaces fn)