December 5th, 2006

xref support in SBCL

Juho Snellman has committed an xref system to SBCL, and made a corresponding update to SLIME to support the new functionality.

xref is a cross referencing system for the code you have compiled and loaded. It tracks where constants and specials are referenced, where macros are macroexpanded, and where functions are called. With that information, you can ask your running system questions like "What functions call FOO:BAR?" and "Where is WITH-FROB macroexpanded?"

There's a portable xref facility, and for a time it was used for SBCL in slime, but it was disabled and I don't recall why.

Juho's xref is fast and small enough that it has been enabled by default. It can be turned off by setting the SPACE optimization to 3.

I've never actually used a Lisp with xref support in SLIME before. I can understand the conceptual usage, but can anyone tell me the sorts of things they find themselves using xref for in their daily workflow?