On Feb 24, 2014 1:15 AM, "Andrei Alexandrescu" <SeeWebsiteForEmail@erdani.org> wrote:
>
> On 2/23/14, 4:07 AM, 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.
>
>
> This makes inlining dependent on previously-seen code. Would that make parallel compilation more difficult?
>
> I've always thought the obvious/simple way would be an attribute such as @forceinline and @noinline that applies to individual functions.
>
>
> Andrei
>
GDC already has both of these as a compiler extended attribute (need to document these!!!)
import gcc.attribute;
@attribute("forceinline") ...
Being backend attributes, you can't enforce that these attributes actually take effect in user code (no static asserts!) - but you have some guarantee in that the backend will complain if it can't apply the attribute - this is good because the compiler will always produce a better diagnostic than some user static assert, always.
Regards
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';