1.1 --- a/src/share/vm/opto/doCall.cpp Wed Jun 01 23:25:31 2011 -0700 1.2 +++ b/src/share/vm/opto/doCall.cpp Thu Jun 02 13:36:11 2011 -0700 1.3 @@ -123,24 +123,9 @@ 1.4 GraphKit kit(jvms); 1.5 Node* n = kit.argument(0); 1.6 1.7 - if (n->Opcode() == Op_ConP) { 1.8 - const TypeOopPtr* oop_ptr = n->bottom_type()->is_oopptr(); 1.9 - ciObject* const_oop = oop_ptr->const_oop(); 1.10 - ciMethodHandle* method_handle = const_oop->as_method_handle(); 1.11 - 1.12 - // Set the callee to have access to the class and signature in 1.13 - // the MethodHandleCompiler. 1.14 - method_handle->set_callee(call_method); 1.15 - method_handle->set_caller(caller); 1.16 - method_handle->set_call_profile(&profile); 1.17 - 1.18 - // Get an adapter for the MethodHandle. 1.19 - ciMethod* target_method = method_handle->get_method_handle_adapter(); 1.20 - if (target_method != NULL) { 1.21 - CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); 1.22 - if (hit_cg != NULL && hit_cg->is_inline()) 1.23 - return hit_cg; 1.24 - } 1.25 + CallGenerator* cg = CallGenerator::for_method_handle_inline(n, jvms, caller, call_method, profile); 1.26 + if (cg != NULL) { 1.27 + return cg; 1.28 } 1.29 1.30 return CallGenerator::for_direct_call(call_method); 1.31 @@ -157,7 +142,7 @@ 1.32 // the MethodHandleCompiler. 1.33 method_handle->set_callee(call_method); 1.34 method_handle->set_caller(caller); 1.35 - method_handle->set_call_profile(&profile); 1.36 + method_handle->set_call_profile(profile); 1.37 1.38 // Get an adapter for the MethodHandle. 1.39 ciMethod* target_method = method_handle->get_invokedynamic_adapter();