aboutsummaryrefslogtreecommitdiff
path: root/libjava/jni.cc
AgeCommit message (Collapse)AuthorFilesLines
2001-04-02jni.cc (wrap_value<jclass>): New specialization.Marcus G. Daniels1-0/+9
2001-04-02 Marcus G. Daniels <mgd@swarm.org> * jni.cc (wrap_value<jclass>): New specialization. From-SVN: r41021
2001-04-02jni.cc (add_char): Correctly encode non-ascii characters.Tom Tromey1-5/+5
* jni.cc (add_char): Correctly encode non-ascii characters. (add_char): Define even when INTERPRETER not defined. (mangled_name): Likewise. (_Jv_GetJNIEnvNewFrame): Likewise. (_Jv_LookupJNIMethod): Likewise. From-SVN: r41010
2001-03-25exception.cc (java_eh_info): Make value type jthrowable.Richard Henderson1-1/+1
* exception.cc (java_eh_info): Make value type jthrowable. (_Jv_type_matcher): Remove now unneeded cast. (_Jv_Throw): Make argument type jthrowable. Munge name for SJLJ_EXCEPTIONS here ... * gcj/cni.h: ... not here. (JvThrow): Remove. * gcj/javaprims.h (_Jv_Throw, _Jv_Sjlj_Throw): Update declarations. * defineclass.cc, interpret.cc, jni.cc, posix-threads.cc, prims.cc, resolve.cc, gnu/gcj/runtime/natFirstThread.cc, gnu/gcj/xlib/natDrawable.cc, gnu/gcj/xlib/natFont.cc, gnu/gcj/xlib/natWMSizeHints.cc, gnu/gcj/xlib/natWindowAttributes.cc, gnu/gcj/xlib/natXImage.cc, java/io/natFile.cc, java/io/natFileDescriptorEcos.cc, java/io/natFileDescriptorPosix.cc, java/io/natFileDescriptorWin32.cc, java/io/natFileWin32.cc, java/lang/natClass.cc, java/lang/natClassLoader.cc, java/lang/natDouble.cc, java/lang/natObject.cc, java/lang/natPosixProcess.cc, java/lang/natRuntime.cc, java/lang/natString.cc, java/lang/natSystem.cc, java/lang/natThread.cc, java/lang/reflect/natArray.cc, java/lang/reflect/natConstructor.cc, java/lang/reflect/natField.cc, java/lang/reflect/natMethod.cc, java/util/zip/natDeflater.cc, java/util/zip/natInflater.cc: Use throw, not JvThrow or _Jv_Throw. From-SVN: r40838
2001-03-23jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.Tom Tromey1-4/+8
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields. * java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField unconditionally. * include/jvm.h (_Jv_ResolveField): Declare. * include/java-interp.h (_Jv_ResolveField): Don't declare. * resolve.cc (_Jv_ResolveField): No longer conditional on INTERPRETER. From-SVN: r40785
2001-03-22jni.cc (add_char): Handle `.' like `/'.Marcus G. Daniels1-1/+4
2001-03-22 Marcus G. Daniels <mgd@swarm.org> * jni.cc (add_char): Handle `.' like `/'. From-SVN: r40748
2001-01-27jni.cc (_Jv_JNIFunctions): Added comment for each entry in native interface ↵Tom Tromey1-230/+231
structure. * jni.cc (_Jv_JNIFunctions): Added comment for each entry in native interface structure. From-SVN: r39298
2001-01-26jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external to internal ↵Tom Tromey1-10/+14
representation. * jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external to internal representation. (_Jv_JNI_GetAnyFieldID): Likewise. Also, only use _Jv_FindClassFromSignature. From-SVN: r39289
2000-11-01jni.cc: Added include of java/lang/ThreadGroup.h.Warren Levy1-0/+1
* jni.cc: Added include of java/lang/ThreadGroup.h. * gcj/javaprims.h: Removed Replaceable and Resolvable from namespace per change of 2000-10-05. From-SVN: r37173
2000-10-06natField.cc (BooleanClass): Don't define.Tom Tromey1-13/+7
* java/lang/reflect/natField.cc (BooleanClass): Don't define. * java/lang/reflect/natArray.cc (BooleanClass): Don't define. * java/lang/Class.h (Object): Added `class$' field. * java/lang/Object.h (Object): Added `class$' field. * defineclass.cc (ClassClass): Use `class$' form. (ClassObject): Likewise. * resolve.cc (ClassObject): Use `class$' form. (ObjectClass): Likewise. * interpret.cc (ClassError): Removed. * java/net/natPlainDatagramSocketImpl.cc (BooleanClass): Use `class$' form. (IntegerClass): Likewise. * java/net/natPlainSocketImpl.cc (BooleanClass): Use `class$' form. * java/lang/natClassLoader.cc (CloneableClass): Use `class$' form. (ObjectClass, ClassClass, VMClassLoaderClass, ClassLoaderClass, SerializableClass): Likewise. Include Serializable.h, Cloneable.h. * java/lang/natSystem.cc (SystemClass): Removed. (init_properties): Use `class$' form. * java/lang/natObject.cc (CloneableClass): Removed. (clone): Use `class$' form. * java/lang/natClass.cc (CloneableClass): Use `class$' form. (ObjectClass, ErrorClass, ClassClass, MethodClass, FieldClass, ConstructorClass): Likewise. * java/lang/reflect/natMethod.cc (ObjectClass): Use `class$' form. (ClassClass, VoidClass, ByteClass, ShortClass, CharacterClass, IntegerClass, LongClass, FloatClass, DoubleClass): Likewise. * java/io/natObjectInputStream.cc (ObjectClass): Use `class$' form. (ClassClass): Likewise. * include/jvm.h (StringClass): Use `class$' form. * prims.cc (ObjectClass): Removed. (_Jv_RunMain): Use `class$' form. (_Jv_AllocObject): Likewise. * jni.cc (ClassClass): Use `class$' form. (ThrowableClass): Likewise. (ObjectClass): Likewise. (MethodClass): Likewise. (ThreadGroupClass): Likewise. (NativeThreadClass): Likewise. * boehm.cc (ObjectClass): Removed. (ClassClass): Removed. (_Jv_MarkObj): Use `class$' form. * gcj/field.h (JvFieldIsRef): Use `class$' form. Include RawData.h. From-SVN: r36740
2000-08-02[multiple changes]Bryce McKinlay1-1/+1
2000-08-02 Bryce McKinlay <bryce@albatross.co.nz> * interpret.cc (_Jv_InterpMethod::continue1): Type of `fun' changed to match C declaration in ffi.h. * Makefile.am: Add java/awt/Button.java. * Makefile.in: Rebuilt. 2000-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com> * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Type of the cast of the second argument to `ffi_raw_call' changed to match prototype. 2000-07-26 Alexandre Petit-Bianco <apbianco@cygnus.com> * jni.cc (_Jv_JNIMethod::call): Type of the cast of the second argument to `ffi_raw_call' changed to match prototype. From-SVN: r35418
2000-04-20* jni.cc (_Jv_JNI_PopSystemFrame): Clear `env->ex'.Tom Tromey1-1/+5
From-SVN: r33285
2000-04-20jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a ↵Tom Tromey1-4/+5
loader. * jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a loader. From-SVN: r33272
2000-04-02JVMPI changes...Anthony Green1-0/+66
Sun Apr 2 08:27:18 2000 Anthony Green <green@redhat.com> * configure: Rebuilt. * configure.in: Add --disable-jvmpi. * include/config.h.in: Rebuilt. * acconfig.h: Add ENABLE_JVMPI. * include/jvm.h: Declare _Jv_DisableGC and _Jv_EnableGC. (_Jv_JVMPI_Notify_OBJECT_ALLOC): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. (_Jv_JVMPI_Notify_THREAD_END): New define. * prims.cc (_Jv_JVMPI_Notify_OBJECT_ALLOC): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. (_Jv_JVMPI_Notify_THREAD_END): Declare. * prims.cc (_Jv_AllocObject): Generate JVMPI object allocation events. * java/lang/natThread.cc: Include JVMPI headers if necessary. (finish_): Generate JVMPI thread end events. (run_): Generate JVMPI thread start events. * gnu/gcj/runtime/natFirstThread.cc (run): Call JNI_OnLoad for any preloaded JNI library. Include JVMPI headers if necessary. (run): Generate JVMPI thread start events. * boehm.cc: Define GC_disable and GC_enable. (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. (disable_gc_mutex): Declare. * nogc.cc (_Jv_DisableGC): New function. (_Jv_EnableGC): New function. * jni.cc (_Jv_JNI_GetEnv): Handle JVMPI interface requests. (_Jv_JVMPI_Interface): Define. (jvmpiEnableEvent): New function. (_Jv_JNI_Init): Initialize _Jv_JVMPI_Interface. * include/jvmpi.h: New file. From-SVN: r32866
2000-03-27jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception set, throw it.Tom Tromey1-3/+3
* jni.cc (_Jv_JNI_PopSystemFrame): If environment has exception set, throw it. (call): Don't throw exception here. From-SVN: r32770
2000-03-14jni.cc (mangled_name): Fixed assertion.Tom Tromey1-3/+5
* jni.cc (mangled_name): Fixed assertion. (JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument; turned assert into actual failure. From-SVN: r32546
2000-03-07All files: Updated copyright information.Tom Tromey1-1/+1
* All files: Updated copyright information. * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. From-SVN: r32387
2000-03-07jni.cc (MARK_NONE): New define.Tom Tromey1-50/+99
* jni.cc (MARK_NONE): New define. (MARK_USER): Likewise. (MARK_SYSTEM): Likewise. (struct _Jv_JNI_LocalFrame): Made `marker' bigger and `size' smaller. (_Jv_JNI_DeleteLocalRef): Use MARK_NONE in assert. (_Jv_JNI_EnsureLocalCapacity): Use MARK_NONE. (_Jv_JNI_PushLocalFrame): Use MARK_USER. (_Jv_JNI_PopLocalFrame): New version with additional `stop' argument. (call): Use MARK_SYSTEM. (_Jv_GetJNIEnvNewFrame): New function. (_Jv_LookupJNIMethod): New function. (_Jv_JNI_PopSystemFrame): New function. (call): Use _Jv_JNI_PopSystemFrame and _Jv_LookupJNIMethod. From-SVN: r32373
2000-03-02java-interp.h: Don't include MethodInvocation.h.Tom Tromey1-207/+410
* include/java-interp.h: Don't include MethodInvocation.h. (class _Jv_InterpMethod): Don't make MethodInvocation a friend. * Makefile.in: Rebuilt. * Makefile.am (gnu/gcj/runtime/MethodInvocation.h): Removed. (ordinary_java_source_files): Don't mention MethodInvocation.java. * gnu/gcj/runtime/MethodInvocation.java: Removed. * interpret.cc (MethodInvocation::continue1): Removed. (run): Handle exceptions here. * java/lang/ClassLoader.java (defineClass1, defineClass2): Removed. * java/lang/natClassLoader.cc (defineClass0): Catch exceptions here. (defineClass2): Removed. * java/lang/reflect/Method.java (hack_trampoline, hack_call): Removed. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Catch exceptions here. (hack_call): Removed. * java/lang/Class.h (Class): Removed hackRunInitializers, hackTrampoline. * java/lang/natClass.cc (hackRunInitializers): Removed. (initializeClass): Catch exceptions here. Include ExceptionInInitializerError.h. * java/lang/Class.java (hackTrampoline, hackRunInitializers): Removed. * java/lang/Object.h (Object): Don't mention hack12_6. * java/lang/natObject.cc (_Jv_FinalizeObject): Catch exceptions here. * java/lang/Object.java (hack12_6): Removed. * java/lang/natThread.cc (run_): Renamed. Catch exceptions here. (start): Use run_, not run__. * java/lang/Thread.java (run_): Renamed from run__; old run_ removed. * jni.cc (_Jv_JNI_FindClass): Handle exceptions. (_Jv_JNI_EnsureLocalCapacity): Likewise. (_Jv_JNI_DefineClass): Likewise. (_Jv_JNI_ThrowNew): Likewise. (_Jv_JNI_AllocObject): Likewise. (_Jv_JNI_GetAnyMethodID): Likewise. (_Jv_JNI_CallAnyMethodV): Likewise. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. (_Jv_JNI_CallAnyVoidMethodA): Likewise. (_Jv_JNI_GetAnyFieldID): Likewise. (_Jv_JNI_NewString): Likewise. (_Jv_JNI_NewStringUTF): Likewise. (_Jv_JNI_GetStringUTFChars): Likewise. (_Jv_JNI_NewObjectArray): Likewise. (_Jv_JNI_NewPrimitiveArray): Likewise. (_Jv_JNI_GetPrimitiveArrayRegion): Likewise. (_Jv_JNI_GetStringRegion): Likewise. (_Jv_JNI_GetStringUTFRegion): Likewise. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. (_Jv_JNI_MonitorEnter): Likewise. (_Jv_JNI_MonitorExit): Likewise. (_Jv_JNI_ToReflectedField): Likewise. (_Jv_JNI_ToReflectedMethod): Likewise. (_Jv_JNI_RegisterNatives): Likewise. (_Jv_JNI_AttachCurrentThread): Likewise. (_Jv_JNI_DestroyJavaVM): Likewise. From-SVN: r32294
2000-02-26Minor clean up and bug fix.Anthony Green1-3/+2
From-SVN: r32196
2000-02-25jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on `INTERPRETER'.Tom Tromey1-0/+4
* jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body on `INTERPRETER'. From-SVN: r32156
2000-02-18jvm.h (_Jv_GetJavaVM): Declare.Tom Tromey1-12/+87
* include/jvm.h (_Jv_GetJavaVM): Declare. * include/java-interp.h (_Jv_GetFirstMethod): New function. (_Jv_MethodBase::get_method): New method. (_Jv_JNIMethod::set_function): New method. * jni.cc (_Jv_JNI_UnregisterNatives): New function. (_Jv_JNI_RegisterNatives): New function. (_Jv_JNIFunctions): Updated for new functions. (_Jv_GetJavaVM): New function. (_Jv_JNI_GetJavaVM): Use it. Now static. (_Jv_JNI_AttachCurrentThread): Create a new JNIEnv if this thread is already a Java thread but does not have a JNIEnv yet. * java/lang/natRuntime.cc (_load): Pass the JavaVM to the onload function. From-SVN: r32056
2000-02-17* jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.Tom Tromey1-0/+9
From-SVN: r32021
2000-02-16jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.Tom Tromey1-3/+26
* jni.cc (_Jv_JNI_NewObjectV): Corrected assertion. (_Jv_JNI_NewObject): Likewise. (_Jv_JNI_NewObjectA): Likewise. (_Jv_JNI_CallAnyMethodV): In constructor case, pass correct value as "return" type to _Jv_CallAnyMethodA. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. From-SVN: r32017
2000-02-16jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not findClass.Tom Tromey1-1/+1
* jni.cc (_Jv_JNI_FindClass): Use ClassLoader.loadClass, not findClass. From-SVN: r32013
2000-02-16resolve.cc (ncode): Set args_raw_size.Tom Tromey1-3/+18
* resolve.cc (ncode): Set args_raw_size. Compute jni_cif and jni_arg_types. (init_cif): Added `rtype_p' argument. * include/java-interp.h (class _Jv_MethodBase): Added args_raw_size. (class _Jv_InterpMethod): Removed args_raw_size. (class _Jv_JNIMethod): Added jni_cif and jni_arg_types fields. * jni.cc (call): Pass JNIEnv and (for static methods only) the class pointer as well as the ordinary arguments. From-SVN: r31995
2000-02-15* jni.cc (mangled_name): Skip leading `(' in signature.Tom Tromey1-1/+2
From-SVN: r31993
2000-02-15* jni.cc (add_char): Added missing `else'.Tom Tromey1-1/+1
From-SVN: r31991
2000-02-15jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc fails.Tom Tromey1-2/+7
* jni.cc (_Jv_JNI_AttachCurrentThread): Return error if malloc fails. From-SVN: r31986
2000-02-10natNativeThread.cc: New file.Tom Tromey1-3/+256
* gnu/gcj/jni/natNativeThread.cc: New file. * gnu/gcj/jni/NativeThread.java: New file. * java/lang/Thread.java (data): Now a RawData. * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv): Declare. * Makefile.in: Rebuilt. * Makefile.am (java/lang/Thread.h): New target. (ordinary_java_source_files): Added NativeThread.java. (nat_source_files): Added natNativeThread.cc. * java/lang/natThread.cc: Include <jni.h> (struct natThread): Added `jni_env' field. (_Jv_GetCurrentJNIEnv): New function. (_Jv_SetCurrentJNIEnv): Likewise. (initialize_native): Initialize jni_env. Include RawData.h. * jni.cc (ThreadGroupClass): New define. (_Jv_JNI_InvokeFunctions): New structure. (JNI_GetCreatedJavaVMs): New function. (the_vm): New global. (JNI_GetDefaultJavaVMInitArgs): New function. Include NativeThread.h. (NativeThreadClass): New define. (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1. (_Jv_JNI_DestroyJavaVM): New function. (_Jv_JNI_AttachCurrentThread): New function. (_Jv_JNI_DetachCurrentThread): New function. (_Jv_JNI_GetEnv): New function. (JNI_CreateJavaVM): New function. (_Jv_JNI_GetJavaVM): New function. (_Jv_JNIFunctions): Added entry for GetJavaVM. * include/jni.h (JavaVMAttachArgs): New structure. (JNI_EDETACHED): New define. (JNI_EVERSION): Likewise. (JavaVM): Define properly. (struct JNIInvokeInterface): New structure. (class _Jv_JavaVM): New class. (JNI_OnLoad, JNI_OnUnload): Declare. (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM, JNI_GetCreatedJavaVMs): Declare. (JavaVMInitArgs): New typedef. (JavaVMOption): Likewise. (JNI_ERR): New define. (JNI_OK): Likewise. From-SVN: r31901
2000-02-08jni.cc (ThrowableClass): New define.Tom Tromey1-15/+35
* jni.cc (ThrowableClass): New define. (_Jv_JNI_Throw): Check argument. (_Jv_JNI_ThrowNew): Likewise. (wrap_value): Don't wrap object if it is NULL. (_Jv_JNI_DefineClass): Use wrap_value. (_Jv_JNI_FindClass): Likewise. (_Jv_JNI_GetSuperclass): Likewise. (_Jv_JNI_ExceptionOccurred): Likewise. (_Jv_JNI_AllocObject): Likewise. (_Jv_JNI_GetObjectClass): Likewise. (_Jv_JNI_NewString): Likewise. (_Jv_JNI_NewStringUTF): Likewise. (_Jv_JNI_NewObjectArray): Likewise. (_Jv_JNI_GetObjectArrayElement): Likewise. (_Jv_JNI_NewPrimitiveArray): Likewise. (_Jv_JNI_ToReflectedField): Likewise. (_Jv_JNI_ToReflectedMethod): Likewise. (_Jv_JNI_AllocObject): Check argument. (_Jv_JNI_NewObjectV): Likewise. (_Jv_JNI_NewObject): Likewise. (_Jv_JNI_NewObjectA): Likewise. (_Jv_JNI_GetObjectClass): Likewise. (_Jv_JNI_GetField): Likewise. (_Jv_JNI_SetField): Likewise. From-SVN: r31845
2000-02-07jni.cc (add_char): Conditional on INTERPRETER.Tom Tromey1-6/+5
* jni.cc (add_char): Conditional on INTERPRETER. (mangled_name): Likewise. (call): Likewise. * include/java-interp.h (class _Jv_MethodBase): Conditional on INTERPRETER. (class _Jv_JNIMethod): Likewise. From-SVN: r31839
2000-02-04defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers.Tom Tromey1-9/+119
* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase pointers. (handleMethodsEnd): Fixed error messages. Create a _Jv_JNIMethod if the method is native. * resolve.cc (ncode): Don't handle native methods. (_Jv_JNIMethod::ncode): New method. (_Jv_PrepareClass): Handle native methods. * jni.cc (call): Renamed from _Jv_JNI_conversion_call. Include AbstractMethodError.h. (add_char): New function. (mangled_name): Likewise. * include/java-interp.h (class _Jv_JNIMethod): New class. (class _Jv_MethodBase): New class. (class _Jv_InterpMethod): Derive from _Jv_MethodBase. (_Jv_InterpClass): Changed `interpreted_methods' field to type `_Jv_MethodBase'. * include/jvm.h (_Jv_FindSymbolInExecutable): Declare. * java/lang/natRuntime.cc (libraries_size, libraries_count, libraries): New globals. (add_library): New function. (_Jv_FindSymbolInExecutable): New function. * java/lang/natClassLoader.cc (initiated_classes, loaded_classes): Now static. From-SVN: r31790
2000-02-02java-interp.h (_Jv_JNI_conversion_call): Declare.Tom Tromey1-10/+19
* include/java-interp.h (_Jv_JNI_conversion_call): Declare. * resolve.cc (ncode): Use _Jv_JNI_conversion_call when constructing the closure if the function is native. * jni.cc (_Jv_JNI_conversion_call): Now returns `void'. No longer a template function, #if'd out, or static. Include <java-interp.h>. From-SVN: r31746
2000-02-01jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'.Tom Tromey1-44/+34
* jni.cc (_Jv_JNI_PopLocalFrame): Leave loop when `n == NULL'. (_Jv_JNI_conversion_call): _Jv_JNI_PopLocalFrame will never leave `locals == NULL'. (wrap_value): New function. (_Jv_JNI_CallAnyMethodV): Use it. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_GetField): Use wrap_value; removed specialized version. (_Jv_JNI_GetStaticField): Likewise. From-SVN: r31736
2000-02-01jni.cc (_Jv_JNI_GetField): Specialize for jobject.Tom Tromey1-1/+16
* jni.cc (_Jv_JNI_GetField): Specialize for jobject. (_Jv_JNI_GetStaticField): Likewise. From-SVN: r31735
2000-02-01prims.cc (_Jv_MallocUnchecked): New function.Tom Tromey1-45/+267
* 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. From-SVN: r31730
2000-01-26method.h (JvNumMethods): Moved from Class.h.Tom Tromey1-41/+236
* gcj/method.h (JvNumMethods): Moved from Class.h. (JvGetFirstMethod): Likewise. * java/lang/Class.h (Object): Updated decl of _Jv_JNI_ToReflectedField. (Object): Added _Jv_JNI_ToReflectedMethod as a friend. * Makefile.in: Rebuilt. * Makefile.am (java/lang/reflect/Field.h): Added `jboolean' argument of _Jv_JNI_ToReflectedField. (java/lang/reflect/Constructor.h): Added _Jv_JNI_ToReflectedMethod as a friend. (java/lang/reflect/Method.h): Likewise. * include/jni.h (class _Jv_JNIEnv): Added `klass' member. Use __GCJ_JNI_IMPL__. (jweak): New typedef. (struct JNINativeInterface): Correctly declare remaining entries. * jni.cc: Include Class.h, ClassLoader.h. (_Jv_JNI_FindClass): New function. (_Jv_JNI_DefineClass): New function. (_Jv_JNI_conversion_call): New function. (_Jv_JNI_FindClass): Use current class loader to find class. (_Jv_JNI_ExceptionCheck): New function. (_Jv_JNI_FromReflectedField): Now static. (MethodClass): New define. (_Jv_JNI_FromReflectedMethod): New function. (_Jv_JNI_ToReflectedMethod): Likewise. Include Method.h. (_Jv_JNI_IsAssignableFrom): Renamed. (_Jv_JNI_GetStringRegion): New function. Include StringIndexOutOfBoundsException.h. (_Jv_JNI_GetStringUTFRegion): New function. (_Jv_JNIFunctions): Updated for new functions. (_Jv_JNI_GetPrimitiveArrayCritical): New function (_Jv_JNI_ReleasePrimitiveArrayCritical): Likewise. (_Jv_JNI_GetStringCritical): New function. (_Jv_JNI_ReleaseStringCritical): Likewise. (get_throwable): Removed. (GCJ_JV_JNIENV_FRIEND): Removed. (__GCJ_JNI_IMPL__): Define. Include method.h. From-SVN: r31638
2000-01-21natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA.Tom Tromey1-224/+986
* java/lang/reflect/natConstructor.cc (newInstance): Use _Jv_CallAnyMethodA. * include/jvm.h: Declare _Jv_CallAnyMethodA. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Renamed from _Jv_CallNonvirtualMethodA. Changed interface; overloaded. Include <jni.h>. (COPY): Removed. (invoke): Use _Jv_CallAnyMethodA. (VAL): Redefined. * java/lang/Class.h (Class): Declare JvGetFirstStaticField, JvNumStaticFields, JvNumMethods, and JvGetFirstMethod as friend functions. (struct _Jv_Method): Added getNextMethod method. (JvNumMethods): New function. (JvGetFirstMethod): Likewise. * gcj/field.h (JvGetFirstStaticField): New function. (JvNumStaticFields): Likewise. (getNextField): Renamed from getNextInstanceField. (struct _Jv_Field): New method getClass. * jni.cc: Wrote many new functions. * include/jni.h (JNI_TRUE): Define. (JNI_FALSE): Likewise. (jobject, jclass, jstring, jarray, jthrowable, jobjectArray, jbyteArray, jshortArray, jintArray, jlongArray, jbooleanArray, jcharArray, jfloatArray, jdoubleArray): New typedefs. (jfieldID, jmethodID): Likewise. (JNI_COMMIT, JNI_ABORT): New defines. (JNINativeMethod): New struct. (struct JNINativeInterface): Correctly declared more entries. (class _Jv_JNIEnv): Added `ex' member. (JNI_VERSION_1_1): New define. (JNI_VERSION_1_2): Likewise. * boehm.cc (_Jv_MarkObj): Use getNextField, not getNextInstanceField. From-SVN: r31553
2000-01-19* All files: Updated copyright to reflect Cygnus purchase.Tom Tromey1-1/+1
From-SVN: r31504
1999-09-10configure: Rebuilt.Tom Tromey1-1/+1
* configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. From-SVN: r29278
1999-04-07Initial revisionTom Tromey1-0/+308
From-SVN: r26263