Authors: Andreas Krall
Reinhard Grafl
- $Id: jit.c 557 2003-11-02 22:51:59Z twisti $
+ $Id: jit.c 571 2003-11-06 16:04:23Z twisti $
*/
classinfo *class; /* class the compiled method belongs to */
methodinfo *method; /* pointer to method info of compiled method */
-static utf *descriptor; /* type descriptor of compiled method */
+static utf *descriptor; /* type descriptor of compiled method */
int mparamcount; /* number of parameters (incl. this) */
u1 *mparamtypes; /* types of all parameters (TYPE_INT, ...) */
-static int mreturntype; /* return type of method */
+static int mreturntype; /* return type of method */
int maxstack; /* maximal JavaVM stack size */
int maxlocals; /* maximal number of local JavaVM variables */
/* mark start of dump memory area */
- dumpsize = dump_size ();
+ dumpsize = dump_size();
/* measure time */
/* call the compiler passes ***********************************************/
-
- reg_init();
- if (useinlining) inlining_init();
+ /* must be call before reg_init, because it can change maxlocals */
+ if (useinlining)
+ inlining_init(m);
+
+ reg_init(m);
codegen_init();
if (opt_loops) {
depthFirst();
- analyseGraph();
+ analyseGraph();
optimize_loops();
}
classinfo *c; /* single class */
while ((c = chain_first(ul)) != NULL) {
- chain_remove (ul);
- class_init (c); /* may again call the compiler */
+ chain_remove(ul);
+ class_init(c); /* may again call the compiler */
}
- chain_free (ul);
+ chain_free(ul);
}
intsRestore(); /* enable interrupts again */
Authors: Andreas Krall
Reinhard Grafl
- $Id: jit.c 557 2003-11-02 22:51:59Z twisti $
+ $Id: jit.c 571 2003-11-06 16:04:23Z twisti $
*/
classinfo *class; /* class the compiled method belongs to */
methodinfo *method; /* pointer to method info of compiled method */
-static utf *descriptor; /* type descriptor of compiled method */
+static utf *descriptor; /* type descriptor of compiled method */
int mparamcount; /* number of parameters (incl. this) */
u1 *mparamtypes; /* types of all parameters (TYPE_INT, ...) */
-static int mreturntype; /* return type of method */
+static int mreturntype; /* return type of method */
int maxstack; /* maximal JavaVM stack size */
int maxlocals; /* maximal number of local JavaVM variables */
/* mark start of dump memory area */
- dumpsize = dump_size ();
+ dumpsize = dump_size();
/* measure time */
/* call the compiler passes ***********************************************/
-
- reg_init();
- if (useinlining) inlining_init();
+ /* must be call before reg_init, because it can change maxlocals */
+ if (useinlining)
+ inlining_init(m);
+
+ reg_init(m);
codegen_init();
if (opt_loops) {
depthFirst();
- analyseGraph();
+ analyseGraph();
optimize_loops();
}
classinfo *c; /* single class */
while ((c = chain_first(ul)) != NULL) {
- chain_remove (ul);
- class_init (c); /* may again call the compiler */
+ chain_remove(ul);
+ class_init(c); /* may again call the compiler */
}
- chain_free (ul);
+ chain_free(ul);
}
intsRestore(); /* enable interrupts again */