vcall offset description ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vcall offset description ...
- To: cxx-abi@xxxxxxxxxxxxxxxxxxxx
- Subject: vcall offset description ...
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: Mon, 03 Apr 2000 12:38:52 -0700
... 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@xxxxxxxxxxxxxxxx
CodeSourcery, LLC http://www.codesourcery.com