public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Clear INTERPRETED access modifier for compiled classes
@ 2009-03-11 17:44 Andrew Haley
  0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2009-03-11 17:44 UTC (permalink / raw)
  To: GCJ

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-11 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 17:44 Clear INTERPRETED access modifier for compiled classes Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).