* configure.ac (AC_CHECK_ENABLE_ASSERTION): Added
[cacao.git] / src / vmcore / class.c
index 01ff3a283b98bdf15eadf868e0f656737f6f9f33..1e5d2f30480be57d3dc19c1921c682cbb1a1b209 100644 (file)
@@ -115,6 +115,7 @@ classinfo *class_java_lang_reflect_Field;
 classinfo *class_java_lang_reflect_Method;
 classinfo *class_java_security_PrivilegedAction;
 classinfo *class_java_util_Vector;
+classinfo *class_java_util_HashMap;
 
 classinfo *arrayclass_java_lang_Object;
 
@@ -209,14 +210,15 @@ classinfo *class_create_classinfo(utf *classname)
                log_message_utf("Creating class: ", classname);
 #endif
 
-       /* GCNEW_UNCOLLECTABLE clears the allocated memory */
-
-#if defined(ENABLE_GC_CACAO)
+#if !defined(ENABLE_GC_BOEHM)
        c = (classinfo *) heap_alloc_uncollectable(sizeof(classinfo));
+       /*c = NEW(classinfo);
+       MZERO(c, classinfo, 1);*/
 #else
        c = GCNEW_UNCOLLECTABLE(classinfo, 1);
-       /*c=NEW(classinfo);*/
+       /* GCNEW_UNCOLLECTABLE clears the allocated memory */
 #endif
+
        c->name = classname;
 
        /* Set the header.vftbl of all loaded classes to the one of
@@ -785,7 +787,7 @@ void class_free(classinfo *c)
 {
        s4 i;
        vftbl_t *v;
-               
+
        class_freecpool(c);
 
        if (c->interfaces != NULL)
@@ -794,9 +796,7 @@ void class_free(classinfo *c)
        if (c->fields) {
                for (i = 0; i < c->fieldscount; i++)
                        field_free(&(c->fields[i]));
-#if defined(ENABLE_CACAO_GC)
                MFREE(c->fields, fieldinfo, c->fieldscount);
-#endif
        }
        
        if (c->methods) {