aboutsummaryrefslogtreecommitdiff
path: root/libjava/jni.cc
AgeCommit message (Collapse)AuthorFilesLines
2003-11-18jni.cc (_Jv_JNI_GetStringUTFChars): Fail gracefully if string is null.Tom Tromey1-2/+4
* jni.cc (_Jv_JNI_GetStringUTFChars): Fail gracefully if string is null. From-SVN: r73707
2003-11-14jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to ↵Tom Tromey1-1/+1
JvGetStringUTFRegion. * jni.cc (_Jv_JNI_GetStringUTFChars): Pass length of string to JvGetStringUTFRegion. * java/lang/natPosixProcess.cc (new_string): Pass length of string to JvGetStringUTFRegion. * java/lang/natDouble.cc (parseDouble): Pass length of string to JvGetStringUTFRegion. * java/lang/natWin32Process.cc (startProcess): Pass length of string to JvGetStringUTFRegion. * java/lang/natClass.cc (forName): Pass length of string to JvGetStringUTFRegion. * gnu/gcj/runtime/natNameFinder.cc (getExternalLabel): Pass length of string to JvGetStringUTFRegion. * gnu/gcj/convert/natIconv.cc (init): Pass length of string to JvGetStringUTFRegion. * gnu/awt/gtk/natGtkLabelPeer.cc (setText): Pass length of string to JvGetStringUTFRegion. * gnu/awt/gtk/natGtkButtonPeer.cc (setLabel): Pass length of string to JvGetStringUTFRegion. From-SVN: r73571
2003-11-12jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT.Danny Smith1-3/+3
* jni.cc (JNI_CreateJavaVM): Remove JNIEXPORT. (JNI_GetCreatedJavaVMs): Likewise. (JNI_GetDefaultJavaVMInitArgs): Likewise. * include/jni.h (JNIIMPEXP): Remove definition and replace with... (__GCJ_JNIIMPEXP__): New macro, applicable only to libgcj symbols, (__GCJ_DLL__): New macro, controlling __GCJ_JNIIMPEXP__. From-SVN: r73484
2003-10-26Constructor.java (toString): Avoid extra whitespace on constructor with no ↵Bryce McKinlay1-12/+4
modifiers. 2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * java/lang/reflect/Constructor.java (toString): Avoid extra whitespace on constructor with no modifiers. * java/lang/reflect/natConstructor.java (newInstance): Look up caller and perform accessibility check only if constructor is non-public and accessible flag is not set. 2003-10-26 Bryce McKinlay <bryce@mckinlay.net.nz> * jni.cc (_Jv_JNI_CallAnyMethodV, _Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodV, _Jv_JNI_CallAnyVoidMethodA): Don't use _Jv_LookupDeclaredMethod(). Call _Jv_CallAnyMethodA with is_virtual_call argument. * include/jvm.h (_Jv_isVirtualMethod): Moved and renamed from natClass.cc. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Use _Jv_isVirtualMethod. * java/lang/reflect/natMethod.cc (invoke): Don't use _Jv_LookupDeclaredMethod. (_Jv_CallAnyMethodA): New is_virtual_call argument. If specified, look up method in target object's vtable. From-SVN: r72942
2003-09-22jni.cc (_Jv_LookupJNIMethod): Remove workaround that should hide a compiler ↵Michael Koch1-3/+1
warning but produces a different... 2003-09-22 Michael Koch <konqueror@gmx.de> * jni.cc (_Jv_LookupJNIMethod): Remove workaround that should hide a compiler warning but produces a different one now. From-SVN: r71650
2003-08-20jni.cc: Replace "cheating" pointer-casting code with extract_from_jvalue<> ↵Graydon Hoare1-5/+15
template. 2003-08-20 Graydon Hoare <graydon@redhat.com> * jni.cc: Replace "cheating" pointer-casting code with extract_from_jvalue<> template. From-SVN: r70613
2003-08-18re PR libgcj/11951 (natMethod.cc (_Jv_CallAnyMethodA) should clear ↵Tom Tromey1-24/+12
ffi_result before ffi_call) PR libgcj/11951: * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Returns void. Throw VirtualMachineError if ffi fails. Initialize return value. Added is_jni_call argument; only wrap exception if not a JNI call. Use descriptive message if operation not supported. (_Jv_GetTypesFromSignature): Use declaring class' loader to find array class. * include/jvm.h (_Jv_CallAnyMethodA): Updated declaration. * jni.cc (_Jv_JNI_CallAnyMethodV): Updated for new form of _Jv_CallAnyMethodA. (_Jv_JNI_CallAnyMethodA): Likewise. (_Jv_JNI_CallAnyVoidMethodV): Likewise. (_Jv_JNI_CallAnyVoidMethodA): Likewise. From-SVN: r70544
2003-07-21Runtime.java: Comment fix.Tom Tromey1-2/+2
* java/lang/Runtime.java: Comment fix. * java/lang/ClassLoader.java (isAncestorOf): New method. (getParent): Uncommented security check. Use isAncestorOf. * include/jvm.h (_Jv_CheckAccess): Declare. * java/lang/reflect/natConstructor.cc (newInstance): Perform access check. Include IllegalAccessException.h, ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natArray.cc (newInstance): Pass caller's class loader to _Jv_GetArrayClass. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/Field.java: Update comment to reflect status. (equals): Fixed indentation. * java/lang/Class.h (Class): Declare memberAccessCheck, not checkMemberAccess. Make _Jv_CheckAccess a friend. * java/lang/Class.java (memberAccessCheck): New method from Classpath. (checkMemberAccess): Removed. (getDeclaredMethod): Use memberAccessCheck. (getField): Likewise. (getMethod): Likewise. * resolve.cc (_Jv_ResolvePoolEntry): Use _Jv_CheckAccess. (_Jv_SearchMethodInClass): Likewise. * prims.cc (_Jv_CheckAccess): New function. * jni.cc (_Jv_JNI_FindClass): Use getClassLoaderInternal. (_Jv_JNI_GetAnyFieldID): Likewise. * java/lang/natClass.cc (forName): Use getClassLoaderInternal. (getClassLoader): Added security check. (getConstructor): Call memberAccessCheck. (getDeclaredClasses): Likewise. (getDeclaredField): Likewise. (getDeclaredFields): Likewise. (_getConstructors): Likewise. (getDeclaredConstructor): Likewise. (getDeclaredMethods): Likewise. (getFields): Likewise. (getMethods): Likewise. (newInstance): Likewise. (_Jv_MakeVTable): Put method name in exception. * java/lang/reflect/natMethod.cc (getType): Use getClassLoaderInternal. (_Jv_GetTypesFromSignature): Likewise. (invoke): Perform access check. (_Jv_CallAnyMethodA): Removed old FIXME comments. Include ArrayIndexOutOfBoundsException.h. * java/lang/reflect/natField.cc (getType): Use getClassLoaderInternal. (_Jv_CheckFieldAccessibility): Removed. (getAddr): Use _Jv_CheckAccess; find caller. Include ArrayIndexOutOfBoundsException.h. From-SVN: r69621
2003-06-172003-06-17 Michael Koch <konqueror@gmx.de>Michael Koch1-10/+16
* java/nio/DirectByteBufferImpl.java (address): Made package private. (DirectByteBufferImpl): New constructor. * java/nio/natDirectByteBufferImpl.cc (allocateImpl): Moved to java.nio namespace, implemented. (freeImpl): Likewise. (getImpl): Likewise. (putImpl): Likewise. * jni.cc (_Jv_JNI_NewDirectByteBuffer): Implemented. (_Jv_JNI_GetDirectBufferAddress): Implemented. (_Jv_JNI_GetDirectBufferCapacity): Implemented. From-SVN: r68105
2003-06-12jni.cc (_Jv_JNI_check_types): New.Andrew Haley1-38/+94
2003-06-11 Andrew Haley <aph@redhat.com> * jni.cc (_Jv_JNI_check_types): New. (_Jv_JNI_SetPrimgitiveArrayRegion): Check array type. (_Jv_JNI_GetPrimitiveArrayRegion): Ditto. (_Jv_JNI_GetPrimitiveArrayElements): Ditto. (_Jv_JNI_ReleasePrimitiveArrayElements): Ditto. * java/lang/natVMSecurityManager.cc (getClassContext): Fix infinite loop. From-SVN: r67835
2003-02-12jni.cc (_Jv_LookupJNIMethod): Modify to accept the size of the arguments for ↵Ranjit Mathew1-12/+75
a JNI function. 2003-02-12 Ranjit Mathew <rmathew@hotmail.com> * 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. From-SVN: r62796
2003-01-31jni.cc (_Jv_JNI_NewObjectArray): Check that initializer can be cast to ↵Tom Tromey1-1/+6
element type. * jni.cc (_Jv_JNI_NewObjectArray): Check that initializer can be cast to element type. (_Jv_JNI_SetObjectArrayElement): Check array bounds. (_Jv_JNI_GetObjectArrayElement): Likewise. From-SVN: r62210
2002-12-03jni.cc: Added `name' argument.Tom Tromey1-2/+3
* jni.cc: Added `name' argument. * include/jni.h (struct JNINativeInterface) [DefineClass]: Added `const char *' argument. (class _Jv_JNIEnv) [DefineClass]: Likewise. From-SVN: r59756
2002-11-19jni.h: Add missing JNICALL and JNIEXPORT attributes to function and function ↵Ranjit Mathew1-124/+133
pointer... 2002-11-19 Ranjit Mathew <rmathew@hotmail.com> * 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. From-SVN: r59277
2002-11-10* jni.cc (_Jv_GetJNIEnvNewFrame): Set env->ex in all cases.Tom Tromey1-2/+4
From-SVN: r58971
2002-11-06jni.cc (array_from_valist): Assume that jlong won't be promoted.Tom Tromey1-2/+8
* jni.cc (array_from_valist): Assume that jlong won't be promoted. From-SVN: r58859
2002-10-23jni.cc (_Jv_JNI_AllocObject): Removed old FIXME comment.Tom Tromey1-8/+8
* jni.cc (_Jv_JNI_AllocObject): Removed old FIXME comment. (array_from_valist): Correctly handle promotion for jint, jlong, jfloat, and jdouble. From-SVN: r58476
2002-05-10* jni.cc (_Jv_JNIFunctions): Fixed typo.Tom Tromey1-1/+1
From-SVN: r53353
2002-04-10Makefile.in: Rebuilt.Tom Tromey1-16/+57
* Makefile.in: Rebuilt. * 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. From-SVN: r52144
2002-03-05jni.cc (_Jv_LookupJNIMethod): Throw UnsatisfiedLinkError, not ↵Tom Tromey1-2/+2
AbstractMethodError. * jni.cc (_Jv_LookupJNIMethod): Throw UnsatisfiedLinkError, not AbstractMethodError. From-SVN: r50337
2002-02-13jni.cc (_Jv_JNI_AttachCurrentThread): env->locals assigned correctly.Martin Kahlert1-2/+1
2002-02-13 Martin Kahlert <martin.kahlert@infineon.com> * jni.cc (_Jv_JNI_AttachCurrentThread): env->locals assigned correctly. From-SVN: r49737
2002-02-08jni.cc (_Jv_JNI_NewLocalRef): Make sure, that NULL frame is not dereferenced.Martin Kahlert1-2/+11
2002-02-08 Martin Kahlert <martin.kahlert@infineon.com> * jni.cc (_Jv_JNI_NewLocalRef): Make sure, that NULL frame is not dereferenced. (_Jv_JNI_AttachCurrentThread): Produce full featured env->locals frame. From-SVN: r49615
2001-12-16For PR libgcj/5103:Tom Tromey1-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. From-SVN: r48082
2001-12-12* jni.cc (call): Synchronize if required.Tom Tromey1-0/+14
From-SVN: r47949
2001-11-17Obvious jni weak reference fixAnthony Green1-1/+1
From-SVN: r47128
2001-11-13Makefile.in: Rebuilt.Tom Tromey1-20/+151
* Makefile.in: Rebuilt. * 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. From-SVN: r46990
2001-10-30jni.cc (JNI_CreateJavaVM): Call _Jv_CreateJavaVM.Bryce McKinlay1-2/+3
* jni.cc (JNI_CreateJavaVM): Call _Jv_CreateJavaVM. Don't call _Jv_JNI_Init. From-SVN: r46633
2001-10-16Eliminate use of C++ static constructors.Bryce McKinlay1-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. From-SVN: r46282
2001-10-05jni.cc (_Jv_JNI_DeleteLocalRef): Use correct frame sizeMartin Kahlert1-1/+1
2001-10-04 Martin Kahlert <martin.kahlert@infineon.com> * jni.cc (_Jv_JNI_DeleteLocalRef): Use correct frame size From-SVN: r46034
2001-09-17* jni.cc (array_from_valist): Use promoted types for va_arg.Andreas Jaeger1-14/+14
From-SVN: r45650
2001-08-20jni.cc (nathash, [...]): New globals.Tom Tromey1-21/+152
* jni.cc (nathash, nathash_count, nathash_size): New globals. (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. From-SVN: r45060
2001-08-15jni.cc: Include IdentityHashMap.h, not Hashtable.h.Tom Tromey1-7/+7
* jni.cc: Include IdentityHashMap.h, not Hashtable.h. (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. From-SVN: r44929
2001-08-02jni.cc (JNI_CreateJavaVM): Call _Jv_JNI_Init in order to initialize ↵Martin Kahlert1-0/+3
global_ref_table/local_ref_table. 2001-08-02 Martin Kahlert <martin.kahlert@infineon.com> * jni.cc (JNI_CreateJavaVM): Call _Jv_JNI_Init in order to initialize global_ref_table/local_ref_table. From-SVN: r44583
2001-06-15* jni.cc (_Jv_JNI_NewLocalRef): Search other frames.Tom Tromey1-8/+15
From-SVN: r43415
2001-06-15jni.cc (ClassClass): Removed; updated all users.Tom Tromey1-30/+28
* jni.cc (ClassClass): Removed; updated all users. (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. From-SVN: r43409
2001-05-21Implement invocation interface; don't create new thread for main.Per Bothner1-23/+6
From-SVN: r42428
2001-05-03jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking.Martin Kahlert1-2/+2
2001-05-03 Martin Kahlert <martin.kahlert@infineon.com> * jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. From-SVN: r41795
2001-04-27jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking.Tom Tromey1-4/+10
* jni.cc (_Jv_JNI_GetPrimitiveArrayRegion): Fixed bounds checking. (_Jv_JNI_SetPrimitiveArrayRegion): Likewise. From-SVN: r41634
2001-04-06jni.cc (wrap_value<jobject>, [...]): Removed.Tom Tromey1-11/+9
* jni.cc (wrap_value<jobject>, wrap_value<jclass>): Removed. (wrap_value<T*>): New specialization. (_Jv_JNI_PopLocalFrame): Update env->locals. From-SVN: r41157
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