This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[BC] Patch: FYI: fixlet in linker
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 06 Oct 2004 13:29:32 -0600
- Subject: [BC] Patch: FYI: fixlet in linker
- Reply-to: tromey at redhat dot com
I'm checking this in on the BC branch.
We didn't properly ensure that Miranda methods for a superclass were
added when we compute our own Miranda methods. This matters later for
vtable layout.
This allows the pr8823 test case to run again.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* link.cc (ensure_method_table_complete): Ensure superclass
Miranda methods installed.
Index: link.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Attic/link.cc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 link.cc
--- link.cc 6 Oct 2004 00:05:59 -0000 1.1.2.2
+++ link.cc 6 Oct 2004 19:26:50 -0000
@@ -1565,6 +1565,10 @@
{
if (klass->vtable != NULL || klass->isInterface())
return;
+
+ // We need our superclass to have its own Miranda methods installed.
+ wait_for_state (klass->getSuperclass (), JV_STATE_LOADED);
+
// A class might have so-called "Miranda methods". This is a method
// that is declared in an interface and not re-declared in an
// abstract class. Some compilers don't emit declarations for such