This is the mail archive of the java-patches@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]

Patch: FYI: Always assign vtable slot for final methods


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.

Attachment: linker-final.patch.txt
Description: Text document


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