[Issue 14758] TypeInfo causes excessive binary bloat

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 13 02:17:09 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=14758

Iain Buclaw <ibuclaw at gdcproject.org> changed:

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

--- Comment #16 from Iain Buclaw <ibuclaw at gdcproject.org> ---
(In reply to Mike from comment #15)
> Just tested this with LDC 1.0.0 (frontend 2.070.2), and the dead code is
> still in the binary.  The DMD generated binary looks good, but the LDC
> binary is still bloated with dead code.  I'm assuming the change made by
> Walter in Comment 9 only affected the DMD backend.
> 
> It appears GDC is still on 2.067, so I haven't tested there, but given my
> results with LDC 1.0.0, I don't expect GDC to be any better.

TypeInfo should be better, however ClassInfo is the last on my list to fix due
to its complexity.

On my side, all generated layouts for types in object.d will eventually all be
moved over to a pick-n-choose way of writing out members.  Meaning if you
remove one member from TypeInfo - size checking has been thrown out the window
- it won't generate any data for it.

Because of ClassInfo being prevalent almost everywhere though, you may not
notice side effects just yet.  And though it's yet to be tested whether there's
any benefit, I'm optimistic. :-)

--


More information about the Digitalmars-d-bugs mailing list