* Updated to jitcache-arm-x86 branch d4f6023b26c5+d1b5b1c106ac
[cacao.git] / src / vm / jit / code.cpp
index b39852d2ed7a8f20024421d435153fc70bb2bb25..a991de2895c9938070b835979e3b0d4f39c9430f 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "vm/jit/code.hpp"
 #include "vm/jit/codegen-common.hpp"
+#include "vm/jit/jitcache.hpp"
 #include "vm/jit/patcher-common.hpp"
 #include "vm/jit/methodtree.h"
 
@@ -66,6 +67,7 @@ void code_init(void)
    The following fields are set in codeinfo:
        m
        patchers
+          cachedrefs
 
    RETURN VALUE:
        a new, initialized codeinfo, or
@@ -83,7 +85,11 @@ codeinfo *code_codeinfo_new(methodinfo *m)
 
        patcher_list_create(code);
 
-#if defined(ENABLE_STATISTICS)
+#if defined (ENABLE_JITCACHE)
+       jitcache_list_create(code);
+#endif
+
+#if defined (ENABLE_STATISTICS)
        if (opt_stat)
                size_codeinfo += sizeof(codeinfo);
 #endif
@@ -234,6 +240,10 @@ void code_codeinfo_free(codeinfo *code)
 
        patcher_list_free(code);
 
+#if defined(ENABLE_JITCACHE)
+       jitcache_list_free(code);
+#endif
+
 #if defined(ENABLE_REPLACEMENT)
        replace_free_replacement_points(code);
 #endif