diff options
author | Elliott Hughes <enh@google.com> | 2011-08-17 10:25:24 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-08-17 10:28:30 -0700 |
commit | bbd76717c14822b68ae6d122d88610b46286272f (patch) | |
tree | c3575373babafb78979c133d04b79e64c7598608 /src/jni_internal.h | |
parent | b3c5ea6d937900651d6d0f8106fbd166256a59cb (diff) | |
download | art-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.h | 14 |
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); |