summaryrefslogtreecommitdiff
path: root/libjava/jni.cc
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-26 02:25:42 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-26 02:25:42 +0000
commit6aa96c99a6339f2eb2e396d02113be16ddd55129 (patch)
tree904732224e65247ccdf90cd04bd9cd1ec4f63816 /libjava/jni.cc
parent9312400311fdf596564631e38e18a786e01dcb59 (diff)
downloadgcc-6aa96c99a6339f2eb2e396d02113be16ddd55129.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni.cc')
-rw-r--r--libjava/jni.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/libjava/jni.cc b/libjava/jni.cc
index 857ee4bc3dd..e2e10defd0a 100644
--- a/libjava/jni.cc
+++ b/libjava/jni.cc
@@ -767,9 +767,6 @@ static T
obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
@@ -791,6 +788,7 @@ static T
jvalue result;
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, &result);
return wrap_value (env, extract_from_jvalue<T>(result));
@@ -826,9 +824,6 @@ static T
obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
@@ -857,6 +852,7 @@ static T
jvalue result;
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, arg_copy, &result);
return wrap_value (env, extract_from_jvalue<T>(result));
@@ -877,9 +873,6 @@ static void
obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
@@ -899,6 +892,7 @@ static void
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, NULL);
}
catch (jthrowable t)
@@ -924,9 +918,6 @@ static void
(JNICALL _Jv_JNI_CallAnyVoidMethodA) (JNIEnv *env, jobject obj, jclass klass,
jmethodID id, jvalue *args)
{
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
@@ -950,6 +941,7 @@ static void
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, NULL);
}
catch (jthrowable t)