natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable dispatch for final methods.

* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use
	vtable dispatch for final methods.

From-SVN: r73101
This commit is contained in:
Bryce McKinlay 2003-10-30 21:09:45 +00:00 committed by Bryce McKinlay
parent f8a1ebc603
commit f56228e73f
2 changed files with 9 additions and 2 deletions

View file

@ -343,6 +343,8 @@ _Jv_CallAnyMethodA (jobject obj,
jvalue *result,
jboolean is_jni_call)
{
using namespace java::lang::reflect;
#ifdef USE_LIBFFI
JvAssert (! is_constructor || ! obj);
JvAssert (! is_constructor || return_type);
@ -351,7 +353,7 @@ _Jv_CallAnyMethodA (jobject obj,
// constructor does need a `this' argument, but it is one we create.
jboolean needs_this = false;
if (is_constructor
|| ! java::lang::reflect::Modifier::isStatic(meth->accflags))
|| ! Modifier::isStatic(meth->accflags))
needs_this = true;
int param_count = parameter_types->length;
@ -464,7 +466,7 @@ _Jv_CallAnyMethodA (jobject obj,
void *ncode;
if (is_virtual_call)
if (is_virtual_call && ! Modifier::isFinal (meth->accflags))
{
_Jv_VTable *vtable = *(_Jv_VTable **) obj;
ncode = vtable->get_method (meth->index);