mirror of git://gcc.gnu.org/git/gcc.git
Class.h (_Jv_FindInterpreterMethod): Change return type to _Jv_MethodBase instead of _Jv_InterpMethod.
* java/lang/Class.h (_Jv_FindInterpreterMethod): Change return type
to _Jv_MethodBase instead of _Jv_InterpMethod.
* java/lang/natClass.cc (_Jv_FindInterpreterMethod): Likewise.
Do not check access flags.
Fix some minor style anomalies.
From-SVN: r116730
This commit is contained in:
parent
1b65e50144
commit
3056423a31
|
|
@ -1,3 +1,11 @@
|
||||||
|
2006-09-06 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
|
* java/lang/Class.h (_Jv_FindInterpreterMethod): Change return type
|
||||||
|
to _Jv_MethodBase instead of _Jv_InterpMethod.
|
||||||
|
* java/lang/natClass.cc (_Jv_FindInterpreterMethod): Likewise.
|
||||||
|
Do not check access flags.
|
||||||
|
Fix some minor style anomalies.
|
||||||
|
|
||||||
2006-09-01 Geoffrey Keating <geoffk@apple.com>
|
2006-09-01 Geoffrey Keating <geoffk@apple.com>
|
||||||
|
|
||||||
* testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one):
|
* testsuite/libjava.jni/jni.exp (gcj_jni_invocation_test_one):
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,8 @@ jmethodID JvGetFirstMethod (jclass);
|
||||||
|
|
||||||
#ifdef INTERPRETER
|
#ifdef INTERPRETER
|
||||||
// Finds a desired interpreter method in the given class or NULL if not found
|
// Finds a desired interpreter method in the given class or NULL if not found
|
||||||
_Jv_InterpMethod* _Jv_FindInterpreterMethod (jclass, jmethodID);
|
class _Jv_MethodBase;
|
||||||
|
_Jv_MethodBase *_Jv_FindInterpreterMethod (jclass, jmethodID);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Friend classes and functions to implement the ClassLoader
|
// Friend classes and functions to implement the ClassLoader
|
||||||
|
|
@ -474,8 +475,8 @@ private:
|
||||||
friend jint (::JvNumMethods) (jclass);
|
friend jint (::JvNumMethods) (jclass);
|
||||||
friend jmethodID (::JvGetFirstMethod) (jclass);
|
friend jmethodID (::JvGetFirstMethod) (jclass);
|
||||||
#ifdef INTERPRETER
|
#ifdef INTERPRETER
|
||||||
friend _Jv_InterpMethod* (::_Jv_FindInterpreterMethod) (jclass klass,
|
friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass,
|
||||||
jmethodID desired_method);
|
jmethodID desired_method);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Friends classes and functions to implement the ClassLoader
|
// Friends classes and functions to implement the ClassLoader
|
||||||
|
|
|
||||||
|
|
@ -1240,25 +1240,20 @@ _Jv_getInterfaceMethod (jclass search_class, jclass &found_class, int &index,
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef INTERPRETER
|
#ifdef INTERPRETER
|
||||||
_Jv_InterpMethod*
|
_Jv_MethodBase *
|
||||||
_Jv_FindInterpreterMethod (jclass klass, jmethodID desired_method)
|
_Jv_FindInterpreterMethod (jclass klass, jmethodID desired_method)
|
||||||
{
|
{
|
||||||
using namespace java::lang::reflect;
|
using namespace java::lang::reflect;
|
||||||
|
|
||||||
_Jv_InterpClass* iclass
|
_Jv_InterpClass *iclass
|
||||||
= reinterpret_cast<_Jv_InterpClass*> (klass->aux_info);
|
= reinterpret_cast<_Jv_InterpClass *> (klass->aux_info);
|
||||||
_Jv_MethodBase** imethods = _Jv_GetFirstMethod (iclass);
|
_Jv_MethodBase **imethods = _Jv_GetFirstMethod (iclass);
|
||||||
|
|
||||||
for (int i = 0; i < JvNumMethods (klass); ++i)
|
for (int i = 0; i < JvNumMethods (klass); ++i)
|
||||||
{
|
{
|
||||||
_Jv_MethodBase* imeth = imethods[i];
|
_Jv_MethodBase *imeth = imethods[i];
|
||||||
_Jv_ushort accflags = klass->methods[i].accflags;
|
if (imeth->get_method () == desired_method)
|
||||||
if ((accflags & (Modifier::NATIVE | Modifier::ABSTRACT)) == 0)
|
return imeth;
|
||||||
{
|
|
||||||
_Jv_InterpMethod* im = reinterpret_cast<_Jv_InterpMethod*> (imeth);
|
|
||||||
if (im->get_method () == desired_method)
|
|
||||||
return im;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue