[llvm-commits] [vmkit] r51383 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaInitialise.cpp JavaIsolate.cpp JavaIsolate.h VirtualTables.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed May 21 09:11:16 PDT 2008
Author: geoffray
Date: Wed May 21 11:11:16 2008
New Revision: 51383
URL: http://llvm.org/viewvc/llvm-project?rev=51383&view=rev
Log:
ThreadSystem is now a non-gc class.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h
vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51383&r1=51382&r2=51383&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 11:11:16 2008
@@ -52,7 +52,6 @@
INIT(JavaThread);
INIT(Typedef);
INIT(Signdef);
- INIT(ThreadSystem);
INIT(Jnjvm);
INIT(Reader);
INIT(ZipFile);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51383&r1=51382&r2=51383&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Wed May 21 11:11:16 2008
@@ -295,22 +295,12 @@
}
-void ThreadSystem::print(mvm::PrintBuffer* buf) const {
- buf->write("ThreadSystem<>");
-}
-
void JavaIsolate::print(mvm::PrintBuffer* buf) const {
buf->write("Java isolate: ");
buf->write(name);
}
-void ThreadSystem::initialise() {
- nonDaemonThreads = 1;
- nonDaemonLock = mvm::Lock::allocNormal();
- nonDaemonVar = mvm::Cond::allocCond();
-}
-
JavaObject* JavaIsolate::loadAppClassLoader() {
if (appClassLoader == 0) {
appClassLoader = Classpath::getSystemClassLoader->invokeJavaObjectStatic(this);
@@ -466,8 +456,7 @@
isolate->bootstrapThread->baseSP = baseSP;
JavaThread::threadKey->set(isolate->bootstrapThread);
- isolate->threadSystem = vm_new(isolate, ThreadSystem)();
- isolate->threadSystem->initialise();
+ isolate->threadSystem = new ThreadSystem();
isolate->name = "isolate";
isolate->appClassLoader = 0;
isolate->jniEnv = &JNI_JNIEnvTable;
@@ -541,8 +530,7 @@
#endif
#if defined(SERVICE_VM) || !defined(MULTIPLE_VM)
- isolate->threadSystem = vm_new(isolate, ThreadSystem)();
- isolate->threadSystem->initialise();
+ isolate->threadSystem = new ThreadSystem();
#endif
return isolate;
@@ -550,4 +538,5 @@
void JavaIsolate::destroyer(size_t sz) {
Jnjvm::destroyer(sz);
+ delete threadSystem;
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h?rev=51383&r1=51382&r2=51383&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h Wed May 21 11:11:16 2008
@@ -26,17 +26,23 @@
class JavaObject;
class ThreadSystem;
-class ThreadSystem : public mvm::Object {
+class ThreadSystem {
public:
- static VirtualTable* VT;
uint16 nonDaemonThreads;
mvm::Lock* nonDaemonLock;
mvm::Cond* nonDaemonVar;
+
+ ThreadSystem() {
+ nonDaemonThreads = 1;
+ nonDaemonLock = mvm::Lock::allocNormal();
+ nonDaemonVar = mvm::Cond::allocCond();
+ }
+
+ ~ThreadSystem() {
+ delete nonDaemonLock;
+ delete nonDaemonVar;
+ }
- virtual void print(mvm::PrintBuffer* buf) const;
- virtual void TRACER;
-
- void initialise();
};
class JavaIsolate : public Jnjvm {
Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51383&r1=51382&r2=51383&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 11:11:16 2008
@@ -51,7 +51,6 @@
INIT(JavaThread);
INIT(Typedef);
INIT(Signdef);
- INIT(ThreadSystem);
INIT(Jnjvm);
INIT(Reader);
INIT(ZipFile);
@@ -183,9 +182,6 @@
_virtualCallAP->MARK_AND_TRACE;
}
-void ThreadSystem::TRACER {
-}
-
void Jnjvm::TRACER {
appClassLoader->MARK_AND_TRACE;
hashUTF8->MARK_AND_TRACE;
@@ -213,7 +209,6 @@
void JavaIsolate::TRACER {
Jnjvm::PARENT_TRACER;
- threadSystem->MARK_AND_TRACE;
bootstrapThread->MARK_AND_TRACE;
}
More information about the llvm-commits
mailing list