* Removed all Id tags.
[cacao.git] / src / vm / jit / intrp / intrp.h
index 3cf8c067166db01d8032221472615c870a502009..c4e988201eab15b97ef0c81c2fc49db147684526 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/intrp/intrp.h - definitions for Interpreter
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   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
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-            Anton Ertl
-
-   Changes: Edwin Steiner
-
-   $Id: intrp.h 4760 2006-04-12 20:06:23Z edwin $
-
 */
 
 
 #include <stdio.h>
 
 #include "vm/types.h"
-#include "arch.h"
-
-#include "vm/class.h"
-#include "vm/global.h"
-#include "vm/method.h"
-#include "vm/references.h"
-#include "vm/resolve.h"
 
+#include "arch.h"
 
-typedef void *Label;
-typedef void *Inst;
+/* we need Cell in some headers below */
 
 #if SIZEOF_VOID_P == 8
 typedef s8 Cell;
@@ -62,6 +46,20 @@ typedef s8 Cell;
 typedef s4 Cell;
 #endif
 
+#include "vm/global.h"
+
+#include "vm/jit/codegen-common.h"
+
+#include "vmcore/class.h"
+#include "vmcore/method.h"
+#include "vmcore/references.h"
+#include "vm/resolve.h"
+#include "vmcore/linker.h"
+
+
+typedef void *Label;
+typedef void *Inst;
+
 #if 1
 #define MAYBE_UNUSED __attribute__((unused))
 #else
@@ -108,11 +106,11 @@ typedef union {
 #endif /* SIZEOF_VOID_P == 4 */
 
 
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+#if defined(ENABLE_THREADS)
 
-#define global_sp    (*(Cell **)&(THREADINFO->_global_sp))
+#define global_sp    (THREADOBJECT->_global_sp)
 
-#else /* defined(USE_THREADS) && defined(NATIVE_THREADS) */
+#else /* defined(ENABLE_THREADS) */
 
 #define MAX_STACK_SIZE 128*1024
 static char stack[MAX_STACK_SIZE];
@@ -120,7 +118,7 @@ static char stack[MAX_STACK_SIZE];
 static Cell *_global_sp = (Cell *)(stack+MAX_STACK_SIZE);
 #define global_sp    _global_sp
 
-#endif /* defined(USE_THREADS) && defined(NATIVE_THREADS) */
+#endif /* defined(ENABLE_THREADS) */
 
 #define CLEAR_global_sp (global_sp=NULL)
 
@@ -207,15 +205,16 @@ extern Inst *vm_prim;
 extern Cell peeptable;
 extern FILE *vm_out;
 
+/* defined in peephole.c: */
 void init_peeptable(void);
 ptrint peephole_opt(ptrint inst1, ptrint inst2, Cell peeptable);
-void gen_inst(codegendata *cd, ptrint instr);
-
-void vm_disassemble(Inst *ip, Inst *endp, Inst vm_prim[]);
-Inst *vm_disassemble_inst(Inst *ip, Inst vm_prim[]);
 
+/* defined in engine.c: */
 java_objectheader *engine(Inst *ip0, Cell * sp, Cell * fp);
 
+/* defined in disass.c: */
+void vm_disassemble(Inst *ip, Inst *endp, Inst vm_prim[]);
+Inst *vm_disassemble_inst(Inst *ip, Inst vm_prim[]);
 
 /* print types for disassembler and tracer */
 void printarg_ui      (u4                 ui      );
@@ -242,14 +241,25 @@ void printarg_aum     (unresolved_method *aum     );
 void printarg_avftbl  (vftbl_t *          avftbl  );
 void printarg_Cell    (Cell               x       );
 
+/* defined in profile.c: */
 void vm_uncount_block(Inst *ip);
 block_count *vm_block_insert(Inst *ip);
 
+/* defined in codegen.c: */
 Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1 *addrcif);
 u1 *createcalljavafunction(methodinfo *m);
 
+/* defined in asmpart.c: */
 Inst *intrp_asm_handle_exception(Inst *ip, java_objectheader *o, Cell *fp, Cell **new_spp, Cell **new_fpp);
 
+/* defined in dynamic-super.c: */
+void gen_inst(codegendata *cd, ptrint instr);
+void append_dispatch(codegendata *cd);
+void finish_ss(codegendata *cd);
+void patchersuper_rewrite(Inst *p);
+void dynamic_super_init(void);
+void dynamic_super_rewrite(codegendata *cd);
+
 #endif /* _INTRP_H */