Construction vtables
Coleen Phillimore
coleen at zko.dec.com
Wed Jun 28 15:40:33 UTC 2000
> But, that means this trick doesn't work during object construction,
> which seems bad.
>
> What am I missing?
Nothing, you are correct. One of the tradeoffs in not including
secondary vtables that did not need construction vtables in the
construction vtables and VTT, was that you cannot reference secondary
vtables from the address of the primary vtable. That's why the VTT
contains secondary vptrs, not just construction vtable ptrs.
There were two ways to do construction vtables: include the entire primary/
secondary vtable group in the construction vtable, or only include the ones
that needed construction vtables. I wrote up (and implemented) both.
We chose the latter to save static space over the optimization you
describe. We believed that the "boring" virtual tables would be large
enough to merit this space savings.
Coleen
--
-----------------------------------------------------------------------
Coleen Phillimore | mailto:coleen at zko.dec.com
Compaq Computer Corp. Nashua, NH | COMPAQ C++ Compiler Development
-----------------------------------------------------------------------
More information about the cxx-abi-dev
mailing list