From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rgm@gnu.org, "Kim F. Storm" <storm@cua.dk>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: cl-byte-compile-compiler-macro
Date: Sun, 26 Mar 2006 21:07:45 -0500 [thread overview]
Message-ID: <87ek0olk4t.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <je1wwpmh4b.fsf@sykes.suse.de> (Andreas Schwab's message of "Sun, 26 Mar 2006 16:10:28 +0200")
>> 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
next prev parent reply other threads:[~2006-03-27 2:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 21:02 cl-byte-compile-compiler-macro Kim F. Storm
2006-03-23 23:52 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-24 23:25 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-25 2:52 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 9:43 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 14:20 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-28 6:39 ` cl-byte-compile-compiler-macro Glenn Morris
2006-03-25 15:26 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-25 20:55 ` cl-byte-compile-compiler-macro Kim F. Storm
2006-03-26 11:21 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-26 14:10 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-27 2:07 ` Stefan Monnier [this message]
2006-03-27 9:34 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-27 22:29 ` cl-byte-compile-compiler-macro Richard Stallman
2006-03-27 23:44 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-03-28 19:33 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-04 19:57 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-04 20:37 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-05 3:47 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-05 9:27 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-05 13:04 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 19:06 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-05 19:32 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 19:39 ` cl-byte-compile-compiler-macro David Kastrup
2006-04-05 20:12 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-06 3:58 ` cl-byte-compile-compiler-macro Richard Stallman
2006-04-08 15:09 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-04-05 21:23 ` cl-byte-compile-compiler-macro Andreas Schwab
2006-04-04 20:50 ` cl-byte-compile-compiler-macro Stefan Monnier
2006-03-28 6:52 ` cl-byte-compile-compiler-macro Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ek0olk4t.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rgm@gnu.org \
--cc=rms@gnu.org \
--cc=storm@cua.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).