[vmkit-commits] [vmkit] r69164 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Wed Apr 15 07:29:53 PDT 2009


Author: geoffray
Date: Wed Apr 15 09:29:52 2009
New Revision: 69164

URL: http://llvm.org/viewvc/llvm-project?rev=69164&view=rev
Log:
Get array classes after calling the init method.


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp?rev=69164&r1=69163&r2=69164&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmClassLoader.cpp Wed Apr 15 09:29:52 2009
@@ -110,18 +110,20 @@
       upcalls->OfLong = (ClassPrimitive*)dlsym(nativeHandle, "long");
       upcalls->OfDouble = (ClassPrimitive*)dlsym(nativeHandle, "double");
       
-      // Get the base object arrays.
-      upcalls->ArrayOfString = 
-        constructArray(asciizConstructUTF8("[Ljava/lang/String;"));
-  
-      upcalls->ArrayOfObject = 
-        constructArray(asciizConstructUTF8("[Ljava/lang/Object;"));
       
       // We have the java/lang/Object class, execute the static initializer.
       static_init_t init = (static_init_t)(uintptr_t)SuperArray->classLoader;
       assert(init && "Loaded the wrong boot library");
       init(this);
       
+      // Get the base object arrays after the init, because init puts arrays
+      // in the class loader map.
+      upcalls->ArrayOfString = 
+        constructArray(asciizConstructUTF8("[Ljava/lang/String;"));
+  
+      upcalls->ArrayOfObject = 
+        constructArray(asciizConstructUTF8("[Ljava/lang/Object;"));
+      
 
     }
   }





More information about the vmkit-commits mailing list