summaryrefslogtreecommitdiffstats
path: root/libjava/include
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-01 06:14:26 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-01 06:14:26 +0000
commite3aefe0017b60741e6321a048ac2897a9c11247e (patch)
tree37bc5e7b05325b8b7a5590d5caf2fda61bb3f57d /libjava/include
parentfce10f793577e932089b5bc66fec138e2aecab2c (diff)
downloadppe42-gcc-e3aefe0017b60741e6321a048ac2897a9c11247e.tar.gz
ppe42-gcc-e3aefe0017b60741e6321a048ac2897a9c11247e.zip
* prims.cc (_Jv_MallocUnchecked): New function.
(main_init): Call _Jv_JNI_Init. * include/jvm.h (_Jv_MallocUnchecked): Declare. (_Jv_JNI_Init): Declare. * jni.cc: Include Hashtable.h, OutOfMemoryError.h, Integer.h, <string.h>. (_Jv_JNI_NewGlobalRef): New function. (_Jv_JNI_DeleteGlobalRef): New function. (_Jv_JNI_DeleteLocalRef): New function. (_Jv_JNI_conversion_call): Initialize and clear local reference frame. (_Jv_JNI_NewLocalRef): New function. (struct _Jv_JNI_LocalFrame): New structure. (_Jv_JNI_PushLocalFrame): New function. (_Jv_JNI_EnsureLocalCapacity): New function. (FRAME_SIZE): New define. (_Jv_JNI_GetStringChars): Mark string, not characters. (_Jv_JNI_ReleaseStringChars): Unmark string, not characters. (_Jv_JNI_GetPrimitiveArrayElements): Mark array, not elements. (_Jv_JNI_ReleasePrimitiveArrayElements): Unmark array, not elements. (_Jv_JNI_DefineClass): Make return value a local ref. (_Jv_JNI_FindClass): Likewise. (_Jv_JNI_GetSuperclass): Likewise. (_Jv_JNI_ExceptionOccurred): Likewise. (_Jv_JNI_AllocObject): Likewise. (_Jv_JNI_GetObjectClass): Likewise. (_Jv_JNI_CallAnyMethodV): Likewise. (_Jv_JNI_NewString): Likewise. (_Jv_JNI_NewStringUTF): Likewise. (_Jv_JNI_NewObjectArray): Likewise. (_Jv_JNI_GetObjectArrayElement): Likewise. (_Jv_JNI_ToReflectedField): Likewise. (_Jv_JNI_ToReflectedMethod): Likewise. (_Jv_JNIFunctions): Updated table for new functions. (_Jv_JNI_Init): New function. (mark_for_gc): Wrote. (unmark_for_gc): Wrote. * include/jni.h (struct JNINativeInterface): Removed name from PopLocalFrame parameter. (class _Jv_JNIEnv): Added `locals' field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/jni.h5
-rw-r--r--libjava/include/jvm.h8
2 files changed, 12 insertions, 1 deletions
diff --git a/libjava/include/jni.h b/libjava/include/jni.h
index 60b2302754a..c5ca7dc95dd 100644
--- a/libjava/include/jni.h
+++ b/libjava/include/jni.h
@@ -133,7 +133,7 @@ struct JNINativeInterface
void (*FatalError) (JNIEnv *, const char *);
jint (*PushLocalFrame) (JNIEnv *, jint);
- jobject (*PopLocalFrame) (JNIEnv *, jobject result);
+ jobject (*PopLocalFrame) (JNIEnv *, jobject);
jobject (*NewGlobalRef) (JNIEnv *, jobject);
void (*DeleteGlobalRef) (JNIEnv *, jobject);
@@ -538,6 +538,9 @@ private:
/* The class of the current native method. */
jclass klass;
+ /* The chain of local frames. */
+ struct _Jv_JNI_LocalFrame *locals;
+
public:
jclass GetSuperclass (jclass cl)
{ return p->GetSuperclass (this, cl); }
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index a8d1fac6524..c9eb1b95c80 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -72,6 +72,10 @@ void _Jv_InitGC (void);
/* Register a finalizer. */
void _Jv_RegisterFinalizer (void *object, _Jv_FinalizerFunc *method);
+/* Allocate some unscanned, unmoveable memory. Return NULL if out of
+ memory. */
+void *_Jv_MallocUnchecked (jsize size) __attribute__((__malloc__));
+
/* Run finalizers for objects ready to be finalized.. */
void _Jv_RunFinalizers (void);
/* Run all finalizers. Should be called only before exit. */
@@ -197,4 +201,8 @@ extern "C"
extern char *_Jv_ThisExecutable (void);
extern void _Jv_ThisExecutable (const char *);
+/* Initialize JNI. */
+extern void _Jv_JNI_Init (void);
+
+
#endif /* __JAVA_JVM_H__ */
OpenPOWER on IntegriCloud