This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: Always assign vtable slot for final methods
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: GCC libjava patches <java-patches at gcc dot gnu dot org>
- Date: Wed, 29 Oct 2003 11:44:04 +1300
- Subject: 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