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
This commit is contained in:
Graydon Hoare
2005-01-14 07:36:27 +00:00
committed by Graydon Hoare
parent a0ee8b5f99
commit 84973b27e8
5 changed files with 98 additions and 21 deletions
+4
View File
@@ -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); }
+3
View File
@@ -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 ();