[pro] Meaning of "inline" when applied to a generic function?
Hans Hübner
hans.huebner at gmail.com
Thu Jul 10 16:20:22 UTC 2014
Jean-Claude,
you can expect your compiler to ignore your "inline" declaration. Or do
something else with it. It is just a hint. [1]
A sufficiently smart compiler might use compile-time type inference to find
a method matching some set of argument types and then replace the function
invocation by the body of that method. To me, it appears to be
questionable whether such a smart compiler would depend on inline
declarations.
I am just a user, though, and maybe one of the compiler writers on this
list want to add some of the fine points surrounding this :)
-Hans
[1] http://clhs.lisp.se/Body/d_inline.htm
2014-07-10 0:00 GMT+02:00 Jean-Claude Beaudoin <
jean.claude.beaudoin at gmail.com>:
> Hello CL pros,
>
> I am trying to figure out the meaning of the inline declaration when the
> so qualified function happens to be a generic function. As in:
>
> (declaim (inline foo))
> (defgeneric foo (a b))
>
> What can be expected of a compiler when it then faces a call to foo while
> the above is in effect?
>
> Is this an obvious no-op or did some find something useful to do in such a
> context?
>
> Thanks for your help,
>
> JCB
>
>
> _______________________________________________
> pro mailing list
> pro at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/pro
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20140710/bbc86f91/attachment.html>
More information about the pro
mailing list