From 7f4500fe420ded77f7103d8200951a0cb569fe7d Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Tue, 14 Apr 2015 21:28:52 +0300 Subject: [PATCH] Restore locating of ir1 translators. Add a new type for SB-INTROSPECT:FIND-DEFINITION-SOURCES-BY-NAME, :ir1-convert. Instead of using the guard function, which now is the same closure for everything, use the translator function fetched by (sb-int:info :function :ir1-convert name) --- contrib/sb-introspect/introspect.lisp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/contrib/sb-introspect/introspect.lisp b/contrib/sb-introspect/introspect.lisp index 5863f6a38..9380808e8 100644 --- a/contrib/sb-introspect/introspect.lisp +++ b/contrib/sb-introspect/introspect.lisp @@ -215,6 +215,7 @@ name. Type can currently be one of the following: :SOURCE-TRANSFORM :TRANSFORM :VOP + :IR1-CONVERT If an unsupported TYPE is requested, the function will return NIL. " @@ -254,11 +255,16 @@ If an unsupported TYPE is requested, the function will return NIL. ((:compiler-macro) (when (compiler-macro-function name) (find-definition-source (compiler-macro-function name)))) + (:ir1-convert + (let ((converter (sb-int:info :function :ir1-convert name))) + (and converter + (find-definition-source converter)))) ((:function :generic-function) (when (and (fboundp name) - (or (not (symbolp name)) - (not (macro-function name)) - (special-operator-p name))) + (or (consp name) + (and + (not (macro-function name)) + (not (special-operator-p name))))) (let ((fun (real-fdefinition name))) (when (eq (not (typep fun 'generic-function)) (not (eq type :generic-function))) -- 2.11.4.GIT