summaryrefslogtreecommitdiffstats
path: root/libjava/jni.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>tromey2003-02-121-12/+75
| | | | | | | | | | | | | * jni.cc (_Jv_LookupJNIMethod): Modify to accept the size of the arguments for a JNI function. For Win32, modify to search for all forms of possible exported names of an stdcall JNI function. (_Jv_JNIMethod::call): Modify to calculate the size of the arguments passed to a JNI function and pass it to _Jv_LookupJNIMethod. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62796 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_NewObjectArray): Check that initializer can betromey2003-01-311-1/+6
| | | | | | | | | cast to element type. (_Jv_JNI_SetObjectArrayElement): Check array bounds. (_Jv_JNI_GetObjectArrayElement): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62210 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc: Added `name' argument.tromey2002-12-031-2/+3
| | | | | | | | | * include/jni.h (struct JNINativeInterface) [DefineClass]: Added `const char *' argument. (class _Jv_JNIEnv) [DefineClass]: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59756 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-11-19 Ranjit Mathew <rmathew@hotmail.com>tromey2002-11-191-124/+133
| | | | | | | | | | | | * include/jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function pointer declarations in accordance with Sun's JDKs. Define JNIIMPEXP to either JNIEXPORT or JNIIMPORT based on whether __GCJ_JNI_IMPL__ has been defined or not. * jni.cc: Add missing JNICALL and JNIEXPORT attributes to JNI function definitions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59277 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_GetJNIEnvNewFrame): Set env->ex in all cases.tromey2002-11-101-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58971 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (array_from_valist): Assume that jlong won't betromey2002-11-061-2/+8
| | | | | | | promoted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58859 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_AllocObject): Removed old FIXME comment.tromey2002-10-231-8/+8
| | | | | | | | (array_from_valist): Correctly handle promotion for jint, jlong, jfloat, and jdouble. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58476 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNIFunctions): Fixed typo.tromey2002-05-101-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53353 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2002-04-101-16/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (java/lang/Thread.h): Mark _Jv_AttachCurrentThreadAsDaemon as friend. * gcj/javaprims.h (_Jv_AttachCurrentThreadAsDaemon): Declare. * gcj/cni.h (JvAttachCurrentThreadAsDaemon): New function. * java/lang/natThread.cc (_Jv_AttachCurrentThreadAsDaemon): New function. * java/lang/natRuntime.cc (_load): Recognize JNI_VERSION_1_4. * jni.cc (_Jv_JNI_GetVersion): Return JNI_VERSION_1_4. (_Jv_JNI_InvokeFunctions): Added _Jv_JNI_AttachCurrentThreadAsDaemon. (_Jv_JNI_GetEnv): Handle JNI_VERSION_1_4. (JNI_GetDefaultJavaVMInitArgs): Likewise. (JNI_CreateJavaVM): Likewise. (_Jv_JNI_AttachCurrentThread): Likewise. (_Jv_JNI_AttachCurrentThread): Added `is_daemon' argument. (_Jv_JNI_AttachCurrentThreadAsDaemon): New method. (_Jv_JNIFunctions): Initialize new fields. (_Jv_JNI_NewDirectByteBuffer): New function. (_Jv_JNI_GetDirectBufferAddress): Likewise. (_Jv_JNI_GetDirectBufferCapacity): Likewise. * include/jni.h (JNI_VERSION_1_4): New macro. (JNIInvokeInterface::AttachCurrentThreadAsDaemon): New field. (_Jv_JavaVM::AttachCurrentThreadAsDaemon): New method. (JNINativeInterface::NewDirectByteBuffer): New field. (JNINativeInterface::GetDirectBufferAddress): New field. (JNINativeInterface::GetDirectBufferCapacity): New field. (_Jv_JNIEnv::NewDirectByteBuffer): New method. (_Jv_JNIEnv::GetDirectBufferAddress): New method. (_Jv_JNIEnv::GetDirectBufferCapacity): New method. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52144 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_LookupJNIMethod): Throw UnsatisfiedLinkError, nottromey2002-03-051-2/+2
| | | | | | | AbstractMethodError. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50337 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-02-13 Martin Kahlert <martin.kahlert@infineon.com>tromey2002-02-131-2/+1
| | | | | | | | * jni.cc (_Jv_JNI_AttachCurrentThread): env->locals assigned correctly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49737 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-02-08 Martin Kahlert <martin.kahlert@infineon.com>tromey2002-02-081-2/+11
| | | | | | | | | | * jni.cc (_Jv_JNI_NewLocalRef): Make sure, that NULL frame is not dereferenced. (_Jv_JNI_AttachCurrentThread): Produce full featured env->locals frame. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49615 138bc75d-0d04-0410-961f-82ee72b054a4
* For PR libgcj/5103:tromey2001-12-161-4/+0
| | | | | | | | | | | | | | | | | * include/jvm.h (__GCJ_JNI_IMPL__): Define. * include/config.h.in: Rebuilt. * configure: Rebuilt. * configure.in: Define JV_HAVE_INTTYPES_H if inttypes.h found. Added comment for HAVE_DLOPEN to avoid autoheader error. * gcj/libgcj-config.h.in (JV_HAVE_INTTYPES_H): Added. * include/jni.h: Include <gcj/libgcj-config.h>. Don't include CNI-specific headers if we are compiling ordinary JNI code with a C++ compiler. Include <inttypes.h> and JNIWeakRef.h when appropriate. * jni.cc: Don't include JNIWeakRef.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48082 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (call): Synchronize if required.tromey2001-12-121-0/+14
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47949 138bc75d-0d04-0410-961f-82ee72b054a4
* Obvious jni weak reference fixgreen2001-11-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47128 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in: Rebuilt.tromey2001-11-131-20/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (ordinary_java_source_files): Added JNIWeakRef.java. * jni.cc: Include JNIWeakRef.h. (unwrap): New function. (_Jv_JNI_DefineClass): Use it. (_Jv_JNI_GetSuperclass): Likewise. (_Jv_JNI_IsAssignableFrom): Likewise. (_Jv_JNI_Throw): Likewise. (_Jv_JNI_ThrowNew): Likewise. (_Jv_JNI_IsSameObject): Likewise. (_Jv_JNI_AllocObject): Likewise. (_Jv_JNI_GetObjectClass): Likewise. (_Jv_JNI_IsInstanceOf): Likewise. (_Jv_JNI_GetAnyMethodID): Likewise. (array_from_valist): Likewise. (_Jv_JNI_CallAnyMethodV): Likewise. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. (_Jv_JNI_CallAnyVoidMethodA): Likewise. (_Jv_JNI_CallStaticMethodV): Likewise. (_Jv_JNI_CallStaticMethod): Likewise. (_Jv_JNI_CallStaticMethodA): Likewise. (_Jv_JNI_NewObjectV): Likewise. (_Jv_JNI_NewObject): Likewise. (_Jv_JNI_NewObjectA): Likewise. (_Jv_JNI_GetField): Likewise. (_Jv_JNI_SetField): Likewise. (_Jv_JNI_GetAnyFieldID): Likewise. (_Jv_JNI_SetStaticField): Likewise. (_Jv_JNI_GetStringLength): Likewise. (_Jv_JNI_GetStringChars): Likewise. (_Jv_JNI_ReleaseStringChars): Likewise. (_Jv_JNI_GetStringUTFLength): Likewise (_Jv_JNI_GetStringUTFChars): Likewise. (_Jv_JNI_GetStringRegion): Likewise. (_Jv_JNI_GetStringUTFRegion): Likewise. (_Jv_JNI_GetStringCritical): Likewise. (_Jv_JNI_GetArrayLength): Likewise. (_Jv_JNI_NewObjectArray): Likewise. (_Jv_JNI_GetObjectArrayElement): Likewise. (_Jv_JNI_SetObjectArrayElement): Likewise. (_Jv_JNI_GetPrimitiveArrayElements): Likewise. (_Jv_JNI_ReleasePrimitiveArrayElements): Likewise. (_Jv_JNI_GetPrimitiveArrayRegion): Likewise. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. (_Jv_JNI_MonitorEnter): Likewise. (_Jv_JNI_MonitorExit): Likewise. (_Jv_JNI_ToReflectedField): Likewise. (_Jv_JNI_FromReflectedField): Likewise. (_Jv_JNI_ToReflectedMethod): Likewise. (_Jv_JNI_FromReflectedMethod): Likewise. (_Jv_JNI_NewGlobalRef): Likewise. (_Jv_JNI_DeleteGlobalRef): Likewise. (_Jv_JNI_DeleteLocalRef): Likewise. (_Jv_JNI_NewLocalRef): Likewise. (_Jv_JNI_NewWeakGlobalRef): New function. (_Jv_JNI_DeleteWeakGlobalRef): Likewise. (_Jv_JNIFunctions): Updated for new methods. (NOT_IMPL): Removed. * gnu/gcj/runtime/JNIWeakRef.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46990 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (JNI_CreateJavaVM): Call _Jv_CreateJavaVM. Don't callbryce2001-10-301-2/+3
| | | | | | | _Jv_JNI_Init. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46633 138bc75d-0d04-0410-961f-82ee72b054a4
* Eliminate use of C++ static constructors.bryce2001-10-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * interpret.cc: Remove static Utf8Consts. Use namespace gcj. * jni.cc: Likewise. * resolve.cc: Likewise. * defineclass.cc: Likewise. (_Jv_ClassReader::handleClassBegin): Synchronize call to _Jv_RegisterClass. * include/jvm.h (void_signature, clinit_name, init_name, finit_name): Declare in namespace gcj. * java/lang/Class.h (Class): Remove initialization for primitive types. (friend void _Jv_InitPrimClass): This is in prims.cc. * prims.cc (_Jv_InitPrimClass): Do primitive type initialization here instead. (void_signature, clinit_name, init_name, finit_name): Define in namespace gcj. (_Jv_CreateJavaVM): Call _Jv_InitThreads, _Jv_InitGC, and _Jv_InitializeSyncMutex from here. Initialize Utf8 constants. Initialize primitive types. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Don't call initialization routines. Don't synchronize. * java/lang/natRuntime.cc (_load): Synchronize on java.lang.Class across dlopen call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46282 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-10-04 Martin Kahlert <martin.kahlert@infineon.com>tromey2001-10-051-1/+1
| | | | | | | * jni.cc (_Jv_JNI_DeleteLocalRef): Use correct frame size git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46034 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (array_from_valist): Use promoted types for va_arg.aj2001-09-171-14/+14
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45650 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (nathash, nathash_count, nathash_size): New globals.tromey2001-08-201-21/+152
| | | | | | | | | | | | | | | | (DELETED_ENTRY): New define. (hash): New function. (nathash_find_slot): Likewise. (natrehash): Likewise. (nathash_add): Likewise. (_Jv_JNI_RegisterNatives): No longer interpreter-specific. Use nathash_add. (nathash_find): New function. (_Jv_LookupJNIMethod): Use it. Synchronize body. (call): Synchronize around assignment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45060 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc: Include IdentityHashMap.h, not Hashtable.h.tromey2001-08-151-7/+7
| | | | | | | | | | | | | | (local_ref_table, global_ref_table): Now IdentityHashMap. (_Jv_JNI_Init): Updated for new types. (mark_for_gc): Likewise. (unmark_for_gc): Likewise. * gcj/javaprims.h: Rebuilt class list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added new file. * java/util/IdentityHashMap.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44929 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-08-02 Martin Kahlert <martin.kahlert@infineon.com>tromey2001-08-021-0/+3
| | | | | | | | * jni.cc (JNI_CreateJavaVM): Call _Jv_JNI_Init in order to initialize global_ref_table/local_ref_table. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44583 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_NewLocalRef): Search other frames.tromey2001-06-151-8/+15
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43415 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (ClassClass): Removed; updated all users.tromey2001-06-151-30/+28
| | | | | | | | | | | | | | | | | | | | | | | | | (ObjectClass): Likewise. (ThrowableClass): Likewise. (MethodClass): Likewise. (ThreadGroupClass): Likewise. (local_ref_table): Renamed from `ref_table'. (global_ref_table): New global. (_Jv_JNI_Init): Initialize both ref tables. (mark_for_gc): Added `ref_table' parameter. (unmark_for_gc): Likewise. Also, fail if we unreferenced too many times. (_Jv_JNI_NewGlobalRef): Updated for new mark function. (_Jv_JNI_DeleteGlobalRef): Likewise. (_Jv_JNI_DeleteLocalRef): Likewise. (_Jv_JNI_NewLocalRef): Likewise. (_Jv_JNI_PopLocalFrame): Likewise. (_Jv_JNI_GetStringChars): Likewise. (_Jv_JNI_ReleaseStringChars): Likewise. (_Jv_JNI_GetPrimitiveArrayElements): Likewise. (_Jv_JNI_ReleasePrimitiveArrayElements): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43409 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement invocation interface; don't create new thread for main.bothner2001-05-221-23/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42428 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-05-03 Martin Kahlert <martin.kahlert@infineon.com>tromey2001-05-031-2/+2
| | | | | | | | | * jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41795 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed boundstromey2001-04-271-4/+10
| | | | | | | | checking. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41634 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (wrap_value<jobject>, wrap_value<jclass>): Removed.tromey2001-04-061-11/+9
| | | | | | | | (wrap_value<T*>): New specialization. (_Jv_JNI_PopLocalFrame): Update env->locals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41157 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-04-02 Marcus G. Daniels <mgd@swarm.org>tromey2001-04-021-0/+9
| | | | | | | * jni.cc (wrap_value<jclass>): New specialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41021 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (add_char): Correctly encode non-ascii characters.tromey2001-04-021-5/+5
| | | | | | | | | | (add_char): Define even when INTERPRETER not defined. (mangled_name): Likewise. (_Jv_GetJNIEnvNewFrame): Likewise. (_Jv_LookupJNIMethod): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41010 138bc75d-0d04-0410-961f-82ee72b054a4
* * exception.cc (java_eh_info): Make value type jthrowable.rth2001-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40838 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.tromey2001-03-231-4/+8
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40785 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-03-22 Marcus G. Daniels <mgd@swarm.org>tromey2001-03-221-1/+4
| | | | | | | * jni.cc (add_char): Handle `.' like `/'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40748 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNIFunctions): Added comment for each entry intromey2001-01-271-230/+231
| | | | | | | native interface structure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39298 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from externaltromey2001-01-261-10/+14
| | | | | | | | | to internal representation. (_Jv_JNI_GetAnyFieldID): Likewise. Also, only use _Jv_FindClassFromSignature. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39289 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc: Added include of java/lang/ThreadGroup.h.warrenl2000-11-011-0/+1
| | | | | | | | * gcj/javaprims.h: Removed Replaceable and Resolvable from namespace per change of 2000-10-05. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37173 138bc75d-0d04-0410-961f-82ee72b054a4
* * java/lang/reflect/natField.cc (BooleanClass): Don't define.tromey2000-10-061-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36740 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-08-02 Bryce McKinlay <bryce@albatross.co.nz>bryce2000-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35418 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_PopSystemFrame): Clear `env->ex'.tromey2000-04-201-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33285 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_FindClass): Use system class loader if classtromey2000-04-201-4/+5
| | | | | | | doesn't have a loader. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33272 138bc75d-0d04-0410-961f-82ee72b054a4
* JVMPI changes...green2000-04-021-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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32866 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_PopSystemFrame): If environment has exceptiontromey2000-03-271-3/+3
| | | | | | | | set, throw it. (call): Don't throw exception here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32770 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (mangled_name): Fixed assertion.tromey2000-03-141-3/+5
| | | | | | | | (JNI_GetCreatedJavaVMs): Don't comment out `buf_len' argument; turned assert into actual failure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32546 138bc75d-0d04-0410-961f-82ee72b054a4
* * All files: Updated copyright information.tromey2000-03-071-1/+1
| | | | | | | | | * COPYING: New file. * COPYING.LIB: Removed. * LIBGCJ_LICENSE: We now use GPL + special exception. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32387 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (MARK_NONE): New define.tromey2000-03-071-50/+99
| | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32373 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/java-interp.h: Don't include MethodInvocation.h.tromey2000-03-021-207/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32294 138bc75d-0d04-0410-961f-82ee72b054a4
* Minor clean up and bug fix.green2000-02-261-3/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32196 138bc75d-0d04-0410-961f-82ee72b054a4
* * jni.cc (_Jv_JNI_RegisterNatives): Conditionalize body ontromey2000-02-251-0/+4
| | | | | | | `INTERPRETER'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32156 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/jvm.h (_Jv_GetJavaVM): Declare.tromey2000-02-181-12/+87
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32056 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud