This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[BC] Patch: FYI: move linking to _Jv_IsAssignableFromSlow
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 08 Nov 2004 15:04:39 -0700
- Subject: [BC] Patch: FYI: move linking to _Jv_IsAssignableFromSlow
- Reply-to: tromey at redhat dot com
I'm checking this in on the BC branch. This patch was discussed
earlier on the list.
I rebuilt rhug today, and now Eclipse 3 works precompiled with the BC
branch. I think it was hanging earlier because I forgot to rebuild
rhug after some compiler changes that affected the ABI.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/lang/natClass.cc (_Jv_IsAssignableFromSlow): Ensure
supers installed.
* link.cc (verify_type_assertions): Don't link supers.
Index: link.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Attic/link.cc,v
retrieving revision 1.1.2.12
diff -u -r1.1.2.12 link.cc
--- link.cc 8 Nov 2004 16:49:32 -0000 1.1.2.12
+++ link.cc 8 Nov 2004 21:59:51 -0000
@@ -1632,17 +1632,6 @@
if (cl1 == NULL || cl2 == NULL)
continue;
- // Strip off array types before trying to link supers. This
- // is somewhat ugly, since it duplicates some logic from
- // _Jv_IsAssignableFromSlow.
- while (cl1->isArray () && cl2->isArray ())
- {
- cl1 = cl1->getComponentType ();
- cl2 = cl2->getComponentType ();
- }
- wait_for_state (cl1, JV_STATE_LOADING);
- wait_for_state (cl2, JV_STATE_LOADING);
-
if (! _Jv_IsAssignableFromSlow (cl2, cl1))
{
jstring s = JvNewStringUTF ("Incompatible types: In class ");
Index: java/lang/natClass.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClass.cc,v
retrieving revision 1.75.2.21
diff -u -r1.75.2.21 natClass.cc
--- java/lang/natClass.cc 8 Nov 2004 16:27:27 -0000 1.75.2.21
+++ java/lang/natClass.cc 8 Nov 2004 21:59:51 -0000
@@ -1147,6 +1147,10 @@
if (target == &java::lang::Object::class$)
return true;
+ // Ensure that the classes have their supers installed.
+ _Jv_Linker::wait_for_state (source, JV_STATE_LOADING);
+ _Jv_Linker::wait_for_state (target, JV_STATE_LOADING);
+
do
{
if (source == target)