[llvm-commits] [vmkit] r51342 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaIsolate.cpp JavaUpcalls.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue May 20 13:53:54 PDT 2008
Author: geoffray
Date: Tue May 20 15:53:53 2008
New Revision: 51342
URL: http://llvm.org/viewvc/llvm-project?rev=51342&view=rev
Log:
Manually initialize bootstrap classes.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51342&r1=51341&r2=51342&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Tue May 20 15:53:53 2008
@@ -18,9 +18,9 @@
#include "JavaIsolate.h"
#include "JavaJIT.h"
#include "JavaString.h"
+#include "JavaThread.h"
#include "JavaTypes.h"
#include "JavaUpcalls.h"
-#include "JnjvmModule.h"
#include "JnjvmModuleProvider.h"
#include "LockedMap.h"
#include "Zip.h"
@@ -323,6 +323,16 @@
}
void JavaIsolate::loadBootstrap() {
+ loadName(Classpath::newClass->name,
+ CommonClass::jnjvmClassLoader, true, true, true);
+ loadName(Classpath::newConstructor->name,
+ CommonClass::jnjvmClassLoader, true, true, true);
+ loadName(Classpath::newMethod->name,
+ CommonClass::jnjvmClassLoader, true, true, true);
+ loadName(Classpath::newField->name,
+ CommonClass::jnjvmClassLoader, true, true, true);
+ loadName(Classpath::newStackTraceElement->name,
+ CommonClass::jnjvmClassLoader, true, true, true);
mapInitialThread();
loadAppClassLoader();
JavaObject* obj = JavaThread::currentThread();
@@ -403,7 +413,7 @@
ArrayObject* args = ArrayObject::acons(argc - 2, JavaArray::ofString, this);
for (int i = 2; i < argc; ++i) {
- args->setAt(i - 2, (JavaObject*)asciizToStr(argv[i]));
+ args->elements[i - 2] = (JavaObject*)asciizToStr(argv[i]);
}
executeClass(info.className, args);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51342&r1=51341&r2=51342&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Tue May 20 15:53:53 2008
@@ -167,6 +167,8 @@
}
void ClasspathThread::createInitialThread(Jnjvm* vm, JavaObject* th) {
+ vm->loadName(newVMThread->name, newVMThread->classLoader, true, true, true);
+
JavaObject* vmth = (*newVMThread)(vm);
name->setVirtualObjectField(th, (JavaObject*)vm->asciizToStr("main"));
priority->setVirtualInt32Field(th, (uint32)1);
@@ -174,12 +176,17 @@
vmThread->setVirtualObjectField(th, vmth);
assocThread->setVirtualObjectField(vmth, th);
running->setVirtualInt8Field(vmth, (uint32)1);
+
+ rootGroup->classDef->isolate->loadName(rootGroup->classDef->name,
+ rootGroup->classDef->classLoader,
+ true, true, true);
JavaObject* RG = rootGroup->getStaticObjectField();
group->setVirtualObjectField(th, RG);
groupAddThread->invokeIntSpecial(vm, RG, th);
}
void ClasspathThread::mapInitialThread(Jnjvm* vm) {
+ vm->loadName(newThread->name, newThread->classLoader, true, true, true);
JavaObject* th = (*newThread)(vm);
createInitialThread(vm, th);
JavaThread* myth = JavaThread::get();
More information about the llvm-commits
mailing list