Vtables

Mark Mitchell mark at codesourcery.com
Mon Feb 21 19:03:31 UTC 2000


  I'm about to implement this myself and this is probably the algorithm
  I will use as well.  It seems to be the same as the algorithm for
  laying out base classes, except that the non-shared virtual vtables
  should be last.

  The non-virtual set of vtables needs to be first in the "fixed" part of
  the greater vtable (for construction vtables to work properly), and the
  vtables for virtual parts later.

Oops -- my posted algorithm doesn't accomplish that.  I've never quite
understood what's meant by the "algorithm for laying out base
classes".  (I understand the algorithm, but not how it induces an
ordering on the base subobjects.)

  I agree we need more specification of the ordering, which is why I tried
  to do so in the construction vtable section.  Can you look at that?  Do you
  think that should be reworded as a walk of the base classes not their
  offsets too?

Yes, I think that would be an improvement.  Thanks,

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




More information about the cxx-abi-dev mailing list