[vmkit-commits] [vmkit] r56488 - /vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Sep 23 09:06:01 PDT 2008


Author: geoffray
Date: Tue Sep 23 11:06:00 2008
New Revision: 56488

URL: http://llvm.org/viewvc/llvm-project?rev=56488&view=rev
Log:
Bugfix for inline compile and native compile.


Modified:
    vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.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=56488&r1=56487&r2=56488&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp (original)
+++ vmkit/branches/isolate/lib/JnJVM/VMCore/JavaJIT.cpp Tue Sep 23 11:06:00 2008
@@ -267,7 +267,7 @@
                          currentBlock);
   
   if (returnType != Type::VoidTy)
-    llvm::ReturnInst::Create(result, currentBlock);
+    llvm::ReturnInst::Create(endNode, currentBlock);
   else
     llvm::ReturnInst::Create(currentBlock);
   
@@ -523,8 +523,7 @@
   Function* func = LMI->getMethod();
   llvmFunction = parentFunction;
 
-  const FunctionType *funcType = func->getFunctionType();
-  returnType = funcType->getReturnType();
+  returnType = func->getReturnType();
   endBlock = createBasicBlock("end");
 
   llvmFunction = parentFunction;
@@ -555,10 +554,10 @@
 #endif
   std::vector<Typedef*>::iterator type = 
     compilingMethod->getSignature()->args.begin();
-  Function::arg_iterator i = func->arg_begin(); 
+  std::vector<Value*>::iterator i = args.begin(); 
 
   if (isVirtual(compilingMethod->access)) {
-    new StoreInst(i, objectLocals[0], false, currentBlock);
+    new StoreInst(*i, objectLocals[0], false, currentBlock);
     ++i;
     ++index;
     ++count;
@@ -568,26 +567,26 @@
   for (;count < max; ++i, ++index, ++count, ++type) {
     
     const Typedef* cur = *type;
-    const Type* curType = i->getType();
+    const Type* curType = (*i)->getType();
 
     if (curType == Type::Int64Ty){
-      new StoreInst(i, longLocals[index], false, currentBlock);
+      new StoreInst(*i, longLocals[index], false, currentBlock);
       ++index;
     } else if (cur->isUnsigned()) {
-      new StoreInst(new ZExtInst(i, Type::Int32Ty, "", currentBlock),
+      new StoreInst(new ZExtInst(*i, Type::Int32Ty, "", currentBlock),
                     intLocals[index], false, currentBlock);
     } else if (curType == Type::Int8Ty || curType == Type::Int16Ty) {
-      new StoreInst(new SExtInst(i, Type::Int32Ty, "", currentBlock),
+      new StoreInst(new SExtInst(*i, Type::Int32Ty, "", currentBlock),
                     intLocals[index], false, currentBlock);
     } else if (curType == Type::Int32Ty) {
-      new StoreInst(i, intLocals[index], false, currentBlock);
+      new StoreInst(*i, intLocals[index], false, currentBlock);
     } else if (curType == Type::DoubleTy) {
-      new StoreInst(i, doubleLocals[index], false, currentBlock);
+      new StoreInst(*i, doubleLocals[index], false, currentBlock);
       ++index;
     } else if (curType == Type::FloatTy) {
-      new StoreInst(i, floatLocals[index], false, currentBlock);
+      new StoreInst(*i, floatLocals[index], false, currentBlock);
     } else {
-      new StoreInst(i, objectLocals[index], false, currentBlock);
+      new StoreInst(*i, objectLocals[index], false, currentBlock);
     }
   }
 





More information about the vmkit-commits mailing list