* src/toolbox/list.hpp (DumpList): Made sort function accessible.
[cacao.git] / src / vm / jit / code.hpp
index 31523fa9ad812eeb0563359b58b4bb0d443b5785..c32f53188344c53d0c3324bf8c57fb92bda6de49 100644 (file)
 #include "toolbox/list.hpp"
 
 #include "vm/global.h"
-#include "vm/method.h"
+#include "vm/method.hpp"
 
 #include "vm/jit/exceptiontable.h"
-#include "vm/jit/linenumbertable.h"
+#include "vm/jit/linenumbertable.hpp"
 #include "vm/jit/methodheader.h"
 #include "vm/jit/patcher-common.hpp"
 #include "vm/jit/replace.hpp"
@@ -71,28 +71,32 @@ struct codeinfo {
        uint32_t      flags;                /* OR of CODE_FLAG_ constants         */
 
        u1            optlevel;             /* optimization level of this code    */
-       s4            basicblockcount;      /* number of basic blocks             */
-
-       int32_t       synchronizedoffset;   /* stack offset of synchronized obj.  */
 
        /* machine code */
        u1           *mcode;                /* pointer to machine code            */
        u1           *entrypoint;           /* machine code entry point           */
        s4            mcodelength;          /* length of generated machine code   */
 
+       /* runtime information */
+       int32_t       stackframesize;       /* size of the stackframe in slots    */
+       int32_t       synchronizedoffset;   /* stack offset of synchronized obj.  */
+       uint8_t       savedintcount;        /* number of callee saved int regs    */
+       uint8_t       savedfltcount;        /* number of callee saved flt regs    */
+# if defined(HAS_ADDRESS_REGISTER_FILE)
+       uint8_t       savedadrcount;        /* number of callee saved adr regs    */
+# endif
+
        exceptiontable_t  *exceptiontable;
-       linenumbertable_t *linenumbertable;
+       LinenumberTable* linenumbertable;
 
        /* patcher list */
 #ifdef __cplusplus
-       List<patchref_t>* patchers;
+       LockedList<patchref_t>* patchers;
 #else
-       List*         patchers;
+       LockedList*   patchers;
 #endif
 
-       /* replacement */                                   
-       s4            stackframesize;       /* size of the stackframe in slots    */
-
+       /* replacement */
 #if defined(ENABLE_REPLACEMENT)
        rplpoint     *rplpoints;            /* replacement points                 */
        rplalloc     *regalloc;             /* register allocation info           */
@@ -100,17 +104,14 @@ struct codeinfo {
        s4            globalcount;          /* number of global allocations       */
        s4            regalloccount;        /* number of total allocations        */
        s4            memuse;               /* number of arg + local slots        */
-       u1            savedintcount;        /* number of callee saved int regs    */
-       u1            savedfltcount;        /* number of callee saved flt regs    */
-# if defined(HAS_ADDRESS_REGISTER_FILE)
-       u1            savedadrcount;        /* number of callee saved adr regs    */
-# endif
        u1           *savedmcode;           /* saved code under patches           */
 #endif
 
+       /* profiling information */
 #if defined(ENABLE_PROFILING)
        u4            frequency;            /* number of method invocations       */
-       u4           *bbfrequency;                  
+       s4            basicblockcount;      /* number of basic blocks             */
+       u4           *bbfrequency;          /* basic block profiling information  */
        s8            cycles;               /* number of cpu cycles               */
 #endif
 };