This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why do we emit vtables for abstract classes?


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.


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