]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorAndrew Haley <aph@gcc.gnu.org>
Thu, 12 Mar 2009 16:13:19 +0000 (16:13 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Thu, 12 Mar 2009 16:13:19 +0000 (16:13 +0000)
2009-03-11  Andrew Haley  <aph@redhat.com>

* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear
INTERPRETED access modifier.

2009-03-11  Tom Tromey  <tromey@redhat.com>

* link.cc (_Jv_Linker::find_field): Pass the field_type to
_Jv_CheckOrCreateLoadingConstraint, not the class that is
requesting the field.

From-SVN: r144818

libjava/ChangeLog
libjava/java/lang/natClassLoader.cc
libjava/link.cc

index 2408ebffd74e73f6dae97e92891e1508ead15203..6d33fdda55f0df5de44161faf48448d6c4fdc292 100644 (file)
@@ -1,3 +1,14 @@
+2009-03-11  Andrew Haley  <aph@redhat.com>
+
+       * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear
+       INTERPRETED access modifier.
+
+2009-03-11  Tom Tromey  <tromey@redhat.com>
+
+       * link.cc (_Jv_Linker::find_field): Pass the field_type to
+       _Jv_CheckOrCreateLoadingConstraint, not the class that is
+       requesting the field.
+
 2009-03-03  Andrew John Hughes  <ahughes@redhat.com>
 
        * Makefile.am:
index fac1e4dede0c0ccdfc3616d4337def3ca7e3daf4..237e038d1e78a1dafe1be5d77c6e17bf01ee3d6e 100644 (file)
@@ -380,6 +380,15 @@ _Jv_RegisterClassHookDefault (jclass klass)
   if (! klass->engine)
     klass->engine = &_Jv_soleCompiledEngine;
 
+  /* FIXME:  Way back before the dawn of time, we overloaded the
+     SYNTHETIC class access modifier to mean INTERPRETED.  This was a
+     Bad Thing, but it didn't matter then because classes were never
+     marked synthetic.  However, it is possible to redeem the
+     situation: _Jv_RegisterClassHookDefault is only called from
+     compiled classes, so we clear the INTERPRETED flag.  This is a
+     kludge!  */
+  klass->accflags &= ~java::lang::reflect::Modifier::INTERPRETED;
+
   if (system_class_list != SYSTEM_LOADER_INITIALIZED)
     {
       unsigned long abi = (unsigned long) klass->next_or_version;
index c07b6e15c1c5d563b51ab0e31d4423fdad6c244b..25114085bfc3255d233e13a3d1862bfe3bcc211b 100644 (file)
@@ -248,7 +248,7 @@ _Jv_Linker::find_field (jclass klass, jclass owner,
       // Note that the field returned by find_field_helper is always
       // resolved.  However, we still use the constraint mechanism
       // because this may affect other lookups.
-      _Jv_CheckOrCreateLoadingConstraint (klass, (*found_class)->loader);
+      _Jv_CheckOrCreateLoadingConstraint (field_type, (*found_class)->loader);
     }
   else
     {