1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
10 (in-package :sb-introspect-test
/xref
)
12 (defmacro define-xref-test
(name form result
)
14 (sort (mapcar #'first
,form
) #'string
< :key
#'princ-to-string
)
15 ,(sort (copy-list result
) #'string
< :key
#'princ-to-string
)))
17 (define-xref-test who-calls
.1
20 (define-xref-test who-calls
.2
24 (define-xref-test who-calls
.3
28 (define-xref-test who-calls
.4
35 (sb-pcl::fast-method xref
/10 (t t t t t t t t fixnum
))
36 (sb-pcl::fast-method xref
/11 (fixnum))
37 (sb-pcl::fast-method xref
/11 ((eql z
)))))
39 (define-xref-test who-calls
.5
41 (inline/1 (sb-pcl::fast-method xref
/11 (float))))
43 (define-xref-test who-calls
.6
47 (define-xref-test who-calls
.7
51 (define-xref-test who-calls
.8
55 (define-xref-test who-calls
.9
59 (define-xref-test who-calls
.10
63 (define-xref-test who-calls
.11
66 (define-xref-test who-calls
.12
70 (define-xref-test who-calls
.13
74 (define-xref-test who-calls
.14
78 (define-xref-test who-calls
.15
85 (define-xref-test who-calls
.16
89 (define-xref-test who-calls
.17
90 (who-calls 'called-by-traced-fun
)
94 (define-xref-test who-calls
.18
95 (who-calls 'called-by-interpreted-fun
)
99 (define-xref-test who-macroexpands
.1
100 (who-macroexpands 'macro
/1)
108 (define-xref-test who-binds
.1
113 (define-xref-test who-sets
.1
117 (define-xref-test who-sets
.2
118 (who-sets '**global
**)
121 (define-xref-test who-references
.1
122 (who-references '*a
*)
123 (xref/1 xref
/2 xref
/4 inline
/1 xref
/14))
125 (define-xref-test who-references
.2
126 (who-references '+z
+)
129 (define-xref-test who-references
.3
130 (who-references '**global
**)
133 (define-xref-test who-calls.struct-slot
.1
134 (who-calls 'struct-slot
)
137 (define-xref-test who-calls.cmacro
.1
142 (define-xref-test who-specializes-directly
.1
143 (who-specializes-directly 'a-class
)
147 (define-xref-test who-specializes-directly
.2
148 (who-specializes-directly 'a-structure
)
152 (define-xref-test who-specializes-generally
.1
153 (who-specializes-generally 'a-class
)
158 (define-xref-test who-specializes-generally
.2
159 (who-specializes-generally 'a-structure
)