<html>
<head>
<base href="http://bugzilla.gdcproject.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:art.08.09@gmail.com" title="art.08.09@gmail.com">art.08.09@gmail.com</a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Inlining certain trivial function fails"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=140">bug 140</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>art.08.09@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Inlining certain trivial function fails"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=140#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Inlining certain trivial function fails"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=140">bug 140</a>
from <span class="vcard"><a class="email" href="mailto:art.08.09@gmail.com" title="art.08.09@gmail.com">art.08.09@gmail.com</a>
</span></b>
<pre>(In reply to Johannes Pfau from <a href="show_bug.cgi?id=140#c1">comment #1</a>)
<span class="quote">> Try to add @attribute("forceinline") to the failing function (you might have
> to copy std.algorith to some other file, name it xtd.algorithm or
> something), then compiling should fail with some error message and you can
> use dustmite to reduce the test case.</span >
Well, that results in basically the same testcase and a stripped-down std.array
with just the necessary primitives.
But after adding the always_inline attribute I at least got a little more
informative diagnostic:
std/algorithm.d: In member function 'pure nothrow @property @safe bool
xstd.algorithm.__T12FilterResultS633std10functional36__T8unaryFunVAyaa8_612e6c656e677468Z8unaryFunTAAyaZ.FilterResult.empty()':
std/array.d:408: error: inlining failed in call to always_inline 'pure nothrow
@property @safe bool
xstd.array.empty!(immutable(char)[]).empty(const(immutable(char)[][]))':
mismatched arguments
std/algorithm.d:1449: error: called from here
If I call std.array.empty /directly/ then there is no problem and `empty` is
properly inlined. The problem appears only when calling it via eg
std.algorithm.FilterResult.empty...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>