[vmkit-commits] [vmkit] r83534 - /vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Thu Oct 8 00:58:17 PDT 2009


Author: geoffray
Date: Thu Oct  8 02:58:16 2009
New Revision: 83534

URL: http://llvm.org/viewvc/llvm-project?rev=83534&view=rev
Log:
The code emitted for a JNI call was not correct.


Modified:
    vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp

Modified: vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp?rev=83534&r1=83533&r2=83534&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaJIT.cpp Thu Oct  8 02:58:16 2009
@@ -387,16 +387,16 @@
     ResultObject = new AllocaInst(module->JavaObjectType, "",
                                   func->begin()->begin());
     Value* GCArgs[2] = { 
-      new BitCastInst(ResultObject, module->ptrPtrType, "", ResultObject),
+      new BitCastInst(ResultObject, module->ptrPtrType, "", currentBlock),
       module->constantPtrNull
     };
       
     if (TheCompiler->useCooperativeGC()) {
       CallInst::Create(module->llvm_gc_gcroot, GCArgs, GCArgs + 2, "",
-                       ResultObject);
+                       currentBlock);
     }
     new StoreInst(module->JavaObjectNullConstant, ResultObject, "",
-                  ResultObject);
+                  currentBlock);
   }
   
   Value* nativeFunc = TheCompiler->getNativeFunction(compilingMethod,





More information about the vmkit-commits mailing list