|use of vtbl Michael.Bantle@t-systems.de (Michael BANTLE) (2001-08-06)|
|Re: use of vtbl email@example.com.OZ.AU (2001-08-08)|
|Re: use of vtbl firstname.lastname@example.org (Cristian Zoicas) (2002-08-04)|
|Re: use of vtbl email@example.com (Gabriel Dos Reis) (2002-08-10)|
|Re: use of vtbl firstname.lastname@example.org (Lieven Marchand) (2002-08-10)|
|Re: use of vtbl email@example.com (Bill Gibbons) (2002-08-10)|
|Re: use of vtbl firstname.lastname@example.org (Hans Aberg) (2002-08-14)|
|Re: use of vtbl email@example.com (Martin v. =?iso-8859-1?q?L=F6wis?=) (2002-08-14)|
|From:||"Martin v. =?iso-8859-1?q?L=F6wis?=" <firstname.lastname@example.org>|
|Date:||14 Aug 2002 02:16:55 -0400|
|Organization:||Humboldt University Berlin, Department of Computer Science|
|References:||01-08-021 02-08-018 02-08-023|
|Posted-Date:||14 Aug 2002 02:16:55 EDT|
"Lieven Marchand" <email@example.com> writes:
> In some implementations this is done by keeping a table of offsets
> in the vtbl, in others it's done by letting the function in the
> table be a trampoline that adjusts the this pointer before jumping
> to the real function.
There are many more issues to consider:
- how do you represent RTTI, in particular:
- at what slot do you put RTTI (typically -1 or 0)?
- does that slot indicate a function or a typeinfo pointer?
- how do you represent covariant return types?
- how do you represent function pointers? The typical solution is to
take the address of the function. This is a problem for
position-independent code, though, as that address may be known only
at run-time, so the dynamic loader would have to fix all vtables.
- where do you put the implicit virtual destructor?
- is there any virtual deallocation function (not mandated by
standard, but MSVC adds a slot for that, anyway)
- how do you represent virtual bases?
There are probably more issues.
Return to the
Search the comp.compilers archives again.