diff options
author | kseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-06 22:16:59 +0000 |
---|---|---|
committer | kseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-06 22:16:59 +0000 |
commit | 7ac1948c1ce85cce2539143a770a5634c52a0ae2 (patch) | |
tree | 48e1f84c5ed7b481b33fe4c2ee02c993dec80dd0 /libjava/java | |
parent | 959fee9ae4baf87684fc82652f1aad705bf976b0 (diff) | |
download | ppe42-gcc-7ac1948c1ce85cce2539143a770a5634c52a0ae2.tar.gz ppe42-gcc-7ac1948c1ce85cce2539143a770a5634c52a0ae2.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116730 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/Class.h | 7 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 19 |
2 files changed, 11 insertions, 15 deletions
diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index 7da182c9675..1638f94e107 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -234,7 +234,8 @@ jmethodID JvGetFirstMethod (jclass); #ifdef INTERPRETER // 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 // Friend classes and functions to implement the ClassLoader @@ -474,8 +475,8 @@ private: friend jint (::JvNumMethods) (jclass); friend jmethodID (::JvGetFirstMethod) (jclass); #ifdef INTERPRETER - friend _Jv_InterpMethod* (::_Jv_FindInterpreterMethod) (jclass klass, - jmethodID desired_method); + friend _Jv_MethodBase *(::_Jv_FindInterpreterMethod) (jclass klass, + jmethodID desired_method); #endif // Friends classes and functions to implement the ClassLoader diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 40f9961ebb6..0682fd6e190 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -1240,25 +1240,20 @@ _Jv_getInterfaceMethod (jclass search_class, jclass &found_class, int &index, } #ifdef INTERPRETER -_Jv_InterpMethod* +_Jv_MethodBase * _Jv_FindInterpreterMethod (jclass klass, jmethodID desired_method) { using namespace java::lang::reflect; - _Jv_InterpClass* iclass - = reinterpret_cast<_Jv_InterpClass*> (klass->aux_info); - _Jv_MethodBase** imethods = _Jv_GetFirstMethod (iclass); + _Jv_InterpClass *iclass + = reinterpret_cast<_Jv_InterpClass *> (klass->aux_info); + _Jv_MethodBase **imethods = _Jv_GetFirstMethod (iclass); for (int i = 0; i < JvNumMethods (klass); ++i) { - _Jv_MethodBase* imeth = imethods[i]; - _Jv_ushort accflags = klass->methods[i].accflags; - if ((accflags & (Modifier::NATIVE | Modifier::ABSTRACT)) == 0) - { - _Jv_InterpMethod* im = reinterpret_cast<_Jv_InterpMethod*> (imeth); - if (im->get_method () == desired_method) - return im; - } + _Jv_MethodBase *imeth = imethods[i]; + if (imeth->get_method () == desired_method) + return imeth; } return NULL; |