vcall offset description ...
Mark Mitchell
mark at codesourcery.com
Mon Apr 3 19:38:52 UTC 2000
... is still a little unclear:
the vtable for a virtual base A also includes a vcall offset entry
for each virtual function represented in A's primary vtable and the
secondary vtables from A's non-virtual bases. The vcall offset
entries are allocated from the inside out, in the same order as the
functions appear in A's vtables.
We need to make sure we agree on the order. How about this:
The vcall offset entries corresponding to a single base of A are
ordered in the same was the virtual functions in the bases vtable.
For example, if the vtable contains entries for `f', and `g',
respectively, then the vcall offset for `f' precedes the vcall
offset for `g'. The vcall offsets for the various bases, however,
are allocated in reverse inheritance graph order. (So, for example,
the vcall offsets for `A' will be located closer to the point where
the vptr points than those for any base of `A'.)
I don't think it can matter *what* order we pick; we just need one. I
think what I wrote is most consistent with the original wording.
--
Mark Mitchell mark at codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the cxx-abi-dev
mailing list