Clean merge -> gc7-branch
[cacao.git] / src / vmcore / method.h
index 5c505cf663cdd96078b20abf01774bef3b22dcb3..34b529ba2d3b34d294f6a9f24ff6650e81903968 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vmcore/method.h - method functions header
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
@@ -22,7 +20,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: method.h 8318 2007-08-16 10:05:34Z michi $
 */
 
 
@@ -41,6 +38,7 @@ typedef struct codeinfo            codeinfo;
 #include "config.h"
 #include "vm/types.h"
 
+#include "vm/builtin.h"
 #include "vm/global.h"
 
 #include "vmcore/descriptor.h"
@@ -75,7 +73,7 @@ struct methodinfo {                 /* method structure                       */
 
        methoddesc   *parseddesc;       /* parsed descriptor                      */
                             
-       classinfo    *class;            /* class, the method belongs to           */
+       classinfo    *clazz;            /* class, the method belongs to           */
        s4            vftblindex;       /* index of method in virtual function    */
                                        /* table (if it is a virtual method)      */
        s4            maxstack;         /* maximum stack depth of method          */
@@ -156,12 +154,29 @@ struct lineinfo {
 };
 
 
+/* global variables ***********************************************************/
+
+extern methodinfo *method_java_lang_reflect_Method_invoke;
+
+
+/* inline functions ***********************************************************/
+
+inline static bool method_is_builtin(methodinfo* m)
+{
+       return m->flags & ACC_METHOD_BUILTIN;
+}
+
+
 /* function prototypes ********************************************************/
 
+void method_init(void);
+
 bool method_load(classbuffer *cb, methodinfo *m, descriptor_pool *descpool);
 void method_free(methodinfo *m);
 bool method_canoverwrite(methodinfo *m, methodinfo *old);
 
+methodinfo *method_new_builtin(builtintable_entry *bte);
+
 methodinfo *method_vftbl_lookup(vftbl_t *vftbl, methodinfo* m);
 
 int32_t                    method_get_parametercount(methodinfo *m);
@@ -174,11 +189,9 @@ void method_break_assumption_monomorphic(methodinfo *m, method_worklist **wl);
 
 s4   method_count_implementations(methodinfo *m, classinfo *c, methodinfo **found);
 
-#if defined(ENABLE_ANNOTATIONS)
-java_bytearray *method_get_annotations(methodinfo *m);
-java_bytearray *method_get_parameterannotations(methodinfo *m);
-java_bytearray *method_get_annotationdefault(methodinfo *m);
-#endif
+java_handle_bytearray_t *method_get_annotations(methodinfo *m);
+java_handle_bytearray_t *method_get_parameterannotations(methodinfo *m);
+java_handle_bytearray_t *method_get_annotationdefault(methodinfo *m);
 
 #if !defined(NDEBUG)
 void method_printflags(methodinfo *m);