From ac8d99218adb7edeac58e9f1e87af09bb77dfdc0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 15 Aug 2001 20:46:48 +0000 Subject: jni.cc: Include IdentityHashMap.h, not Hashtable.h. * 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. From-SVN: r44929 --- libjava/jni.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libjava/jni.cc') diff --git a/libjava/jni.cc b/libjava/jni.cc index c8ccee7..7b82908 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -37,7 +37,7 @@ details. */ #include #include #include -#include +#include #include #include #include @@ -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); -- cgit v1.1