diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-15 20:46:48 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-15 20:46:48 +0000 |
commit | 7071e271b8dc432d05b7786b7689e696906a57ce (patch) | |
tree | d099a29d870b1dc6ae2826afefdb9b3e3572acbc /libjava/jni.cc | |
parent | 489086774f3272fcd3468b0b10b82fd2b969578a (diff) | |
download | gcc-7071e271b8dc432d05b7786b7689e696906a57ce.tar.gz |
* jni.cc: Include IdentityHashMap.h, not Hashtable.h.
(local_ref_table, global_ref_table): Now IdentityHashMap.
(_Jv_JNI_Init): Updated for new types.
(mark_for_gc): Likewise.
(unmark_for_gc): Likewise.
* gcj/javaprims.h: Rebuilt class list.
* Makefile.in: Rebuilt.
* Makefile.am (core_java_source_files): Added new file.
* java/util/IdentityHashMap.java: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44929 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r-- | libjava/jni.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc index c8ccee7b65a..7b82908e8b8 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -37,7 +37,7 @@ details. */ #include <java/lang/reflect/Method.h> #include <java/lang/reflect/Modifier.h> #include <java/lang/OutOfMemoryError.h> -#include <java/util/Hashtable.h> +#include <java/util/IdentityHashMap.h> #include <java/lang/Integer.h> #include <java/lang/ThreadGroup.h> #include <java/lang/Thread.h> @@ -91,9 +91,9 @@ struct _Jv_JNI_LocalFrame }; // This holds a reference count for all local references. -static java::util::Hashtable *local_ref_table; +static java::util::IdentityHashMap *local_ref_table; // This holds a reference count for all global references. -static java::util::Hashtable *global_ref_table; +static java::util::IdentityHashMap *global_ref_table; // The only VM. static JavaVM *the_vm; @@ -148,8 +148,8 @@ jvmpiDisableEvent (jint event_type, void *) void _Jv_JNI_Init (void) { - local_ref_table = new java::util::Hashtable; - global_ref_table = new java::util::Hashtable; + local_ref_table = new java::util::IdentityHashMap; + global_ref_table = new java::util::IdentityHashMap; #ifdef ENABLE_JVMPI _Jv_JVMPI_Interface.version = 1; @@ -163,7 +163,7 @@ _Jv_JNI_Init (void) // Tell the GC that a certain pointer is live. static void -mark_for_gc (jobject obj, java::util::Hashtable *ref_table) +mark_for_gc (jobject obj, java::util::IdentityHashMap *ref_table) { JvSynchronize sync (ref_table); @@ -176,7 +176,7 @@ mark_for_gc (jobject obj, java::util::Hashtable *ref_table) // Unmark a pointer. static void -unmark_for_gc (jobject obj, java::util::Hashtable *ref_table) +unmark_for_gc (jobject obj, java::util::IdentityHashMap *ref_table) { JvSynchronize sync (ref_table); |