* Updated header: Added 2006. Changed address of FSF. Changed email
[cacao.git] / src / vm / jit / jit.h
index 326709e7a69e5fd266052dfad04bdc4c1bc130c0..18aeb6067bb1cffe9727feec599cd722eb29446f 100644 (file)
@@ -1,9 +1,9 @@
 /* src/vm/jit/jit.h - code generation header
 
-   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
+   Copyright (C) 1996-2005, 2006 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.
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
-   Contact: cacao@complang.tuwien.ac.at
+   Contact: cacao@cacaojvm.org
 
    Authors: Andreas Krall
             Reinhard Grafl
 
    Changes: Christian Thalinger
 
-   $Id: jit.h 3744 2005-11-22 23:42:43Z twisti $
+   $Id: jit.h 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
@@ -46,15 +46,28 @@ typedef struct instruction instruction;
 typedef struct subroutineinfo subroutineinfo;
 
 
+#include "config.h"
+#include "vm/types.h"
+
 #include "toolbox/chain.h"
 #include "vm/global.h"
-#include "vm/references.h"
 #include "vm/method.h"
-#include "vm/jit/codegen.inc.h"
+#include "vm/references.h"
+#include "vm/statistics.h"
+#include "vm/jit/codegen-common.h"
 #include "vm/jit/verify/typeinfo.h"
 
 
-/**************************** resolve typedef-cycles **************************/
+/* common jit/codegen macros **************************************************/
+
+#if defined(ENABLE_STATISTICS)
+# define COUNT(x)        (x)++
+# define COUNT_SPILLS    count_spills++
+#else
+# define COUNT(x)        /* nothing */
+# define COUNT_SPILLS    /* nothing */
+#endif
+
 
 /************************** stack element structure ***************************/
 
@@ -94,7 +107,7 @@ typedef struct subroutineinfo subroutineinfo;
 struct stackelement {
        stackptr prev;              /* pointer to next element towards bottom     */
        s4       type;              /* slot type of stack element                 */
-#ifdef CACAO_TYPECHECK
+#ifdef ENABLE_VERIFIER
        typeinfo typeinfo;          /* info on reference types                    */
 #endif
        s4       flags;             /* flags (SAVED, INMEMORY)                    */
@@ -851,7 +864,13 @@ void jit_close(void);
 u1 *jit_compile(methodinfo *m);
 
 /* machine dependent initialization */
+#if defined(ENABLE_JIT)
 void md_init(void);
+#endif
+
+#if defined(ENABLE_INTRP)
+void intrp_md_init(void);
+#endif
 
 #endif /* _JIT_H */