[llvm-commits] [vmkit] r52019 - /vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Jun 5 13:55:45 PDT 2008
Author: geoffray
Date: Thu Jun 5 15:55:44 2008
New Revision: 52019
URL: http://llvm.org/viewvc/llvm-project?rev=52019&view=rev
Log:
the class given to createObjectArray is the base class, not the array class.
Modified:
vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp
Modified: vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp?rev=52019&r1=52018&r2=52019&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp Thu Jun 5 15:55:44 2008
@@ -165,8 +165,14 @@
jclass arrayType, jint arrayLength)
{
Jnjvm* vm = JavaThread::get()->isolate;
- ClassArray* cl = (ClassArray*)NativeUtil::resolvedImplClass(arrayType, true);
- return (jobject) ArrayObject::acons((sint32)arrayLength, cl, vm);
+ CommonClass* base = NativeUtil::resolvedImplClass(arrayType, true);
+ JavaObject* loader = base->classLoader;
+ const UTF8* name = base->name;
+ const UTF8* arrayName = AssessorDesc::constructArrayName(vm, 0, 1, name);
+ ClassArray* array = vm->constructArray(arrayName, loader);
+ ArrayObject* res = ArrayObject::acons(arrayLength, array, vm);
+
+ return (jobject) res;
}
More information about the llvm-commits
mailing list