digitalmars.D.bugs - [Issue 3793] New: Functions with static arrays as arguments are not inlined
- d-bugmail puremagic.com (35/35) Feb 11 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3793
- d-bugmail puremagic.com (11/11) Jun 09 2010 http://d.puremagic.com/issues/show_bug.cgi?id=3793
http://d.puremagic.com/issues/show_bug.cgi?id=3793
Summary: Functions with static arrays as arguments are not
inlined
Product: D
Version: 2.041
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: eriatarka84 gmail.com
Was just browsing through some front end code and found this bit of code in
canInline() in inline.c:
/* If any parameters are Tsarray's (which are passed by reference)
* or out parameters (also passed by reference), don't do inlining.
*/
if (parameters)
{
for (int i = 0; i < parameters->dim; i++)
{
VarDeclaration *v = (VarDeclaration *)parameters->data[i];
if (v->isOut() || v->isRef() || v->type->toBasetype()->ty == Tsarray)
goto Lno;
}
}
The comment, as far as I can see, is obsolete since static arrays are now value
types? Perhaps this restriction can be lifted now? Especially for functions on
small vectors, I would expect inlining to be very beneficial.
Just putting this here to have it not overlooked.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 11 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3793
Clemens <eriatarka84 gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Seems to have been fixed in Changeset [497].
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 09 2010








d-bugmail puremagic.com