Improve the OOP ABI
Adam D Ruppe
destructionator at gmail.com
Thu Sep 28 13:15:35 UTC 2023
On Thursday, 28 September 2023 at 13:05:01 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> TypeInfo isn't guaranteed to be unique to a process when
> dealing with shared libraries. There is a strong chance it'll
> be duplicative.
This should be fixed, but even if it isn't, that just means using
the == operator instead of the is operator; the concept i
believe is still sound.
(the == operator sux tho, this really should be fixed at the
source)
> ClassInfo is an alias to TypeInfo_Class now. This indirection
> shouldn't exist.
this means emplacing the typeinfo_class in the same memory block
as the vtbl instead of linking to it.
so the virtual table exists at *(instance +
__traits(classInstanceSize, TypeInfo_Class))
More information about the Digitalmars-d
mailing list