-/* jit/inline.c - code inliner
+/* src/vm/jit/inline/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, 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
This file is part of CACAO.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA.
-
- Contact: cacao@complang.tuwien.ac.at
-
- Authors: Dieter Thuernbeck
-
- $Id: inline.h 572 2003-11-06 16:06:11Z twisti $
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
*/
#ifndef _INLINE_H
#define _INLINE_H
-#include "global.h"
-#include "toolbox/list.h"
-
-#define INLINING_MAXDEPTH 1
-#define INLINING_MAXCODESIZE 32
-#define INLINING_MAXMETHODS 8
-
-
-/*typedef struct {
- listnode linkage;
- instruction *iptr;
- } t_patchlistnode;*/
-
-
-typedef struct {
- listnode linkage;
-
- methodinfo *method;
- int startgp;
- int stopgp;
- int firstlocal;
-
- bool *readonly;
- int *label_index;
-
- list *inlinedmethods;
-} inlining_methodinfo;
-
-
-typedef struct {
- listnode linkage;
-
- // saved static compiler variables
-
- methodinfo *method;
-
- // restored through method
-
- // int jcodelength;
- // u1 *jcode;
- // classinfo *class;
-
- // 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
-
- //local variables used in parse()
-
- int i; /* temporary for different uses (counters) */
- int p; /* java instruction counter */
- int nextp; /* start of next java instruction */
- int opcode; /* java opcode */
-
- inlining_methodinfo *inlinfo;
-
- /* list *patchlist; */
-} t_inlining_stacknode;
-
-
-/* extern variables */
-extern bool isinlinedmethod;
-extern int cumjcodelength;
-extern int cummaxstack;
-extern int cumextablelength;
-extern inlining_methodinfo *inlining_rootinfo;
-
+#include "config.h"
-/* function prototypes*/
-void inlining_init(methodinfo *m);
-void inlining_push_compiler_variables(int i, int p, int nextp, int opcode,
- inlining_methodinfo* inlinfo);
-void inlining_pop_compiler_variables(int *i, int *p, int *nextp, int *opcode,
- inlining_methodinfo** inlinfo);
-inlining_methodinfo *inlining_analyse_method(methodinfo *m, int level, int gp,
- int firstlocal, int maxstackdepth);
+#include "vm/global.h"
+#include "vm/jit/jit.h"
-#define inlining_save_compiler_variables() \
- inlining_push_compiler_variables(i, p, nextp, opcode, inlinfo)
-#define inlining_restore_compiler_variables() \
- inlining_pop_compiler_variables(&i, &p, &nextp, &opcode, &inlinfo)
+/* function prototypes ********************************************************/
-#define inlining_set_compiler_variables(i) \
- do { \
- p = nextp = 0; \
- inlining_set_compiler_variables_fun(i->method); \
- inlinfo = i; \
- } while (0)
+bool inline_inline(jitdata *jd);
#endif /* _INLINE_H */
* c-basic-offset: 4
* tab-width: 4
* End:
+ * vim:noexpandtab:sw=4:ts=4:
*/