Clear INTERPRETED access modifier for compiled classes
Andrew Haley
aph@redhat.com
Wed Mar 11 17:44:00 GMT 2009
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 <aph@redhat.com>
* 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;
More information about the Java
mailing list