[Ecls-list] compiler-macro: spurious parameter reference?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sun Aug 29 18:09:27 UTC 2010


On Sun, Aug 29, 2010 at 6:37 PM, Pascal J. Bourguignon <
pjb at informatimago.com> wrote:

> When compiling a compiler macro, the &whole form seems to be referenced
> even if it is not


This actually happens with all macros. Macros destructure forms: they always
get the whole form to be parsed in a &whole variable and only by inspecting
this list can they gather the values of their arguments.

The current code uses the name of the variable given by the user to store
the form that is then parsed to assign values for each of the macro
arguments.

So, in the end, the &whole variable is always referenced, but this happens
way before it reaches the code supplied by the user.

I supposed I could complicate the macroexpansion adding yet another LET form
with a &whole variable that is only seen by the user, but it does not seem
so urgent.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100829/55d9cf17/attachment.html>


More information about the ecl-devel mailing list