http://d.puremagic.com/issues/show_bug.cgi?id=10848



--- Comment #7 from Kenji Hara <k.hara...@gmail.com> 2013-08-20 08:25:20 PDT ---
(In reply to comment #6)
> Can you give an example of where the compiler is unable to inline code?
> I don't see why any single function with the source available shouldn't
> technically be inlinable. If you're writing a function that's more like a 
> macro
> (but not a mixin, ie, shouldn't pollute/interfere with containing scope), it
> may be useful... but yes, sure it's generally true that when code gets too
> large, there becomes very few compelling reasons to inline.

Yes, theoretically such an immediately called lambda would be able to be
inlined always. But, if the compiler does not have any inlining feature,
inlining would fail.

AFAIK, current D spec does not have any mention about inlining. Today it is
always compiler implementation-specific feature. Therefore spec should not
*guarantee* the generated code quality.

> That's why I'd suggest the keyword should be '*force*inline'; this suggests 
> the
> programmer deliberately made the request, and knows exactly what they're 
> doing.

Explicit "forceinline" code annotation is completely irrelevant topic.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to