Commit f56228e7 by Bryce McKinlay Committed by Bryce McKinlay

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
parent f8a1ebc6
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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment