On Tue, Jun 5, 2012 at 2:30 PM, Mark Evenson evenson@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!
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