[Ecls-list] remarks on git HEAD, 1b808f229076..

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri May 7 21:10:26 UTC 2010


On Fri, May 7, 2010 at 11:00 PM, Tobias C. Rittweiler <tcr at freebits.de>wrote:

>
> * the compiler macros for aref and aset seem to have debugging stuff
>  left.
>

I know, it is waiting in my hard disk due to an interrupted commit. I will
upload it when I solve the problems.


> * with-clean-symbols is broken.. source code is not necessarily a tree,
>  so trying to use sublis on it is not enough.
>  Isn't with-clean-symbol just with-unique-symbols?
>

The purpose of this macro is not to be of general use. It is a simple hack
that avoids using gensym / gentemp every time a macro is expanded and it
does so only in the body of the macro.

(defmacro blah-blah (...)
 ...
            (with-clean-symbols (%array-index)
              `(let ((%array-index ,index))
                 (declare (:read-only %array-index))
                 ,(expansion a '%array-index))))
)

this rewrites the inner body replacing %array-index with an uninterned
symbol making the resulting expansion hygienic or "clean" in the sense that
it will never collide with user's symbols. The body is always a tree or at
least the places where we want to substitute the symbols are, and again,
this is just for use in the compiler where I know that there will be no
circular structures and nothing complicated, not a general tool.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100507/284ec68a/attachment.html>


More information about the ecl-devel mailing list