diff options
author | Graydon Hoare <graydon@redhat.com> | 2005-01-14 07:36:27 +0000 |
---|---|---|
committer | Graydon Hoare <graydon@gcc.gnu.org> | 2005-01-14 07:36:27 +0000 |
commit | 84973b27e8283fa75075f124ad4e6e14dc7726a4 (patch) | |
tree | 57a4dece632a26e9b5430fff053a24e1b01280d3 /libjava/include | |
parent | a0ee8b5f99e1d646105e0f916ae443f1c512b454 (diff) | |
download | gcc-84973b27e8283fa75075f124ad4e6e14dc7726a4.zip gcc-84973b27e8283fa75075f124ad4e6e14dc7726a4.tar.gz gcc-84973b27e8283fa75075f124ad4e6e14dc7726a4.tar.bz2 |
jni.h (_Jv_JNIEnv::bottom_locals): New field.
2005-01-13 Graydon Hoare <graydon@redhat.com>
* include/jni.h (_Jv_JNIEnv::bottom_locals): New field.
* include/jvm.h (_Jv_FreeJNIEnv): Declare.
* java/lang/natThread.cc (finalize_native): Call _Jv_FreeJNIEnv.
* jni.cc: Reuse bottom frame between calls, avoid clearing
frame when no local references are made.
From-SVN: r93632
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/jni.h | 4 | ||||
-rw-r--r-- | libjava/include/jvm.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libjava/include/jni.h b/libjava/include/jni.h index acffa97..c1b6e20 100644 --- a/libjava/include/jni.h +++ b/libjava/include/jni.h @@ -693,6 +693,10 @@ private: /* The chain of local frames. */ struct _Jv_JNI_LocalFrame *locals; + /* The bottom-most element of the chain, initialized with the env and + reused between non-nesting JNI calls. */ + struct _Jv_JNI_LocalFrame *bottom_locals; + public: jint GetVersion () { return p->GetVersion (this); } diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index d45ef25..67a4b18 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -522,6 +522,9 @@ extern void _Jv_JNI_Init (void); _Jv_JNIEnv *_Jv_GetCurrentJNIEnv (); void _Jv_SetCurrentJNIEnv (_Jv_JNIEnv *); +/* Free a JNIEnv. */ +void _Jv_FreeJNIEnv (_Jv_JNIEnv *); + struct _Jv_JavaVM; _Jv_JavaVM *_Jv_GetJavaVM (); |