Removing RTTI from binaries

Johannes Pfau via D.gnu d.gnu at puremagic.com
Thu Apr 30 12:24:12 PDT 2015


Am Thu, 30 Apr 2015 14:27:15 +0000
schrieb "Jens Bauer" <doctor at who.no>:

> I was wondering... Would it be possible to make selective 
> TypeInfo ?
> -Eg. Only add TypeInfo for those things that really need it.

'really need it' is quite subjective. IIRC TypeInfo is mostly used for
GC, AA and sometimes arrays. You won't use most of this anyway and you
can still use a library template base Array/AA so this is easy to
avoid. TypeInfo is also required for type-safe runtime variadics.
Nobody uses these.

I think one place where you really need it is downcasting class objects.
But you only need a small subset of class TypeInfo for that.


More information about the D.gnu mailing list