[Issue 10848] Compiler should always try to inlining a direct lambda call
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 19 19:38:30 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10848
--- Comment #2 from hsteoh at quickfur.ath.cx 2013-08-19 19:38:26 PDT ---
It would be nice if this also applied to opApply that basically uses a single
loop:
class C {
int opApply(scope void delegate(ref T iter) dg) {
setupLoop(); // some simple setup code
foreach (e; getInternalData()) {
auto ret = dg(e);
if (ret) return ret;
}
cleanupLoop(); // some simple cleanup code
}
}
void main() {
auto c = new C;
foreach (e; c) {
// opApply really should just be inlined here.
}
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list