[vmkit-commits] [vmkit] r69048 - /vmkit/trunk/lib/JnJVM/Compiler/JavaJITOpcodes.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Apr 14 09:55:32 PDT 2009


Author: geoffray
Date: Tue Apr 14 11:55:32 2009
New Revision: 69048

URL: http://llvm.org/viewvc/llvm-project?rev=69048&view=rev
Log:
Bugfix for static compilation.


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

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

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaJITOpcodes.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaJITOpcodes.cpp Tue Apr 14 11:55:32 2009
@@ -1858,9 +1858,11 @@
 
           LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[charId];
           sizeElement = LAI.sizeInBytesConstant;
-          if (TheCompiler->isStaticCompiling()) {
-            TheVT = CallInst::Create(module->GetVTFromClassArrayFunction,
-                                     valCl, "", currentBlock);
+          if (TheCompiler->isStaticCompiling() && 
+              valCl->getType() != module->JavaClassArrayType) {
+              valCl = new LoadInst(valCl, "", currentBlock);
+              TheVT = CallInst::Create(module->GetVTFromClassArrayFunction,
+                                       valCl, "", currentBlock);
           } else {
             TheVT = TheCompiler->getVirtualTable(dcl->virtualVT);
           }





More information about the vmkit-commits mailing list