summaryrefslogtreecommitdiffstats
path: root/libjava/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 21:05:17 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 21:05:17 +0000
commit1c3d0b79789773e24f107b582894fd0532368217 (patch)
treeeadfaf33aa6b6542bdf756636c0d4fa0af73c5de /libjava/java
parenta9238c8993e02e735b35fe39bf6710f24ee23b03 (diff)
downloadppe42-gcc-1c3d0b79789773e24f107b582894fd0532368217.tar.gz
ppe42-gcc-1c3d0b79789773e24f107b582894fd0532368217.zip
* java/lang/natClassLoader.cc (_Jv_NewClass): Use
JV_STATE_NOTHING, not `0'. * java/lang/Class.h: Replaced JV_STATE_ defines with enum. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/lang/Class.h31
-rw-r--r--libjava/java/lang/natClassLoader.cc2
2 files changed, 17 insertions, 16 deletions
diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h
index fd2c2eba777..b3a86664e69 100644
--- a/libjava/java/lang/Class.h
+++ b/libjava/java/lang/Class.h
@@ -23,25 +23,26 @@ extern "C" void _Jv_InitClass (jclass klass);
extern "C" void _Jv_RegisterClasses (jclass *classes);
// These are the possible values for the `state' field of the class
-// structure. Note that ordering is important here; in particular
-// `resolved' must come between `nothing' and the other states.
-// Whenever the state changes, one should notify all waiters of this
-// class.
-#define JV_STATE_NOTHING 0 // set by compiler
-
-#define JV_STATE_PRELOADING 1 // can do _Jv_FindClass
-#define JV_STATE_LOADING 3 // has super installed
-#define JV_STATE_LOADED 5 // is complete
+// structure. Note that ordering is important here. Whenever the
+// state changes, one should notify all waiters of this class.
+enum
+{
+ JV_STATE_NOTHING = 0, // Set by compiler.
+
+ JV_STATE_PRELOADING = 1, // Can do _Jv_FindClass.
+ JV_STATE_LOADING = 3, // Has super installed.
+ 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
-#define JV_STATE_LINKED 9 // strings interned
+ JV_STATE_PREPARED = 7, // Layout & static init done.
+ JV_STATE_LINKED = 9, // Strings interned.
-#define JV_STATE_IN_PROGRESS 10 // <clinit> running
-#define JV_STATE_DONE 12 //
+ JV_STATE_IN_PROGRESS = 10, // <Clinit> running.
+ JV_STATE_DONE = 12, //
-#define JV_STATE_ERROR 14 // must be last
+ JV_STATE_ERROR = 14 // must be last.
+};
struct _Jv_Field;
struct _Jv_VTable;
diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc
index 0bd7cd0d9e9..4c0f411a877 100644
--- a/libjava/java/lang/natClassLoader.cc
+++ b/libjava/java/lang/natClassLoader.cc
@@ -547,7 +547,7 @@ _Jv_NewClass (_Jv_Utf8Const *name, jclass superclass,
ret->interfaces = NULL;
ret->loader = loader;
ret->interface_count = 0;
- ret->state = 0;
+ ret->state = JV_STATE_NOTHING;
ret->thread = NULL;
_Jv_RegisterClass (ret);
OpenPOWER on IntegriCloud