21 ;; reference *a*, set *a*, bind *a*
64 (defvar *b
* (or (xref/2) a
)))
69 ;; call xref/2 twice (not three times)
77 ;; Methods work, even ones with lots of arguments.
78 (defmethod xref/10 (a b c d e f g h
(i fixnum
))
81 ;; Separate methods are indeed separate
82 (defmethod xref/11 ((a fixnum
))
86 (defmethod xref/11 ((a float
))
90 (declaim (inline inline
/1))
95 (eval-when (:compile-toplevel
:load-toplevel
)
98 ;; Counts as calling xref/2
102 ;; Doesn't count as calling xref/3, or referring to +z+ / *a*
105 ;; calling a function in a macro body
112 (defun macro-use/1 ()
115 ;; expanding a macro in an flet/labels
116 (defun macro-use/2 ()
117 (flet ((inner-flet ()
121 ;; expanding a macro in an toplevel flet/labels
122 (flet ((outer-flet ()
124 (defun macro-use/3 ()
127 ;; expanding a macro in an inlined flet/labels
128 (defun macro-use/4 ()
129 (flet ((inner-flet ()
131 (declare (inline inner-flet
))
134 (declaim (inline inline
/2))
138 ;; Inlining inline/3 doesn't count as macroexpanding macro/1
139 (defun macro-use/5 ()
142 ;;; Code in the macrolet definition bodies is currently not considered
143 ;;; at all for XREF. Maybe it should be, but it's slightly tricky to
153 (macrolet ((inner-m ()
157 ;;; Test references to / from compiler-macros