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

@ -1,3 +1,8 @@
2003-10-30 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Don't use vtable
dispatch for final methods.
2003-10-30 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on

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);