* src/vmcore/method.h (method_returntype_get): Added.
* src/native/vm/gnu/java_lang_reflect_Method.c (getReturnType): Use
method_returntype_get.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: java_lang_reflect_Method.c 7976 2007-05-29 12:22:55Z twisti $
+ $Id: java_lang_reflect_Method.c 8063 2007-06-11 14:44:58Z twisti $
*/
#include "vm/resolve.h"
#include "vm/stringlocal.h"
+#include "vmcore/method.h"
+
/* native methods implemented by this file ************************************/
{
classinfo *c;
methodinfo *m;
- typedesc *td;
+ classinfo *result;
c = (classinfo *) this->declaringClass;
m = &(c->methods[this->slot]);
- td = &(m->parseddesc->returntype);
-
- if (!resolve_class_from_typedesc(td, true, false, &c))
- return NULL;
+ result = method_returntype_get(m);
- return (java_lang_Class *) c;
+ return (java_lang_Class *) result;
}
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: method.c 7573 2007-03-25 18:55:02Z twisti $
+ $Id: method.c 8063 2007-06-11 14:44:58Z twisti $
*/
}
+/* method_returntype_get *******************************************************
+
+ Get the return type of the method.
+
+*******************************************************************************/
+
+classinfo *method_returntype_get(methodinfo *m)
+{
+ typedesc *td;
+ classinfo *c;
+
+ td = &(m->parseddesc->returntype);
+
+ if (!resolve_class_from_typedesc(td, true, false, &c))
+ return NULL;
+
+ return c;
+}
+
+
/* method_count_implementations ************************************************
Count the implementations of a method in a class cone (a class and all its
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: method.h 7966 2007-05-25 12:41:03Z pm $
+ $Id: method.h 8063 2007-06-11 14:44:58Z twisti $
*/
java_objectarray *method_get_parametertypearray(methodinfo *m);
java_objectarray *method_get_exceptionarray(methodinfo *m);
+classinfo *method_returntype_get(methodinfo *m);
void method_add_assumption_monomorphic(methodinfo *m, methodinfo *caller);
void method_break_assumption_monomorphic(methodinfo *m, method_worklist **wl);