[Issue 3490] DMD Never Inlines Functions that Could Throw
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 12 07:55:10 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=3490
Nick Sabalausky <cbkbbejeap at mailinator.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cbkbbejeap at mailinator.com
--- Comment #5 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2014-03-12 07:54:51 PDT ---
While DMD still doesn't inline functions that (directly) contain a "throw"
statement, the original poster's issues with std.range and emplace have largely
been addressed several versions ago (at least as far back as 2.060, maybe
more):
- Many uses of enforce in std.range, such as the ones in Take, have been
replaced by asserts.
- Functions like Take.popFront() and Take.front() are inlined (likely due to
the switch to assert).
- Some of the enforce functions (except for errnoEnforce and the enforce that
takes a lazy Throwable as a param) are inlineable because they don't use
"throw" directly. Instead, they call the private helper "bailOut" which does
the actual throwing. The "bailOut" function isn't inlineable, but that
shouldn't be a problem since it only gets called when the condition fails.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list