[llvm-commits] [vmkit] r50227 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaJIT.cpp JavaRuntimeJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Apr 24 12:42:40 PDT 2008
Author: geoffray
Date: Thu Apr 24 14:42:39 2008
New Revision: 50227
URL: http://llvm.org/viewvc/llvm-project?rev=50227&view=rev
Log:
Implement ldc for Class.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=50227&r1=50226&r2=50227&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Thu Apr 24 14:42:39 2008
@@ -921,7 +921,16 @@
AssessorDesc::dFloat);
mvm::jit::unprotectConstants();//->unlock();
} else if (type == JavaCtpInfo::ConstantClass) {
- assert(0 && "implement ConstantClass in ldc!");
+ if (ctpInfo->ctpRes[index]) {
+ CommonClass* cl = (CommonClass*)(ctpInfo->ctpRes[index]);
+ push(cl->llvmDelegatee(compilingClass->isolate->module, currentBlock),
+ AssessorDesc::dRef);
+ } else {
+ Value* val = getResolvedClass(index, false);
+ Value* res = CallInst::Create(getClassDelegateeLLVM, val, "",
+ currentBlock);
+ push(res, AssessorDesc::dRef);
+ }
} else {
JavaThread::get()->isolate->unknownError("unknown type %d", type);
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=50227&r1=50226&r2=50227&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Thu Apr 24 14:42:39 2008
@@ -223,12 +223,16 @@
return cl->_staticInstance;
}
}
+#endif
extern "C" JavaObject* getClassDelegatee(CommonClass* cl) {
+#ifdef MULTIPLE_VM
Jnjvm* vm = JavaThread::get()->isolate;
+#else
+ Jnjvm* vm = cl->isolate;
+#endif
return vm->getClassDelegatee(cl);
}
-#endif
void JavaJIT::initialise() {
void* p;
More information about the llvm-commits
mailing list