construction vtables broken

Mark Mitchell mark at codesourcery.com
Tue Jan 23 18:06:51 UTC 2001


>>>>> "Jason" == Jason Merrill <jason at redhat.com> writes:

    Jason> But it still needs to say something about having virtual
    Jason> functions (in order to have RTTI information).  It might be
    Jason> cleaner just to add the bit above about RTTI.

Are you trying to optimize the case where the vtable has only vbase
offsets, but no virtual functions, and then not have VTT entries in
that case?  Or am I lost? :-)

I think that's over-optimization.  It will make things even *more*
complicated, since you might still need an entry for a non-primary
base of such a thing that did itself have virtual functions.  Ugh.

I think Nathan's proposal is a winner: 

  - Everything that has a virtual base
  - Everything that is a base of a virtual base, including the
    non-proper case of actually *being* a virtual base.

That's simple, and optimal for almost every hierarchy.

Or did I misunderstand?  Maybe you found *more* cases where we need a
secondary VTT?

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list