[vmkit-commits] [vmkit] r60293 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sun Nov 30 07:19:03 PST 2008


Author: geoffray
Date: Sun Nov 30 09:19:02 2008
New Revision: 60293

URL: http://llvm.org/viewvc/llvm-project?rev=60293&view=rev
Log:
If there is no optimization, the IR of the root finalizer is not just
a ReturnInst. So set the finalizer of java/lang/Object to 0.


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=60293&r1=60292&r2=60293&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Sun Nov 30 09:19:02 2008
@@ -501,14 +501,18 @@
 #else
       JnjvmClassLoader* loader = cl->classLoader;
       Function* func = loader->getModuleProvider()->parseFunction(&meth);
-      if (!cl->super) meth.canBeInlined = true;
-      Function::iterator BB = func->begin();
-      BasicBlock::iterator I = BB->begin();
-      if (isa<ReturnInst>(I)) {
+      if (!cl->super) {
+        meth.canBeInlined = true;
         ((void**)VT)[0] = 0;
       } else {
-        // LLVM does not allow recursive compilation. Create the code now.
-        ((void**)VT)[0] = EE->getPointerToFunction(func);
+        Function::iterator BB = func->begin();
+        BasicBlock::iterator I = BB->begin();
+        if (isa<ReturnInst>(I)) {
+          ((void**)VT)[0] = 0;
+        } else {
+          // LLVM does not allow recursive compilation. Create the code now.
+          ((void**)VT)[0] = EE->getPointerToFunction(func);
+        }
       }
     }
 #endif





More information about the vmkit-commits mailing list