DMD producing huge binaries

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon May 23 12:40:02 PDT 2016


On 5/23/16 3:03 PM, Steven Schveighoffer wrote:
> On 5/22/16 5:42 PM, Andrei Alexandrescu wrote:
>> On 05/21/2016 03:13 PM, Kagamin wrote:
>>> On Saturday, 21 May 2016 at 18:18:21 UTC, Andrei Alexandrescu wrote:
>>>> He said that that won't happen any longer, the growth was because of
>>>> the return type. Is that correct?
>>>
>>> https://issues.dlang.org/show_bug.cgi?id=15831#c4
>>> Looks like growth is due to the fact that the voldemort type is in the
>>> scope of a function and function is fun!(T).fun(T) - hence each level
>>> multiplies by 2. And return type is not part of the mangled name already
>>> - that would cause circular dependency, you would need the voldemort
>>> type mangling to generate it.
>>
>> Just to make sure I understand: do you agree or disagree that there's no
>> more exponential growth if we encode "auto return" in the mangling? Thx!
>> -- Andrei
>
> Not sure if someone has definitively answered before, but no, this does
> not. I think this would shrink the growth from 3^n to 2^n.
>

To clarify, I think this is still a good idea, but only if the type is 
defined internally (no reason to repeat the entire function signature of 
the function you are defining). But if you specify auto return and 
return int, it should still be mangled as returning int.

-Steve


More information about the Digitalmars-d mailing list