[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue MACRO-CACHING, version 2
- To: firstname.lastname@example.org
- Subject: Re: issue MACRO-CACHING, version 2
- From: masinter.pa@Xerox.COM
- Date: 14 Mar 89 06:51 PST
- Cc: masinter.pa@Xerox.COM
- In-reply-to: email@example.com (Sandra J Loosemore)'s message of Mon, 13 Mar 89 09:47:38 -0700
I think we would be better off just deprecating *MACROEXPAND-HOOK* or
removing the suggestions that it might be used for caching macro expansions
and just suggesting that it might be used for "debugging" purposes. Most of
the rest of this belongs in an "implementation note" or something, rather
than in the "spec" for *MACROEXPAND-HOOK*, doesn't it?
In fact, when I did macro caching for Xerox Common Lisp, I found that I had
to not do caching when there were any COMPILER-LETs in force, too.
The guard was:
Don't cache if you're not in the interpreter
(e.g., a "code-walk" or a "compiler" environment)
Don't cache if there are any macros/functions
Don't cache if inside a COMPILER-LET.
*Any* redefinition of any function or variable clears the cache.
This is still a heuristic, of course, since there are legitimate ways of
changing something that a macro-expansion depends on that won't get