<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Luís Oliveira wrote:
<blockquote
cite="mid:AANLkTimrpWzDdw6S=H2VFBzVDoF3k5dQHUGrX1ixeO3v@mail.gmail.com"
type="cite">
<pre wrap="">On Tue, Sep 7, 2010 at 11:15 PM, Daniel Weinreb <a class="moz-txt-link-rfc2396E" href="mailto:dlw@itasoftware.com"><dlw@itasoftware.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">What happens if you do
(defun foo (x)
(plus x 3))
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
Have you tried it? CCL gets very unhappy!<br>
<br>
<blockquote
cite="mid:AANLkTimrpWzDdw6S=H2VFBzVDoF3k5dQHUGrX1ixeO3v@mail.gmail.com"
type="cite">
<pre wrap="">Since (constantp 'x) yields nil, the compiler macro will bail out.</pre>
</blockquote>
Yeah, you'd think.<br>
<br>
Maybe I made a mistake.<br>
<blockquote
cite="mid:AANLkTimrpWzDdw6S=H2VFBzVDoF3k5dQHUGrX1ixeO3v@mail.gmail.com"
type="cite">
<pre wrap=""> I
suppose a smarter version could perform some optimizations when only
one of the arguments is constant.
On a related note, I just came across this SBCL effort
<a class="moz-txt-link-rfc2396E" href="https://bugs.launchpad.net/sbcl/+bug/632368"><https://bugs.launchpad.net/sbcl/+bug/632368></a> which has the potential
to make compiler macros significantly more powerful by handing forms
over only after they've been through the compiler's inlining and
constant propagation phases!
</pre>
</blockquote>
</body>
</html>