summaryrefslogtreecommitdiffstats
path: root/src/jni_internal.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-08-17 10:25:24 -0700
committerElliott Hughes <enh@google.com>2011-08-17 10:28:30 -0700
commitbbd76717c14822b68ae6d122d88610b46286272f (patch)
treec3575373babafb78979c133d04b79e64c7598608 /src/jni_internal.h
parentb3c5ea6d937900651d6d0f8106fbd166256a59cb (diff)
downloadart-bbd76717c14822b68ae6d122d88610b46286272f.zip
art-bbd76717c14822b68ae6d122d88610b46286272f.tar.gz
art-bbd76717c14822b68ae6d122d88610b46286272f.tar.bz2
Add the two ReferenceTables.
Change-Id: Ie9200e6246dc07d867de0a70de52c1b2dc034f5b
Diffstat (limited to 'src/jni_internal.h')
-rw-r--r--src/jni_internal.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/jni_internal.h b/src/jni_internal.h
index 3ff12d8..03dbfa0 100644
--- a/src/jni_internal.h
+++ b/src/jni_internal.h
@@ -7,23 +7,28 @@
#include "assembler.h"
#include "macros.h"
+#include "reference_table.h"
namespace art {
class Runtime;
class Thread;
-JavaVM* CreateJavaVM(Runtime* runtime);
-JNIEnv* CreateJNIEnv();
-
struct JavaVMExt {
+ JavaVMExt(Runtime* runtime);
+
// Must be first to correspond with JNIEnv.
const struct JNIInvokeInterface* fns;
Runtime* runtime;
+
+ // Used to hold references to pinned primitive arrays.
+ ReferenceTable pin_table;
};
struct JNIEnvExt {
+ JNIEnvExt(Thread* self);
+
// Must be first to correspond with JavaVM.
const struct JNINativeInterface* fns;
@@ -32,6 +37,9 @@ struct JNIEnvExt {
// Are we in a "critical" JNI call?
bool critical;
+ // Entered JNI monitors, for bulk exit on thread detach.
+ ReferenceTable monitor_table;
+
// Used to help call synchronized native methods.
// TODO: make jni_compiler.cc do the indirection itself.
void (*MonitorEnterHelper)(JNIEnv*, jobject);