* java/lang/Class.h (JV_STATE_LOADED, JV_STATE_COMPILED): Swap order.
* defineclass.cc (_Jv_ClassReader::parse): Print message if
gcj::verbose_class_flag.
* java/lang/natClass.cc (initializeClass): Don't print message here.
* java/lang/natClassLoader.cc (_Jv_WaitForState): If state was
_JV_STATE_COMPILED, set to JV_STATE_LOADED and may print message.
(_Jv_PrepareCompiledClass): Likewise.
From-SVN: r84926
+2004-07-19 Per Bothner <per@bothner.com>
+
+ Print -verbose:message on "loading", not initialization.
+ * java/lang/Class.h (JV_STATE_LOADED, JV_STATE_COMPILED): Swap order.
+ * defineclass.cc (_Jv_ClassReader::parse): Print message if
+ gcj::verbose_class_flag.
+ * java/lang/natClass.cc (initializeClass): Don't print message here.
+ * java/lang/natClassLoader.cc (_Jv_WaitForState): If state was
+ _JV_STATE_COMPILED, set to JV_STATE_LOADED and may print message.
+ (_Jv_PrepareCompiledClass): Likewise.
+
2004-07-18 Matthias Klose <doko@debian.org>
* configure.in: Substitute target_noncanonical.
// tell everyone we're done.
def->state = JV_STATE_LOADED;
+ if (gcj::verbose_class_flag)
+ fprintf (stderr, "[Loaded (bytecode) %s]\n", (const char*)(def->name->data));
def->notifyAll ();
}
JV_STATE_PRELOADING = 1, // Can do _Jv_FindClass.
JV_STATE_LOADING = 3, // Has super installed.
- JV_STATE_LOADED = 5, // Is complete.
-
- JV_STATE_COMPILED = 6, // This was a compiled class.
+ JV_STATE_COMPILED = 5, // This was a compiled class.
+ JV_STATE_LOADED = 6, // Is complete.
JV_STATE_PREPARED = 7, // Layout & static init done.
JV_STATE_LINKED = 9, // Strings interned.
throw except;
}
- if (gcj::verbose_class_flag)
- fprintf (stderr, "[Loaded %s]\n", (const char*)(name->data));
-
_Jv_MonitorEnter (this);
state = JV_STATE_DONE;
notifyAll ();
_Jv_MonitorEnter (klass) ;
+ if (klass->state == JV_STATE_COMPILED)
+ {
+ klass->state = JV_STATE_LOADED;
+ if (gcj::verbose_class_flag)
+ fprintf (stderr, "[Loaded (pre-compiled) %s]\n", (const char*)(klass->name->data));
+ }
if (state == JV_STATE_LINKED)
{
// Must call _Jv_PrepareCompiledClass while holding the class
void
_Jv_PrepareCompiledClass (jclass klass)
{
- if (klass->state >= JV_STATE_LINKED)
+ jint state = klass->state;
+ if (state >= JV_STATE_LINKED)
return;
// Short-circuit, so that mutually dependent classes are ok.
if (klass->isInterface ())
_Jv_LayoutInterfaceMethods (klass);
+ if (state == JV_STATE_COMPILED && gcj::verbose_class_flag)
+ fprintf (stderr, "[Loaded (pre-compiled) %s]\n",
+ (const char*)(klass->name->data));
+
klass->notifyAll ();
_Jv_PushClass (klass);