[llvm-commits] [vmkit] r51376 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaClass.cpp JavaClass.h JavaConstantPool.cpp JavaConstantPool.h JavaInitialise.cpp VirtualTables.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed May 21 07:58:03 PDT 2008
Author: geoffray
Date: Wed May 21 09:58:03 2008
New Revision: 51376
URL: http://llvm.org/viewvc/llvm-project?rev=51376&view=rev
Log:
Make JavaCtpInfo objects non gc-objects.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h
vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h
vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Wed May 21 09:58:03 2008
@@ -86,7 +86,7 @@
Attribut* cur = *i;
delete cur;
}
-
+ delete ctpInfo;
}
Reader* Attribut::toReader(Jnjvm* vm, ArrayUInt8* array, Attribut* attr) {
@@ -531,3 +531,4 @@
return I->second;
}
}
+
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Wed May 21 09:58:03 2008
@@ -305,7 +305,7 @@
JavaObject* staticInstance();
void createStaticInstance();
#endif
-
+
};
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp Wed May 21 09:58:03 2008
@@ -40,12 +40,6 @@
const uint32 JavaCtpInfo::ConstantNameAndType = 12;
-void JavaCtpInfo::print(mvm::PrintBuffer* buf) {
- buf->write("CtpInfoOf<");
- classDef->print(buf);
- buf->write(">");
-}
-
static uint32 unimplemented(Jnjvm* vm, uint32 type, uint32 e, Reader* reader,
sint32* ctpDef, void** ctpRes, uint8* ctpType) {
JavaThread::get()->isolate->error(Jnjvm::ClassFormatError,
@@ -202,7 +196,7 @@
void JavaCtpInfo::read(Jnjvm *vm, Class* cl, Reader* reader) {
uint32 nbCtp = reader->readU2();
- JavaCtpInfo* res = vm_new(vm, JavaCtpInfo)();
+ JavaCtpInfo* res = new JavaCtpInfo();
res->ctpRes = (void**)malloc(sizeof(void*)*nbCtp);
res->ctpDef = (sint32*)malloc(sizeof(sint32)*nbCtp);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h Wed May 21 09:58:03 2008
@@ -26,9 +26,8 @@
typedef uint32 (*ctpReader)(Jnjvm*, uint32, uint32, Reader*, sint32*, void**, uint8*);
-class JavaCtpInfo : public mvm::Object {
+class JavaCtpInfo {
public:
- static VirtualTable* VT;
Class* classDef;
void** ctpRes;
sint32* ctpDef;
@@ -47,9 +46,6 @@
static const uint32 ConstantInterfaceMethodref;
static const uint32 ConstantNameAndType;
- virtual void print(mvm::PrintBuffer* buf);
- virtual void TRACER;
-
static ctpReader funcsReader[16];
static uint32 CtpReaderClass(Jnjvm* vm, uint32 type, uint32 e, Reader* reader,
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 09:58:03 2008
@@ -48,7 +48,6 @@
INIT(ClassArray);
INIT(JavaMethod);
INIT(JavaField);
- INIT(JavaCtpInfo);
INIT(JavaCond);
INIT(LockObj);
INIT(JavaObject);
Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51376&r1=51375&r2=51376&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 09:58:03 2008
@@ -47,7 +47,6 @@
INIT(ClassArray);
INIT(JavaMethod);
INIT(JavaField);
- INIT(JavaCtpInfo);
INIT(JavaCond);
INIT(LockObj);
INIT(JavaObject);
@@ -149,7 +148,6 @@
#ifndef MULTIPLE_VM
_staticInstance->MARK_AND_TRACE;
#endif
- ctpInfo->MARK_AND_TRACE;
codeStaticTracer->MARK_AND_TRACE;
codeVirtualTracer->MARK_AND_TRACE;
}
@@ -166,11 +164,6 @@
void JavaField::TRACER {
}
-void JavaCtpInfo::TRACER {
- // Everything is hashed in the constant pool,
- // do not trace them here
-}
-
void JavaCond::TRACER {
// FIXME: do I need this?
TRACE_VECTOR(JavaThread*, std::allocator, threads);
More information about the llvm-commits
mailing list