Commit 6c2a1180 by Tom Tromey Committed by Tom Tromey

natClassLoader.cc (_Jv_NewClass): Use JV_STATE_NOTHING, not `0'.

	* java/lang/natClassLoader.cc (_Jv_NewClass): Use
	JV_STATE_NOTHING, not `0'.
	* java/lang/Class.h: Replaced JV_STATE_ defines with enum.

From-SVN: r29033
parent 45329b39
1999-09-01 Tom Tromey <tromey@cygnus.com> 1999-09-01 Tom Tromey <tromey@cygnus.com>
* java/lang/natClassLoader.cc (_Jv_NewClass): Use
JV_STATE_NOTHING, not `0'.
* java/lang/Class.h: Replaced JV_STATE_ defines with enum.
* posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex. * posix-threads.cc (_Jv_CondWait): Use _Jv_PthreadGetMutex.
* include/posix-threads.h (_Jv_Mutex_t): Define as structure, * include/posix-threads.h (_Jv_Mutex_t): Define as structure,
except on Linux. except on Linux.
......
...@@ -23,25 +23,26 @@ extern "C" void _Jv_InitClass (jclass klass); ...@@ -23,25 +23,26 @@ extern "C" void _Jv_InitClass (jclass klass);
extern "C" void _Jv_RegisterClasses (jclass *classes); extern "C" void _Jv_RegisterClasses (jclass *classes);
// These are the possible values for the `state' field of the class // These are the possible values for the `state' field of the class
// structure. Note that ordering is important here; in particular // structure. Note that ordering is important here. Whenever the
// `resolved' must come between `nothing' and the other states. // state changes, one should notify all waiters of this class.
// Whenever the state changes, one should notify all waiters of this enum
// class. {
#define JV_STATE_NOTHING 0 // set by compiler JV_STATE_NOTHING = 0, // Set by compiler.
#define JV_STATE_PRELOADING 1 // can do _Jv_FindClass JV_STATE_PRELOADING = 1, // Can do _Jv_FindClass.
#define JV_STATE_LOADING 3 // has super installed JV_STATE_LOADING = 3, // Has super installed.
#define JV_STATE_LOADED 5 // is complete JV_STATE_LOADED = 5, // Is complete.
#define JV_STATE_COMPILED 6 // this was a compiled class JV_STATE_COMPILED = 6, // This was a compiled class.
#define JV_STATE_PREPARED 7 // layout & static init done JV_STATE_PREPARED = 7, // Layout & static init done.
#define JV_STATE_LINKED 9 // strings interned JV_STATE_LINKED = 9, // Strings interned.
#define JV_STATE_IN_PROGRESS 10 // <clinit> running JV_STATE_IN_PROGRESS = 10, // <Clinit> running.
#define JV_STATE_DONE 12 // JV_STATE_DONE = 12, //
#define JV_STATE_ERROR 14 // must be last JV_STATE_ERROR = 14 // must be last.
};
struct _Jv_Field; struct _Jv_Field;
struct _Jv_VTable; struct _Jv_VTable;
......
...@@ -547,7 +547,7 @@ _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass, ...@@ -547,7 +547,7 @@ _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
ret->interfaces = NULL; ret->interfaces = NULL;
ret->loader = loader; ret->loader = loader;
ret->interface_count = 0; ret->interface_count = 0;
ret->state = 0; ret->state = JV_STATE_NOTHING;
ret->thread = NULL; ret->thread = NULL;
_Jv_RegisterClass (ret); _Jv_RegisterClass (ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment