Patch: FYI: Always assign vtable slot for final methods

Bryce McKinlay bryce@mckinlay.net.nz
Tue Oct 28 22:44:00 GMT 2003


The spec says that removing a final modifier does not break binary 
compatibility, and adding a final modifier does not break compatibility 
unless a class actually overrides it. This means that for the BC-ABI, 
code must always call final methods  using the vtable (for calls across 
binary boundaries), so we must always assign a vtable slot for final 
methods. Otherwise, for example, a binary making a virtual call a to a 
non-final method which is later changed to be final, could not work 
because that method would no longer have a vtable entry.

I'm checking in this patch, which also adds FIXME comments for some 
other vtable issues.

Regards

Bryce.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linker-final.patch.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20031028/9675333f/attachment.txt>


More information about the Java-patches mailing list