[Issue 14758] TypeInfo causes excessive binary bloat

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 21 04:30:51 PDT 2015


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

Johannes Pfau <johannespfau at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johannespfau at gmail.com

--- Comment #11 from Johannes Pfau <johannespfau at gmail.com> ---
> There are very few places where dynamic type info is actually necessary, it's > just that they were used by the old C style compiler runtime interface.

Yes, we should probably revisit these cases at some point. I wanted to cleanup
my noRTTI (fno-rtti option for gdc) branch for DMD but I thought we won't merge
big non-DDMD changes for 2.069 so I postponed that.

I think the most important thing really requiring TypeInfo might be class down
casts. I don't see how you can do that without some kind of RTTI. But we could
just use some minimal RTTI for that (As long as we can put a unique pointer for
every class in the vtable any kind of RTTI should work).

There's also some postblit related stuff where I think the compiler could
statically generate the necessary code. It was probably easier to implement it
in druntime using RTTI.

--


More information about the Digitalmars-d-bugs mailing list