[llvm-commits] [vmkit] r50344 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathVMRuntime.cpp VMCore/NativeUtil.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Apr 28 01:51:16 PDT 2008
Author: geoffray
Date: Mon Apr 28 03:51:15 2008
New Revision: 50344
URL: http://llvm.org/viewvc/llvm-project?rev=50344&view=rev
Log:
A service environment shares the native libraries with the bootstrap
virtual machine.
Modified:
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp
vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp
Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp?rev=50344&r1=50343&r2=50344&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp Mon Apr 28 03:51:15 2008
@@ -66,7 +66,11 @@
jobject _str,
jobject _loader) {
JavaString* str = (JavaString*)_str;
+#ifndef SERVICE_VM
Jnjvm* vm = JavaThread::get()->isolate;
+#else
+ Jnjvm* vm = Jnjvm::bootstrapVM;
+#endif
char* buf = str->strToAsciiz();
Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=50344&r1=50343&r2=50344&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Mon Apr 28 03:51:15 2008
@@ -182,7 +182,11 @@
static void* loadName(char* buf, bool& jnjvm) {
void* res = dlsym(0, buf);
if (!res) {
- Jnjvm *vm = JavaThread::get()->isolate;
+#ifndef SERVICE_VM
+ Jnjvm* vm = JavaThread::get()->isolate;
+#else
+ Jnjvm* vm = Jnjvm::bootstrapVM;
+#endif
for (std::vector<void*>::iterator i = vm->nativeLibs.begin(),
e = vm->nativeLibs.end(); i!= e; ++i) {
res = dlsym((*i), buf);
More information about the llvm-commits
mailing list