[slime-devel] SLIME+sbcl: list-callees, list-callers on macros

Anton Kovalenko anton at sw4me.com
Wed Aug 25 21:16:22 UTC 2010


Hello SLIME developers,

When slime-list-callees is attempted on symbol naming a macro,
swank-sbcl implementation (based on SB-INTROSPECT) generates the
following condition:

 The value of sb-introspect::code is #<unknown pointer object,
 widetag=#x5D {1003543DFF}>, which is not of type
 sb-kernel:code-component.

Though (FDEFINITION)'s value for macros in SBCL _is_ FUNCTIONP,
it's apparently a wrong kind of function for SB-INTROSPECT.

After redefining LIST-CALLEES to use symbol's MACRO-FUNCTION in
preference to FDEFINITION, I've got a desired behavior (listing callees
of macrofunction seems to be a reasonable reaction, and that's what I
want, anyway). Just in case someone finds it useful -- patch is
attached.

One more thing that I found convenient is redirecting LIST-CALLERS for
symbols with macro-functions to WHO-MACROEXPANDS (also included in the
patch).

-- 
Regards, Anton Kovalenko
+7(916)345-34-02 | Elektrostal' MO, Russia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-sbcl-macro-xref.patch
Type: text/x-diff
Size: 848 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20100826/1308fc60/attachment.patch>


More information about the slime-devel mailing list