Indirect primary bases
Jim Dehnert
dehnert at baalbek.engr.sgi.com
Tue Aug 1 03:13:35 UTC 2000
> From: Mark Mitchell <mark at codesourcery.com>
>
> Why do we ever pick an indirect primary base as a primary base?
>
> That doesn't save space in the object since the primary base we choose
> was some other base's primary base. Furthermore, we now have to
> replicate that bases vtable entries in all the places where it is a
> primary base.
>
> What's the benefit?
Well, first, its vtable is now at the same address as that of the
derived class, and won't need a distinct vtable pointer load. Also,
calls to its virtual functions won't require 'this' adjustments.
If I'm mistaken about these, or if you don't think they're adequate
benefits, we can open the issue.
Jim
- Jim Dehnert dehnert at sgi.com
(650)933-4272
More information about the cxx-abi-dev
mailing list