X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fnative%2Fnative.c;h=ef8ef2ccb00caeae2e58cb7404d9a061708e0452;hb=6fd72f4d63f219c79b2132dde9ec0aa5e6c1494b;hp=4f70652df0d22cc2138cfcccdb90efc70900ce23;hpb=a1159b52f19fb0e9272c1e80491fe90569179c2a;p=cacao.git diff --git a/src/native/native.c b/src/native/native.c index 4f70652df..ef8ef2ccb 100644 --- a/src/native/native.c +++ b/src/native/native.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: native.c 7483 2007-03-08 13:17:40Z michi $ + $Id: native.c 7601 2007-03-28 23:02:50Z michi $ */ @@ -1148,87 +1148,6 @@ java_objectarray *native_class_getdeclaredannotations(classinfo *c) #endif -/* native_get_parametertypes *************************************************** - - Use the descriptor of a method to generate a java/lang/Class array - which contains the classes of the parametertypes of the method. - -*******************************************************************************/ - -java_objectarray *native_get_parametertypes(methodinfo *m) -{ - methoddesc *md; - typedesc *paramtypes; - s4 paramcount; - java_objectarray *oa; - s4 i; - - md = m->parseddesc; - - /* is the descriptor fully parsed? */ - - if (m->parseddesc->params == NULL) - if (!descriptor_params_from_paramtypes(md, m->flags)) - return NULL; - - paramtypes = md->paramtypes; - paramcount = md->paramcount; - - /* skip `this' pointer */ - - if (!(m->flags & ACC_STATIC)) { - paramtypes++; - paramcount--; - } - - /* create class-array */ - - oa = builtin_anewarray(paramcount, class_java_lang_Class); - - if (oa == NULL) - return NULL; - - /* get classes */ - - for (i = 0; i < paramcount; i++) - if (!resolve_class_from_typedesc(¶mtypes[i], true, false, - (classinfo **) &oa->data[i])) - return NULL; - - return oa; -} - - -/* native_get_exceptiontypes *************************************************** - - Get the exceptions which can be thrown by a method. - -*******************************************************************************/ - -java_objectarray *native_get_exceptiontypes(methodinfo *m) -{ - java_objectarray *oa; - classinfo *c; - u2 i; - - /* create class-array */ - - oa = builtin_anewarray(m->thrownexceptionscount, class_java_lang_Class); - - if (oa == NULL) - return NULL; - - for (i = 0; i < m->thrownexceptionscount; i++) { - if ((c = resolve_classref_or_classinfo_eager(m->thrownexceptions[i], true)) == NULL) - return NULL; - - oa->data[i] = (java_objectheader *) c; - } - - return oa; -} - - /* * These are local overrides for various environment variables in Emacs. * Please do not remove this and leave it at the end of the file, where