diff src/share/vm/oops/method.cpp @ 9026:22851e342f0e

Make calling the installed code from compiled code possible.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 12 Apr 2013 04:49:07 +0200
parents ff5a32117e02
children c6a1ffc707ff
line wrap: on
line diff
--- a/src/share/vm/oops/method.cpp	Fri Apr 12 01:53:52 2013 +0200
+++ b/src/share/vm/oops/method.cpp	Fri Apr 12 04:49:07 2013 +0200
@@ -722,7 +722,7 @@
   if (number_of_breakpoints() > 0)
     return true;
   if (is_method_handle_intrinsic())
-    return !is_synthetic();  // the generated adapters must be compiled
+    return !is_synthetic() && intrinsic_id() != vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod;  // the generated adapters must be compiled
   if (comp_level == CompLevel_any)
     return is_not_c1_compilable() || is_not_c2_compilable();
   if (is_c1_compile(comp_level))
@@ -850,7 +850,10 @@
   (void) make_adapters(h_method, CHECK);
 
   // ONLY USE the h_method now as make_adapter may have blocked
-
+  if (h_method->intrinsic_id() == vmIntrinsics::_CompilerToVMImpl_executeCompiledMethod) {
+    CompileBroker::compile_method(h_method, InvocationEntryBci, CompLevel_highest_tier,
+                                  methodHandle(), CompileThreshold, "executeCompiledMethod", CHECK);
+  }
 }
 
 address Method::make_adapters(methodHandle mh, TRAPS) {