[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cl-byte-compile-compiler-macro
From: |
Stefan Monnier |
Subject: |
Re: cl-byte-compile-compiler-macro |
Date: |
Sun, 26 Mar 2006 21:07:45 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> However, grepping for cl-byte-compile-compiler-macro in all *.elc
>> files yields this result:
>>
>> I agree it is suspicious. On the other hand, it occurs to me that
>> maybe it is not a bug--maybe this is how defstruct accessor macros
>> are implemented. Could that be it?
> The symbol is only used as a constant.
AFAIK the symbol is a used as a symbol property. It tells the byte-compiler
that a function call to the function bound to the corresponding symbol can
be optimized in some cases and that the way to optimize it to to pass it to
the cl-byte-compile-compiler-macro property value (it's a so-called
"compiler macro").
It's used for example to turn a call to (list* a b c) into (cons a (cons
b c)), i.e. in this case a mix of inlining and unrolling.
And yes, it's quite likely that defstruct accessors define compiler macros
(I believe that CL's defsubst* are implemented using this same mechanism).
Stefan
- cl-byte-compile-compiler-macro, Kim F. Storm, 2006/03/23
- Re: cl-byte-compile-compiler-macro, Glenn Morris, 2006/03/23
- Re: cl-byte-compile-compiler-macro, Richard Stallman, 2006/03/24
- Re: cl-byte-compile-compiler-macro, Glenn Morris, 2006/03/24
- Re: cl-byte-compile-compiler-macro, Richard Stallman, 2006/03/25
- Re: cl-byte-compile-compiler-macro, Kim F. Storm, 2006/03/25
- Re: cl-byte-compile-compiler-macro, Richard Stallman, 2006/03/26
- Re: cl-byte-compile-compiler-macro, Andreas Schwab, 2006/03/26
- Re: cl-byte-compile-compiler-macro,
Stefan Monnier <=
- Re: cl-byte-compile-compiler-macro, Andreas Schwab, 2006/03/27
- Re: cl-byte-compile-compiler-macro, Richard Stallman, 2006/03/27
- Re: cl-byte-compile-compiler-macro, Andreas Schwab, 2006/03/27
- Re: cl-byte-compile-compiler-macro, Richard Stallman, 2006/03/28
- Re: cl-byte-compile-compiler-macro, Glenn Morris, 2006/03/28
- Re: cl-byte-compile-compiler-macro, Glenn Morris, 2006/03/27
- Re: cl-byte-compile-compiler-macro, Andreas Schwab, 2006/03/27
- Re: cl-byte-compile-compiler-macro, Glenn Morris, 2006/03/28