System programming in D (Was: The God Language)

so so at so.so
Fri Dec 30 07:06:56 PST 2011


On Fri, 30 Dec 2011 14:00:06 +0200, Vladimir Panteleev  
<vladimir at thecybershadow.net> wrote:

> On Friday, 30 December 2011 at 09:13:05 UTC, Walter Bright wrote:
>> Also, if you are tweaking at such a level, every compiler is different  
>> enough that your tweaks are likely to be counterproductive on another  
>> compiler. Having a portable syntax for such tweaking is not going to  
>> help.
>
> Which is exactly why I think an inlining pragma/attribute should provide  
> a guarantee, and not a hint. It's a web of assumptions/guarantees: asm  
> blocks provide their guarantees, but using them introduces new  
> assumptions, that e.g. force-inlining solidifies, etc.

I agree @inline (which will probably be an extension) in D should mean  
force-inline.

Ignoring the impossible-to-inline cases (which in time should get better),  
adding @inline is a few minutes of editing.
It will just bypass the cost function and if it is not possible to inline,  
pop error. I don't have enough knowledge of DMD internals
so i am not sure if should go do it, or maybe i need to start somewhere...


More information about the Digitalmars-d mailing list