diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-18 14:36:07 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-18 14:36:07 +0000 |
commit | 711d4574add8689064496b3d52e6a198d832c733 (patch) | |
tree | 3937ccad6c17e653dc39511f8dcb2812663db7de /libjava/jni.cc | |
parent | 60e144bbfacd7f1106e2819755fd9770fbb9737f (diff) | |
download | gcc-711d4574add8689064496b3d52e6a198d832c733.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70544 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r-- | libjava/jni.cc | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc index eace628acfc..47017dc8c18 100644 --- a/libjava/jni.cc +++ b/libjava/jni.cc @@ -777,12 +777,9 @@ static T return_type = klass; jvalue result; - jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, - style == constructor, - arg_types, args, &result); - - if (ex != NULL) - env->ex = ex; + _Jv_CallAnyMethodA (obj, return_type, id, + style == constructor, + arg_types, args, &result); // We cheat a little here. FIXME. return wrap_value (env, * (T *) &result); @@ -847,12 +844,9 @@ static T } jvalue result; - jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, - style == constructor, - arg_types, arg_copy, &result); - - if (ex != NULL) - env->ex = ex; + _Jv_CallAnyMethodA (obj, return_type, id, + style == constructor, + arg_types, arg_copy, &result); // We cheat a little here. FIXME. return wrap_value (env, * (T *) &result); @@ -893,12 +887,9 @@ static void if (style == constructor) return_type = klass; - jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, - style == constructor, - arg_types, args, NULL); - - if (ex != NULL) - env->ex = ex; + _Jv_CallAnyMethodA (obj, return_type, id, + style == constructor, + arg_types, args, NULL); } catch (jthrowable t) { @@ -947,12 +938,9 @@ static void arg_copy[i].l = unwrap (args[i].l); } - jthrowable ex = _Jv_CallAnyMethodA (obj, return_type, id, - style == constructor, - arg_types, args, NULL); - - if (ex != NULL) - env->ex = ex; + _Jv_CallAnyMethodA (obj, return_type, id, + style == constructor, + arg_types, args, NULL); } catch (jthrowable t) { |