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: Binary Compatibility: vtable entries for final methods


David Daney writes:
 > Andrew Haley wrote:
 > 
 > >"Changing a class that was declared final to no longer be declared
 > >final does not break [binary compatibility.]"
 > >
 > >"Removing the final modifier from a method does not break [binary
 > >compatibility.]"
 > >
 > >So, our practice of making direct calls to final methods and not
 > >generating vtable entries for them must cease.  I'm minded to make an
 > >exception for java.lang.Object, because we'd otherwise add a bunch of
 > >vtable entries to every single class for no good reason.
 >
 > You can still make a direct call to a final method from the same class.  
 > Because when you make it non-final you will be recompiling the whole 
 > class and will be able to change the calls to go via the vtable.

That's a good point.  There's an outstanding PR because we don't
detect calls made within the same compilation unit, and we should
special case these.

 > I agree that you do have to make a vtable entry for all final methods 
 > (but not private ones).

Yeah, that's how it seems to me.

Ta,
Andrew.


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