GNU header update.
[cacao.git] / src / vm / jit / inline / inline.h
index c8c086fbeec7f2bbc391af320c1e428ca5008bb1..034c1a70f302bfedbeef9a15be370ae72cb343cd 100644 (file)
@@ -1,9 +1,9 @@
 /* jit/inline.h - code inliner
 
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
-   M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
-   P. Tomsich, J. Wenninger
+   Copyright (C) 1996-2005 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
 
    This file is part of CACAO.
 
@@ -26,7 +26,7 @@
 
    Authors: Dieter Thuernbeck
 
-   $Id: inline.h 1506 2004-11-14 14:48:49Z jowenn $
+   $Id: inline.h 1735 2004-12-07 14:33:27Z twisti $
 
 */
 
 #ifndef _INLINE_H
 #define _INLINE_H
 
-#include "global.h"
-#include "toolbox/list.h"
+/* resolve typedef cycles *****************************************************/
+
+typedef struct t_inlining_globals t_inlining_globals;
 
-#define INLINING_MAXDEPTH       2  /*1*/ 
-#define INLINING_MAXCODESIZE    128 /*32*/
-#define INLINING_MAXMETHODS     32 /*8*/
 
+#include "toolbox/list.h"
+#include "vm/global.h"
 
-/*typedef struct {
-        listnode linkage;
-        instruction *iptr;
-        } t_patchlistnode;*/
 
+#define INLINING_MAXDEPTH       3  /*1*/ 
+#define INLINING_MAXCODESIZE    128 /*32*/
+#define INLINING_MAXMETHODS     32 /*8*/
 
 typedef struct {
     listnode linkage;
 
     methodinfo *method;
+    int level;
     int startgp;
     int stopgp;
     int firstlocal;
@@ -99,21 +99,22 @@ typedef struct {
 
 } t_inlining_stacknode;
 
-typedef struct t_inlining_globals {  /* try in parse.h with struct not include */
-        bool isinlinedmethod;
-        int cumjcodelength;   /* cumulative immediate intruction length */
-        int cummaxstack;
-        int cumextablelength;
-        int cumlocals;        /* was static */
-        int cummethods;       /* was static */
-        list *inlining_stack; /* was static */
-        inlining_methodinfo *inlining_rootinfo;
-        methodinfo *method;
-        classinfo *class;
-        int jcodelength;
-        u1 *jcode;
+
+struct t_inlining_globals {  /* try in parse.h with struct not include */
+       bool isinlinedmethod;
+       int cumjcodelength;   /* cumulative immediate intruction length */
+       int cummaxstack;
+       int cumextablelength;
+       int cumlocals;        /* was static */
+       int cummethods;       /* was static */
+       list *inlining_stack; /* was static */
+       inlining_methodinfo *inlining_rootinfo;
+       methodinfo *method;
+       classinfo *class;
+       int jcodelength;
+       u1 *jcode;
        bool isleafmethod;
-} t_inlining_globals;
+};
 
 
 /* function prototypes*/
@@ -133,8 +134,8 @@ void inlining_pop_compiler_variables(
 void inlining_set_compiler_variables_fun(methodinfo *m, 
                                         t_inlining_globals *inline_env);
 classinfo *first_occurence(classinfo* class, utf* name, utf* desc);
-bool is_unique_rec(classinfo *class, methodinfo *m, utf* name, utf* desc);
-bool is_unique_method(classinfo *class, methodinfo *m, utf* name, utf* desc);
+bool is_unique_recOLD(classinfo *class, methodinfo *m, utf* name, utf* desc);
+bool is_unique_methodOLD(classinfo *class, methodinfo *m, utf* name, utf* desc);
 inlining_methodinfo *inlining_analyse_method(methodinfo *m, 
                                          int level, int gp,
                                          int firstlocal, int maxstackdepth,                                          t_inlining_globals *inline_env);