Clear INTERPRETED access modifier for compiled classes
Andrew Haley <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a duplicate of a fix I applied 2007-05-31, but for non-BC classes. Ping Tom Tromey: is this safe? As far as I can see this will never be called for interpreted classes. This patch is for trunk and 4.3 branch. Andrew. 2009-03-11 Andrew Haley <[email protected]> * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Clear INTERPRETED access modifier. Index: java/lang/natClassLoader.cc =================================================================== --- java/lang/natClassLoader.cc (revision 142643) +++ java/lang/natClassLoader.cc (working copy) @@ -325,6 +325,15 @@ 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;