projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.pre7.14:
[sbcl.git]
/
src
/
code
/
describe.lisp
diff --git
a/src/code/describe.lisp
b/src/code/describe.lisp
index
1b6f0f2
..
fc7bb94
100644
(file)
--- a/
src/code/describe.lisp
+++ b/
src/code/describe.lisp
@@
-135,6
+135,7
@@
;;; Interpreted function describing; handles both closure and
;;; non-closure functions. Instead of printing the compiled-from info,
;;; we print the definition.
;;; Interpreted function describing; handles both closure and
;;; non-closure functions. Instead of printing the compiled-from info,
;;; we print the definition.
+#+sb-interpreter
(defun %describe-function-interpreted (x s kind name)
(declare (type stream s))
(multiple-value-bind (exp closure-p dname)
(defun %describe-function-interpreted (x s kind name)
(declare (type stream s))
(multiple-value-bind (exp closure-p dname)
@@
-256,6
+257,7
@@
(let ((data (byte-closure-data x)))
(dotimes (i (length data))
(format s "~@:_~S: ~S" i (svref data i))))))
(let ((data (byte-closure-data x)))
(dotimes (i (length data))
(format s "~@:_~S: ~S" i (svref data i))))))
+ #+sb-interpreter
(sb-eval:interpreted-function
(%describe-function-interpreted x s kind name))
(standard-generic-function
(sb-eval:interpreted-function
(%describe-function-interpreted x s kind name))
(standard-generic-function
@@
-326,7
+328,7
@@
(%describe-function (fdefinition x) s :function x)))
;; FIXME: Print out other stuff from the INFO database:
(%describe-function (fdefinition x) s :function x)))
;; FIXME: Print out other stuff from the INFO database:
- ;; * Does it name a type or class?
+ ;; * Does it name a type?
;; * Is it a structure accessor? (This is important since those are
;; magical in some ways, e.g. blasting the structure if you
;; redefine them.)
;; * Is it a structure accessor? (This is important since those are
;; magical in some ways, e.g. blasting the structure if you
;; redefine them.)
@@
-335,8
+337,15
@@
(%describe-doc x s 'structure "Structure")
(%describe-doc x s 'type "Type")
(%describe-doc x s 'setf "Setf macro")
(%describe-doc x s 'structure "Structure")
(%describe-doc x s 'type "Type")
(%describe-doc x s 'setf "Setf macro")
+
(dolist (assoc (info :random-documentation :stuff x))
(format s
"~@:_Documentation on the ~(~A~):~@:_~A"
(car assoc)
(dolist (assoc (info :random-documentation :stuff x))
(format s
"~@:_Documentation on the ~(~A~):~@:_~A"
(car assoc)
- (cdr assoc))))
+ (cdr assoc)))
+
+ ;; Describe the associated class, if any.
+ (let ((symbol-named-class (cl:find-class x nil)))
+ (when symbol-named-class
+ (format t "~&It names a class ~A." symbol-named-class)
+ (describe symbol-named-class))))