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 ;; last node of block should also be taken into account
112 ;; calling a function in a macro body
119 (defun macro-use/1 ()
122 ;; expanding a macro in an flet/labels
123 (defun macro-use/2 ()
124 (flet ((inner-flet ()
128 ;; expanding a macro in an toplevel flet/labels
129 (flet ((outer-flet ()
131 (defun macro-use/3 ()
134 ;; expanding a macro in an inlined flet/labels
135 (defun macro-use/4 ()
136 (flet ((inner-flet ()
138 (declare (inline inner-flet))
141 (declaim (inline inline/2))
145 ;; Inlining inline/3 doesn't count as macroexpanding macro/1
146 (defun macro-use/5 ()
149 ;;; Code in the macrolet definition bodies is currently not considered
150 ;;; at all for XREF. Maybe it should be, but it's slightly tricky to
160 (macrolet ((inner-m ()
164 ;;; Test references to / from compiler-macros