[Dlang-internal] Error in ABI doc?
Jean-Louis Leroy via Dlang-internal
dlang-internal at puremagic.com
Mon Jun 26 11:58:48 PDT 2017
https://dlang.org/spec/abi.html states: The leftmost side of the
inheritance graph of the interfaces all share their vptrs, this
is the single inheritance model. Every time the inheritance graph
forks (for multiple inheritance) a new vptr is created and stored
in the class' instance.
Then: Every time a virtual method is overridden, a new vtbl[]
must be created with the updated method pointers in it.
Since the first entry of the vtbl is a pointer to instance of
TypeInfo, it seems to me that each class has its own vtbl[],
distinct from all others, even if it does not add any virtual
function.
More information about the Dlang-internal
mailing list