Authors: Dieter Thuernbeck
- $Id: inline.h 1456 2004-11-05 14:33:14Z twisti $
+ $Id: inline.h 1621 2004-11-30 13:06:55Z twisti $
*/
#ifndef _INLINE_H
#define _INLINE_H
-#include "global.h"
+/* resolve typedef cycles *****************************************************/
+
+typedef struct t_inlining_globals t_inlining_globals;
+
+
#include "toolbox/list.h"
+#include "vm/global.h"
-#define INLINING_MAXDEPTH 1
-#define INLINING_MAXCODESIZE 32
-#define INLINING_MAXMETHODS 8
+
+#define INLINING_MAXDEPTH 2 /*1*/
+#define INLINING_MAXCODESIZE 128 /*32*/
+#define INLINING_MAXMETHODS 32 /*8*/
/*typedef struct {
typedef struct {
listnode linkage;
- // saved static compiler variables
+ /* saved static compiler variables */
methodinfo *method;
- // restored through method
+ /* restored through method */
- // int jcodelength;
- // u1 *jcode;
- // classinfo *class;
+ /* int jcodelength; */
+ /* u1 *jcode; */
+ /* classinfo *class; */
- // descriptor never used
- // maxstack used outside of main for loop
- // maxlocals never used
+ /* descriptor never used */
+ /* maxstack used outside of main for loop */
+ /* maxlocals never used */
- // exceptiontablelength
- // raw_extable used outside of main for loop
- // mreturntype used outside of main for loop
- // mparamcount used outside of main for loop
- // mparamtypes used outside of main for loop
+ /* exceptiontablelength */
+ /* raw_extable used outside of main for loop */
+ /* mreturntype used outside of main for loop */
+ /* mparamcount used outside of main for loop */
+ /* mparamtypes used outside of main for loop */
- //local variables used in parse()
+ /* local variables used in parse() */
int i; /* temporary for different uses (counters)*/
int p; /* java instruction counter */
} 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*/
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);