/* 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.
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;
} 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);