[armedbear-devel] Compiler macros vs source transforms

Erik Huelsmann ehuels at gmail.com
Sun Jul 12 10:15:27 UTC 2009


While reading through precompiler.lisp, I noticed we have 3 concepts
for transformation of lisp sources

* normal macros,
* compiler-macros,
* source-transforms

The difference between macros and compiler-macros is well documented
in the CLHS; however, the difference between compiler-macros and
source-transforms is unclear to me. I found that the former is
expanded in compiler-pass1 while the latter is expanded in
precompiler.lisp. However, when we're compiling for interpretation
(not compilation), *in-jvm-compile* is NIL, meaning that
source-transforms don't get expanded.

The net effect would be that both source-transforms and
compiler-macros only get expanded when we're compiling. I'm wondering
what the benefit of source transforms is if this is really true.


Bye,

Erik.




More information about the armedbear-devel mailing list