DIP56 Provide pragma to control function inlining

Tove tove at fransson.se
Sun Feb 23 04:25:40 PST 2014


On Sunday, 23 February 2014 at 12:07:40 UTC, Walter Bright wrote:
> http://wiki.dlang.org/DIP56
>
> Manu has needed always inlining, and I've needed never 
> inlining. This DIP proposes a simple solution.

yay, all for it! The DIP should probably specify what happens if 
inlining fails, i.e. generate a compilation error.

Could we consider adding "flatten" in the same dip?

quote from gcc
"Flatten
Generally, inlining into a function is limited. For a function 
marked with this attribute, every call inside this function is 
inlined, if possible. Whether the function itself is considered 
for inlining depends on its size and the current inlining 
parameters. "


More information about the Digitalmars-d mailing list