[llvm-commits] [vmkit] r51671 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaInitialise.cpp JavaObject.cpp JavaObject.h VirtualTables.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu May 29 03:03:00 PDT 2008
Author: geoffray
Date: Thu May 29 05:02:59 2008
New Revision: 51671
URL: http://llvm.org/viewvc/llvm-project?rev=51671&view=rev
Log:
JavaCond objects are not GC-allocated anymore.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaObject.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaObject.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=51671&r1=51670&r2=51671&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Thu May 29 05:02:59 2008
@@ -46,7 +46,6 @@
INIT(CommonClass);
INIT(Class);
INIT(ClassArray);
- INIT(JavaCond);
INIT(LockObj);
INIT(JavaObject);
INIT(JavaThread);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaObject.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaObject.cpp?rev=51671&r1=51670&r2=51671&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaObject.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaObject.cpp Thu May 29 05:02:59 2008
@@ -25,8 +25,7 @@
mvm::Lock* JavaObject::globalLock = 0;
JavaCond* JavaCond::allocate() {
- // JavaCond::allocate must on behalf of the executing thread
- return vm_new(JavaThread::get()->isolate, JavaCond)();
+ return new JavaCond();
}
void JavaCond::notify() {
@@ -188,3 +187,8 @@
JavaThread::get()->isolate->illegalMonitorStateException(this);
}
}
+
+void LockObj::destroyer(size_t sz) {
+ delete varcond;
+ delete lock;
+}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h?rev=51671&r1=51670&r2=51671&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h Thu May 29 05:02:59 2008
@@ -26,9 +26,8 @@
class JavaThread;
class UTF8;
-class JavaCond : public mvm::Object {
+class JavaCond {
public:
- static VirtualTable* VT;
std::vector<JavaThread*> threads;
static JavaCond* allocate();
@@ -37,8 +36,6 @@
void notifyAll();
void wait(JavaThread* th);
void remove(JavaThread* th);
-
- virtual void TRACER;
};
@@ -50,6 +47,7 @@
virtual void print(mvm::PrintBuffer* buf) const;
virtual void TRACER;
+ virtual void destroyer(size_t sz);
static LockObj* allocate();
static LockObj* myLock(JavaObject* obj);
Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51671&r1=51670&r2=51671&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Thu May 29 05:02:59 2008
@@ -44,7 +44,6 @@
INIT(CommonClass);
INIT(Class);
INIT(ClassArray);
- INIT(JavaCond);
INIT(LockObj);
INIT(JavaObject);
INIT(JavaThread);
@@ -122,13 +121,7 @@
CommonClass::PARENT_TRACER;
}
-void JavaCond::TRACER {
- // FIXME: do I need this?
- TRACE_VECTOR(JavaThread*, std::allocator, threads);
-}
-
void LockObj::TRACER {
- varcond->MARK_AND_TRACE;
}
void JavaObject::TRACER {
More information about the llvm-commits
mailing list