[armedbear-devel] Stack overflow when compiler macro with fallback is triggered

Alessio Stalla alessiostalla at gmail.com
Tue Jun 5 12:41:33 UTC 2012

On Tue, Jun 5, 2012 at 2:30 PM, Mark Evenson <evenson at panix.com> wrote:
> On Jun 3, 2012, at 22:19 , James M. Lawrence wrote:
>> (eval-when (:compile-toplevel :load-toplevel :execute)
>>  (defun foo () 99)
>>  (define-compiler-macro foo ()
>>    `(locally (declare (notinline foo))
>>       (foo))))
>> (defun call-foo ()
>>  (foo))
>> Of course, the use case is a compiler macro that says, "OK, let's
>> optimize! ... Never mind, I don't want to optimize that."
> Filed [as ticket #214][1]; thanks for the report!
> [1]: http://trac.common-lisp.net/armedbear/ticket/214

Shouldn't &whole be used for that? The CLHS says [1] (emphasis mine):
"Unlike an ordinary macro, a compiler macro can decline to provide an
expansion merely by returning a form that is __the same as the
original__ (which can be obtained by using &whole)."

> By the way, [lparallel][2] is looking real sweet!  I'm looking
> forward to find some time to use it to optimize ABCL's usage of
> Bordeaux-Threads.

Agreed on lparallel :)

[1] http://clhs.lisp.se/Body/m_define.htm

Some gratuitous spam:

http://ripple-project.org Ripple, social credit system
http://villages.cc Villages.cc, Ripple-powered community economy
http://common-lisp.net/project/armedbear ABCL, Common Lisp on the JVM
http://code.google.com/p/tapulli my current open source projects
http://www.manydesigns.com/ ManyDesigns Portofino, open source
model-driven Java web application framework

More information about the armedbear-devel mailing list