Merged branch subtype-trunk into default.
[cacao.git] / src / vm / loader.cpp
index 6c43e927af0b0e787ed54a35a384b1571c4af3a4..7bc8ff4a177568738f2648857c824ef74c470099 100644 (file)
 #include "vm/types.h"
 
 #include "mm/dumpmemory.hpp"
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "native/llni.h"
 
 #include "threads/mutex.hpp"
 
 #include "toolbox/hashtable.h"
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
 #include "vm/jit/builtin.hpp"
-#include "vm/classcache.h"
+#include "vm/classcache.hpp"
 #include "vm/exceptions.hpp"
 #include "vm/field.hpp"
 #include "vm/global.h"
 #include "vm/globals.hpp"
-#include "vm/linker.h"
+#include "vm/linker.hpp"
 #include "vm/loader.hpp"
-#include "vm/method.h"
+#include "vm/method.hpp"
 #include "vm/options.h"
 #include "vm/package.hpp"
 #include "vm/primitive.hpp"
-#include "vm/resolve.h"
+#include "vm/resolve.hpp"
 #include "vm/rt-timing.h"
 #include "vm/string.hpp"
 #include "vm/suck.hpp"
@@ -61,7 +61,7 @@
 
 
 #if defined(ENABLE_JAVASE)
-# include "vm/annotation.h"
+# include "vm/annotation.hpp"
 # include "vm/stackmap.h"
 #endif
 
@@ -70,7 +70,7 @@
 #endif
 
 #if defined(ENABLE_ZLIB)
-# include "vm/zip.h"
+# include "vm/zip.hpp"
 #endif
 
 #include "vm/jit/stubs.hpp"
@@ -97,17 +97,14 @@ static hashtable *hashtable_classloader;
  
 void loader_preinit(void)
 {
-#if defined(ENABLE_THREADS)
-       list_classpath_entry *lce;
-#endif
-
        TRACESUBSYSTEMINITIALIZATION("loader_preinit");
 
 #if defined(ENABLE_THREADS)
        /* Initialize the monitor pointer for zip/jar file locking. */
 
-       for (lce = (list_classpath_entry*) list_first(list_classpath_entries); lce != NULL;
-                lce = (list_classpath_entry*) list_next(list_classpath_entries, lce)) {
+       for (List<list_classpath_entry*>::iterator it = list_classpath_entries->begin(); it != list_classpath_entries->end(); it++) {
+               list_classpath_entry* lce = *it;
+
                if (lce->type == CLASSPATH_ARCHIVE)
                        lce->mutex = new Mutex();
        }
@@ -395,15 +392,15 @@ classloader_t *loader_hashtable_classloader_find(java_handle_t *cl)
 
 void loader_load_all_classes(void)
 {
-       list_classpath_entry    *lce;
 #if defined(ENABLE_ZLIB)
        hashtable               *ht;
        hashtable_zipfile_entry *htzfe;
        utf                     *u;
 #endif
 
-       for (lce = (list_classpath_entry*) list_first(list_classpath_entries); lce != NULL;
-                lce = (list_classpath_entry*) list_next(list_classpath_entries, lce)) {
+       for (List<list_classpath_entry*>::iterator it = list_classpath_entries->begin(); it != list_classpath_entries->end(); it++) {
+               list_classpath_entry* lce = *it;
+
 #if defined(ENABLE_ZLIB)
                if (lce->type == CLASSPATH_ARCHIVE) {
                        /* get the classes hashtable */