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:
parent
f8a1ebc603
commit
f56228e73f
2 changed files with 9 additions and 2 deletions
|
@ -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>
|
2003-10-30 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on
|
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create): Turn on
|
||||||
|
|
|
@ -343,6 +343,8 @@ _Jv_CallAnyMethodA (jobject obj,
|
||||||
jvalue *result,
|
jvalue *result,
|
||||||
jboolean is_jni_call)
|
jboolean is_jni_call)
|
||||||
{
|
{
|
||||||
|
using namespace java::lang::reflect;
|
||||||
|
|
||||||
#ifdef USE_LIBFFI
|
#ifdef USE_LIBFFI
|
||||||
JvAssert (! is_constructor || ! obj);
|
JvAssert (! is_constructor || ! obj);
|
||||||
JvAssert (! is_constructor || return_type);
|
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.
|
// constructor does need a `this' argument, but it is one we create.
|
||||||
jboolean needs_this = false;
|
jboolean needs_this = false;
|
||||||
if (is_constructor
|
if (is_constructor
|
||||||
|| ! java::lang::reflect::Modifier::isStatic(meth->accflags))
|
|| ! Modifier::isStatic(meth->accflags))
|
||||||
needs_this = true;
|
needs_this = true;
|
||||||
|
|
||||||
int param_count = parameter_types->length;
|
int param_count = parameter_types->length;
|
||||||
|
@ -464,7 +466,7 @@ _Jv_CallAnyMethodA (jobject obj,
|
||||||
|
|
||||||
void *ncode;
|
void *ncode;
|
||||||
|
|
||||||
if (is_virtual_call)
|
if (is_virtual_call && ! Modifier::isFinal (meth->accflags))
|
||||||
{
|
{
|
||||||
_Jv_VTable *vtable = *(_Jv_VTable **) obj;
|
_Jv_VTable *vtable = *(_Jv_VTable **) obj;
|
||||||
ncode = vtable->get_method (meth->index);
|
ncode = vtable->get_method (meth->index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue