[llvm-commits] [vmkit] r52406 - /vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Jun 17 07:25:35 PDT 2008
Author: geoffray
Date: Tue Jun 17 09:25:34 2008
New Revision: 52406
URL: http://llvm.org/viewvc/llvm-project?rev=52406&view=rev
Log:
Bugfixes for inline compile.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=52406&r1=52405&r2=52406&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Tue Jun 17 09:25:34 2008
@@ -483,14 +483,19 @@
reader.seek(codeLen, Reader::SeekCur);
- const FunctionType *funcType = llvmFunction->getFunctionType();
+ LLVMMethodInfo* LMI = module->getMethodInfo(compilingMethod);
+ assert(LMI);
+ Function* func = LMI->getMethod();
+ llvmFunction = parentFunction;
+
+ const FunctionType *funcType = func->getFunctionType();
returnType = funcType->getReturnType();
endBlock = createBasicBlock("end");
llvmFunction = parentFunction;
currentBlock = curBB;
endExceptionBlock = 0;
-
+
opcodeInfos = (Opinfo*)alloca(codeLen * sizeof(Opinfo));
memset(opcodeInfos, 0, codeLen * sizeof(Opinfo));
for (uint32 i = 0; i < codeLen; ++i) {
@@ -531,10 +536,10 @@
if (cur == AssessorDesc::dLong){
new StoreInst(*i, longLocals[index], false, currentBlock);
++index;
- } else if (AssessorDesc::dBool || cur == AssessorDesc::dChar) {
+ } else if (cur == AssessorDesc::dBool || cur == AssessorDesc::dChar) {
new StoreInst(new ZExtInst(*i, Type::Int32Ty, "", currentBlock),
intLocals[index], false, currentBlock);
- } else if (AssessorDesc::dByte || cur == AssessorDesc::dShort) {
+ } else if (cur == AssessorDesc::dByte || cur == AssessorDesc::dShort) {
new StoreInst(new SExtInst(*i, Type::Int32Ty, "", currentBlock),
intLocals[index], false, currentBlock);
} else if (cur == AssessorDesc::dInt) {
More information about the llvm-commits
mailing list