[vmkit-commits] [vmkit] r180471 - throwFromJni does not need to end known frame and enter uncooperative code. The following RETURN_FROM_JNI will do it. Bugfix when a non-customized version was becoming a customized one. If the LLVMInfo does not know if the method is customizable, do not try to customize it.

Peter Senna Tschudin peter.senna at gmail.com
Thu Apr 25 10:15:29 PDT 2013


Author: peter.senna
Date: Thu Apr 25 12:13:58 2013
New Revision: 180471

URL: http://llvm.org/viewvc/llvm-project?rev=180471&view=rev
Log:
throwFromJni does not need to end known frame and enter uncooperative code. The following RETURN_FROM_JNI will do it. Bugfix when a non-customized version was becoming a customized one. If the LLVMInfo does not know if the method is customizable, do not try to customize it.
(cherry picked from commit 05dedffcfb7768b86b1ee218177f24e3203647dd)

Modified:
    vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp
    vmkit/trunk/lib/j3/VMCore/JavaThread.h

Modified: vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp?rev=180471&r1=180470&r2=180471&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/JavaLLVMCompiler.cpp Thu Apr 25 12:13:58 2013
@@ -61,7 +61,7 @@ Function* JavaLLVMCompiler::parseFunctio
   // We are jitting. Take the lock.
   vmkit::VmkitModule::protectIR();
   if (func->getLinkage() == GlobalValue::ExternalWeakLinkage) {
-    JavaJIT jit(this, meth, func, LMI->isCustomizable? customizeFor : NULL);
+    JavaJIT jit(this, meth, func, LMI->isCustomizable ? customizeFor : NULL);
     if (isNative(meth->access)) {
       jit.nativeCompile();
       vmkit::VmkitModule::runPasses(func, JavaNativeFunctionPasses);
@@ -75,7 +75,7 @@ Function* JavaLLVMCompiler::parseFunctio
     if (!LMI->isCustomizable && jit.isCustomizable) {
       // It's the first time we parsed the method and we just found
       // out it can be customized.
-    	// TODO(geoffray): return a customized version to this caller.
+      // TODO(geoffray): return a customized version to this caller.
       meth->isCustomizable = true;
       LMI->isCustomizable = true;
     }

Modified: vmkit/trunk/lib/j3/VMCore/JavaThread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaThread.h?rev=180471&r1=180470&r2=180471&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaThread.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaThread.h Thu Apr 25 12:13:58 2013
@@ -158,9 +158,6 @@ public:
   /// throwFromJNI - Throw an exception after executing JNI code.
   ///
   void throwFromJNI(word_t SP) {
-  	/* DEBUG*/
-  	endKnownFrame();
-  	enterUncooperativeCode(SP);
     // Nothing to do. The RETURN_FROM_JNI will take care of it.
   }
   





More information about the vmkit-commits mailing list