Lisp HUG Maillist Archive

Re: sys:defun-and-inline



Edi Weitz <edi@weitz.de> wrote:


Hi Camille,

I know about the INLINE declaration.  However, it says there that "no
conforming implementation is required to perform inline expansion of
user-defined functions" and it seemed to me that LW didn't always do
what I wanted.  But after writing my email I tried again with DECLAIM
and it suddenly (...) worked.  (In other words, I probably had
confused myself somehow.)

Still, it'd be interesting to know what DEFUN-AND-INLINE is good for.

Thanks,
Edi.


On Fri, Dec 28, 2012 at 9:11 PM, Camille Troillard
<camille@osculator.net> wrote:
> Hello Edi,
>
>
> On 28 déc. 2012, at 20:42, Edi Weitz <edi@weitz.de> wrote:
>
>> I could never quite figure out how to convince the compiler to inline
>> my own functions.  I've searched the manuals for all mentions of the
>> word "inline" but couldn't find anything that helped.
>>
>> However, in 7.5 of the User Guide and Reference Manual I saw the
>> symbol DEFUN-AND-INLINE and indeed using this instead of DEFUN seems
>> to do what I want.
>>
>> Now, the symbol is exported but not documented.  Is it safe to use?
>> Does it really do what I expect or will it destroy the dishwasher
>> behind my back?
>
> You might already be aware of this feature of Common Lisp, but I take my chance.
> You could use the inline declaration:
> http://www.lispworks.com/documentation/lw50/CLHS/Body/d_inline.htm
>
> Isn't that what you were looking for?
>
>
> All the best,
> Camille
>

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2805 / Virus Database: 2637/5964 - Release Date: 12/16/12
Internal Virus Database is out of date.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:36 UTC