This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New vtable ABI (was Re: Strange behaviour in C++...)
- To: jason at cygnus dot com (Jason Merrill)
- Subject: Re: New vtable ABI (was Re: Strange behaviour in C++...)
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Thu, 26 Aug 99 17:01:43 PDT
- Cc: jbuck at synopsys dot com, dje at watson dot ibm dot com, law at cygnus dot com, mrs at wrs dot com, oliva at dcc dot unicamp dot br, cj at interlog dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
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