summaryrefslogtreecommitdiff
path: root/libjava/jni.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-08-15 20:46:48 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-08-15 20:46:48 +0000
commitac8d99218adb7edeac58e9f1e87af09bb77dfdc0 (patch)
treed099a29d870b1dc6ae2826afefdb9b3e3572acbc /libjava/jni.cc
parent369e1d74c6c3ffc4acb1c6c3defabd9ba19401b9 (diff)
downloadgcc-ac8d99218adb7edeac58e9f1e87af09bb77dfdc0.tar.gz
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
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r--libjava/jni.cc14
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);