[vmkit-commits] [vmkit] r70129 - in /vmkit/trunk/lib/JnJVM/Compiler: JavaAOTCompiler.cpp JavaJITCompiler.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sun Apr 26 08:11:25 PDT 2009


Author: geoffray
Date: Sun Apr 26 10:11:24 2009
New Revision: 70129

URL: http://llvm.org/viewvc/llvm-project?rev=70129&view=rev
Log:
Don't forget to copy the finalizer from the super class.


Modified:
    vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp
    vmkit/trunk/lib/JnJVM/Compiler/JavaJITCompiler.cpp

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

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaAOTCompiler.cpp Sun Apr 26 10:11:24 2009
@@ -1448,6 +1448,7 @@
         JavaVirtualTable::getFirstJavaMethodIndex();
     memcpy(VT->getFirstJavaMethod(), cl->super->virtualVT->getFirstJavaMethod(),
            size * sizeof(uintptr_t));
+    VT->destructor = cl->super->virtualVT->destructor;
   }
   
   for (uint32 i = 0; i < cl->nbVirtualMethods; ++i) {

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

==============================================================================
--- vmkit/trunk/lib/JnJVM/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Compiler/JavaJITCompiler.cpp Sun Apr 26 10:11:24 2009
@@ -139,27 +139,11 @@
     
   LLVMClassInfo* LCI = getClassInfo(cl);
 
-#ifdef WITH_TRACER
-  if (VT->tracer) {
-    // So the class has a tracer because either a) the class was vmjced or
-    // b) the boot sequence has set it. Create the tracer as an external
-    // function.
-    Function* func = Function::Create(JnjvmModule::MarkAndTraceType,
-                                      GlobalValue::ExternalLinkage,
-                                      "", getLLVMModule());
-       
-    uintptr_t ptr = VT->tracer;
-    JnjvmModule::executionEngine->addGlobalMapping(func, (void*)ptr);
-    LCI->virtualTracerFunction = func;
-
-  }
-  
   if (VT->init) {
     // The VT hash already been filled by the AOT compiler so there
     // is nothing left to do!
     return;
   }
-#endif
   
   if (cl->super) {
     // Copy the super VT into the current VT.
@@ -167,6 +151,7 @@
         JavaVirtualTable::getFirstJavaMethodIndex();
     memcpy(VT->getFirstJavaMethod(), cl->super->virtualVT->getFirstJavaMethod(),
            size * sizeof(uintptr_t));
+    VT->destructor = cl->super->virtualVT->destructor;
   }
 
 
@@ -180,13 +165,11 @@
     // Special handling for finalize method. Don't put a finalizer
     // if there is none, or if it is empty.
     if (meth.offset == 0) {
-#if !defined(ISOLATE_SHARING) && !defined(USE_GC_BOEHM)
       if (!cl->super) {
         meth.canBeInlined = true;
       } else {
         VT->destructor = (uintptr_t)EE->getPointerToFunctionOrStub(func);
       }
-#endif
     } else {
       VT->getFunctions()[meth.offset] = 
         (uintptr_t)EE->getPointerToFunctionOrStub(func);





More information about the vmkit-commits mailing list