X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-introspect%2Fintrospect.lisp;h=3a683e7c66628203674171dbc41f8bd9e6b8eb37;hb=17b58770189ea2427f7fc13e76a73ff543d58b03;hp=3af8709faece462e29b2dda29ebdb096f7eb5442;hpb=e57523089c7ad0ce2c874c03ecfe721d299efbfb;p=sbcl.git diff --git a/contrib/sb-introspect/introspect.lisp b/contrib/sb-introspect/introspect.lisp index 3af8709..3a683e7 100644 --- a/contrib/sb-introspect/introspect.lisp +++ b/contrib/sb-introspect/introspect.lisp @@ -124,6 +124,30 @@ FBOUNDP." ;; is. (description nil :type list)) +(defun vop-sources-from-fun-templates (name) + (let ((fun-info (sb-int:info :function :info name))) + (when fun-info + (loop for vop in (sb-c::fun-info-templates fun-info) + for source = (find-definition-source + (sb-c::vop-info-generator-function vop)) + do (setf (definition-source-description source) + (list (sb-c::template-name vop) + (sb-c::template-note vop))) + collect source)))) + +(defun find-vop-source (name) + (let* ((templates (vop-sources-from-fun-templates name)) + (vop (gethash name sb-c::*backend-template-names*)) + (source (and vop + (find-definition-source + (sb-c::vop-info-generator-function vop))))) + (when source + (setf (definition-source-description source) + (list name))) + (if source + (cons source templates) + templates))) + (defun find-definition-sources-by-name (name type) "Returns a list of DEFINITION-SOURCEs for the objects of type TYPE defined with name NAME. NAME may be a symbol or a extended function @@ -288,15 +312,7 @@ If an unsupported TYPE is requested, the function will return NIL. source))))))) ((:vop) (when (symbolp name) - (let ((fun-info (sb-int:info :function :info name))) - (when fun-info - (loop for vop in (sb-c::fun-info-templates fun-info) - for source = (find-definition-source - (sb-c::vop-info-generator-function vop)) - do (setf (definition-source-description source) - (list (sb-c::template-name vop) - (sb-c::template-note vop))) - collect source))))) + (find-vop-source name))) ((:source-transform) (when (symbolp name) (let ((transform-fun (sb-int:info :function :source-transform name))) @@ -1029,8 +1045,6 @@ Experimental: interface subject to change." (case (sb-kernel:widetag-of object) (#.sb-vm::value-cell-header-widetag (call (sb-kernel::value-cell-ref object))) - #+(and sb-lutex sb-thread) - (#.sb-vm::lutex-widetag) (t (warn "~&MAP-ROOT: Unknown widetag ~S: ~S~%" (sb-kernel:widetag-of object) object)))))))