[vmkit-commits] [vmkit] r55445 - in /vmkit/branches/isolate/lib/JnJVM/VMCore: JavaJIT.cpp JavaJIT.h JnjvmModule.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed Aug 27 15:43:27 PDT 2008
Author: geoffray
Date: Wed Aug 27 17:43:27 2008
New Revision: 55445
URL: http://llvm.org/viewvc/llvm-project?rev=55445&view=rev
Log:
Make the ctpCache in a multi environment be a pointer to pointers.
Modified:
vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp
vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.h
vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp
Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp?rev=55445&r1=55444&r2=55445&view=diff
==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp Wed Aug 27 17:43:27 2008
@@ -1550,10 +1550,13 @@
Value* JavaJIT::getConstantPoolAt(uint32 index, Function* resolver,
Value* additionalArg, bool doThrow) {
const Type* returnType = resolver->getReturnType();
+#ifdef MULTIPLE_VM
+ Value* CTP = ctpCache;
+#else
JavaConstantPool* ctp = compilingClass->ctpInfo;
LLVMConstantPoolInfo* LCPI = module->getConstantPoolInfo(ctp);
Value* CTP = LCPI->getDelegatee(this);
-
+#endif
std::vector<Value*> indexes; //[3];
indexes.push_back(ConstantInt::get(Type::Int32Ty, index));
Value* arg1 = GetElementPtrInst::Create(CTP, indexes.begin(),
@@ -1578,8 +1581,13 @@
currentBlock = falseCl;
std::vector<Value*> Args;
+#ifdef MULTIPLE_VM
+ Value* v = new LoadInst(ctpCache, "", currentBlock);
+ v = new BitCastInst(v, JnjvmModule::JavaClassType, "", currentBlock);
+#else
LLVMClassInfo* LCI = (LLVMClassInfo*)module->getClassInfo(compilingClass);
Value* v = LCI->getVar(this);
+#endif
Args.push_back(v);
ConstantInt* CI = ConstantInt::get(Type::Int32Ty, index);
Args.push_back(CI);
Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.h?rev=55445&r1=55444&r2=55445&view=diff
==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.h (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.h Wed Aug 27 17:43:27 2008
@@ -257,6 +257,9 @@
llvm::Value* isolateLocal;
#endif
+#if defined(MULTIPLE_VM)
+ llvm::Value* ctpCache;
+#endif
static const char* OpcodeNames[256];
Modified: vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=55445&r1=55444&r2=55445&view=diff
==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JnjvmModule.cpp Wed Aug 27 17:43:27 2008
@@ -569,7 +569,7 @@
#if defined(MULTIPLE_VM)
llvmArgs.push_back(mvm::jit::ptrType); // domain
- llvmArgs.push_back(mvm::jit::ptr32Type); // cached constant pool
+ llvmArgs.push_back(mvm::jit::ptrPtrType); // cached constant pool
#endif
uint8 id = signature->ret->funcs->numId;
@@ -594,7 +594,7 @@
#if defined(MULTIPLE_VM)
llvmArgs.push_back(mvm::jit::ptrType); // domain
- llvmArgs.push_back(mvm::jit::ptr32Type); // cached constant pool
+ llvmArgs.push_back(mvm::jit::ptrPtrType); // cached constant pool
#endif
uint8 id = signature->ret->funcs->numId;
@@ -622,7 +622,7 @@
#if defined(MULTIPLE_VM)
llvmArgs.push_back(mvm::jit::ptrType); // domain
- llvmArgs.push_back(mvm::jit::ptr32Type); // cached constant pool
+ llvmArgs.push_back(mvm::jit::ptrPtrType); // cached constant pool
#endif
uint8 id = signature->ret->funcs->numId;
@@ -773,7 +773,7 @@
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
std::vector<const llvm::Type*> Args2;
Args2.push_back(mvm::jit::ptrType); // vm
- Args2.push_back(mvm::jit::ptr32Type); // ctp
+ Args2.push_back(mvm::jit::ptrPtrType); // ctp
Args2.push_back(getVirtualPtrType());
Args2.push_back(JnjvmModule::JavaObjectType);
Args2.push_back(PointerType::getUnqual(Type::Int32Ty));
@@ -790,7 +790,7 @@
llvm::MutexGuard locked(mvm::jit::executionEngine->lock);
std::vector<const llvm::Type*> Args;
Args.push_back(mvm::jit::ptrType); // vm
- Args.push_back(mvm::jit::ptr32Type); // ctp
+ Args.push_back(mvm::jit::ptrPtrType); // ctp
Args.push_back(getStaticPtrType());
Args.push_back(PointerType::getUnqual(Type::Int32Ty));
uint8 id = signature->ret->funcs->numId;
More information about the vmkit-commits
mailing list