Merged.
[cacao.git] / src / vm / jit / codegen-common.hpp
index 51d45696483a53cb8f5e468f9b6dc87403325487..b988853b39629bf11a957320305f2b67b14ffc86 100644 (file)
@@ -1,4 +1,4 @@
-/* src/vm/jit/codegen-common.h - architecture independent code generator stuff
+/* src/vm/jit/codegen-common.hpp - architecture independent code generator stuff
 
    Copyright (C) 1996-2005, 2006, 2007, 2008
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
@@ -33,23 +33,24 @@ typedef struct branchref              branchref;
 typedef struct branch_label_ref_t     branch_label_ref_t;
 typedef struct jumpref                jumpref;
 typedef struct dataref                dataref;
-typedef struct exceptionref           exceptionref;
-typedef struct linenumberref          linenumberref;
 
 
 #include "config.h"
 #include "vm/types.h"
 
+#include "toolbox/list.hpp"
+
 #include "vm/jit/builtin.hpp"
-#include "vm/descriptor.h"
+#include "vm/descriptor.hpp"
 #include "vm/global.h"
-#include "vm/method.h"
+#include "vm/method.hpp"
 #include "vm/references.h"
 
 #include "vm/jit/dseg.h"
 #include "vm/jit/jit.hpp"
 #include "vm/jit/reg.h"
-#include "vm/jit/code.h"
+#include "vm/jit/code.hpp"
+#include "vm/jit/linenumbertable.hpp"
 #include "vm/jit/replace.hpp"
 
 
@@ -128,8 +129,14 @@ struct codegendata {
        dataref        *datareferences; /* list of data segment references        */
 #endif
 
-       list_t         *brancheslabel;
-       list_t         *linenumbers;    /* list of line numbers                   */
+#ifdef __cplusplus
+       DumpList<branch_label_ref_t*>* brancheslabel;
+       DumpList<Linenumber>* linenumbers; ///< List of line numbers.
+#else
+       // REMOVEME
+       DumpList* brancheslabel;
+       DumpList* linenumbers;
+#endif
 
        methodinfo     *method;
 
@@ -171,7 +178,7 @@ struct branch_label_ref_t {
        s4         condition;       /* conditional branch condition               */
        s4         reg;             /* register number to check                   */
        u4         options;         /* branch options                             */
-       listnode_t linkage;
+/*     listnode_t linkage; */
 };
 
 
@@ -192,24 +199,6 @@ struct dataref {
 };
 
 
-/* linenumberref **************************************************************/
-
-struct linenumberref {
-       s4             tablepos;    /* patching position in data segment          */
-       s4             linenumber;  /* line number, used for inserting into the   */
-                                   /* table and for validity checking            */
-                                   /* -1......start of inlined body              */
-                                   /* -2......end of inlined body                */
-                                   /* <= -3...special entry with methodinfo *    */
-                                                               /* (see doc/inlining_stacktrace.txt)          */
-       ptrint         targetmpc;   /* machine code program counter of first      */
-                                   /* instruction for given line                 */
-                                                               /* NOTE: for linenumber <= -3 this is a the   */
-                                   /* (methodinfo *) of the inlined method       */
-       linenumberref *next;        /* next element in linenumberref list         */
-};
-
-
 /* function prototypes ********************************************************/
 
 #ifdef __cplusplus