* merged with tip (040f180a056b)
[cacao.git] / src / vm / class.c
index 1b547b3bfd74ce0c102d8354642fcafefe02466b..b851c65767f71224481d3fb540b2205ca8bd5d87 100644 (file)
@@ -50,6 +50,7 @@
 #include "vm/global.h"
 #include "vm/globals.hpp"
 #include "vm/javaobjects.hpp"
+#include "vm/jit/jitcache.h"
 #include "vm/linker.h"
 #include "vm/loader.h"
 #include "vm/options.h"
@@ -175,6 +176,9 @@ classinfo *class_create_classinfo(utf *classname)
 
        if (classname != utf_not_named_yet)
                class_set_packagename(c);
+#if defined (ENABLE_JITCACHE)
+    c->cache_file_fd = 0;
+#endif
 
        LOCK_INIT_OBJECT_LOCK(&c->object.header);
 
@@ -719,6 +723,11 @@ void class_free(classinfo *c)
        s4 i;
        vftbl_t *v;
 
+#if defined(ENABLE_JITCACHE)
+/* TODO: Find a way around the linker problem */
+/*    jitcache_freeclass(c);*/
+#endif
+
        class_freecpool(c);
 
        if (c->interfaces != NULL)