A-23: RTTI has-public-base flag

Nathan Sidwell nathan at acm.org
Fri Feb 18 10:42:24 UTC 2000


Jim Dehnert wrote:
> 
> Another issue from the meeting today:  we see no utility for the
> __vmi_class_type_info flag indicating that there is a public base.
> Is there one that anyone knows of?  If so, I presume that "direct or
> indirect" is equivalent to direct only, since it's not public unless
> the entire inheritance path is public?  The reference is:
There are several reasons I suggested it. The semantics I meant
were `there is at least one direct or indirect public base' (symmetrical
definition of the non-public, virtual and non-virtual flags). In this
case the indirect paths are unimportant, because for one of those to
be public, a direct base must be too (just as for the non-virtual flag).

To tell whether the whole graph is public, we look for non-public being
zero.

1) Symmetry, we had virtual/non-virtual, so public/non-public. However
the virtual ones are now killed, so this reason goes away.

2) For dynamic cast and catching we're looking for public bases. Such
a flag would tell us not to bother iterating over the base class array.
This is possibly an unimportant optimization - maybe even a pessimizer by
throwing in another test.

I've no strong feeling about the public flag, but I'm nervous about
throwing it away before actually coding up the dcast and catch algorithms
with it in mind.

nathan

-- 
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
Never hand someone a gun unless you are sure where they will point it
nathan at acm.org  http://www.cs.bris.ac.uk/~nathan/  nathan at cs.bris.ac.uk




More information about the cxx-abi-dev mailing list