This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: New vtable ABI (was Re: Strange behaviour in C++...)


Jason writes:

> I should point out here that the proposed mechanism is not the classic ARM
> vtable.  In fact, it doesn't have any more space overhead for single
> inheritance code than thunks, and may have less for multiple inheritance
> code.  It works like this:

[ details deleted ]

Thanks, Jason, you've removed my objections.  My problems were based on
the classing scheme, where you have to store offsets for each vtable slot
(space overhead) and add the offset during the call (time overhead).

I don't quite grasp all of the details on first reading; diagrams would
help, but it sounds elegant.

(But then it seems that we'll at least temporarily have *three* vtable
schemes, sigh).

> Rather than per-function offsets, we have per-target type offsets.  These
> offsets (if any) are stored at a negative index from the vptr.

Hmm ... RTTI is currently there, but RTTI takes a fixed # of slots
so it's no problem.

Joe


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]