Thread overview
[Issue 20773] Excessive calls to postblit when passing structs over varargs
Apr 26, 2020
Iain Buclaw
Apr 26, 2020
kinke
Dec 17, 2022
Iain Buclaw
April 26, 2020
https://issues.dlang.org/show_bug.cgi?id=20773

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Considering this a druntime bug.  However I think the proper fix would also involve a compiler change as well.

e.g: In the druntime implementation:

static if (!__traits(isPOD, T))
{
   // Passed by reference...
}
else
{
   // Passed by value...
}

This requires the compiler to pass the objects by invisible reference in the first place.

--
April 26, 2020
https://issues.dlang.org/show_bug.cgi?id=20773

kinke <kinke@gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kinke@gmx.net

--- Comment #2 from kinke <kinke@gmx.net> ---
(In reply to Iain Buclaw from comment #0)
> Postblit called 6 times

Which is correct - 3 argument copies + 3 copies returned by va_arg. Unless va_arg is supposed to return a *moved* instance of the original argument.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=20773

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 07
https://issues.dlang.org/show_bug.cgi?id=20773

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17186

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--