Why do we emit vtables for abstract classes?
Andrew Haley
aph@redhat.com
Mon Mar 13 14:31:00 GMT 2006
Tom Tromey writes:
> >>>>> "David" == David Daney <ddaney@avtrex.com> writes:
>
> David> I am looking at the assembly output of jc1 (recent svn trunk) and am
> David> wondering why there are vtables for abstract classes.
>
> David> There can never be an instance of an abstract class, so we should
> David> never have to access its vtable.
>
> David> Am I missing something, or is the vtable unneeded?
>
> I have a vague memory that we changed to do this on purpose. And
> there is a comment in link.cc about this... but all I can remember
> right now is that we must lay out a vtable for an abstract class (so
> that all the subclasses agree on the layout), not that we must
> actually have the vtable available. (The layout info is available in
> the 'methods' table.)
Yes; something to do with Miranda methods? We need the methods table,
but maybe not the vtable.
Andrew.
More information about the Java
mailing list