src/share/vm/opto/doCall.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7050554 Cdiff src/share/vm/opto/doCall.cpp

src/share/vm/opto/doCall.cpp

Print this page

        

*** 121,149 **** if (call_method->is_method_handle_invoke()) { if (bytecode != Bytecodes::_invokedynamic) { GraphKit kit(jvms); Node* n = kit.argument(0); ! if (n->Opcode() == Op_ConP) { ! const TypeOopPtr* oop_ptr = n->bottom_type()->is_oopptr(); ! ciObject* const_oop = oop_ptr->const_oop(); ! ciMethodHandle* method_handle = const_oop->as_method_handle(); ! ! // Set the callee to have access to the class and signature in ! // the MethodHandleCompiler. ! method_handle->set_callee(call_method); ! method_handle->set_caller(caller); ! method_handle->set_call_profile(&profile); ! ! // Get an adapter for the MethodHandle. ! ciMethod* target_method = method_handle->get_method_handle_adapter(); ! if (target_method != NULL) { ! CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); ! if (hit_cg != NULL && hit_cg->is_inline()) ! return hit_cg; } - } return CallGenerator::for_direct_call(call_method); } else { // Get the MethodHandle from the CallSite. --- 121,134 ---- if (call_method->is_method_handle_invoke()) { if (bytecode != Bytecodes::_invokedynamic) { GraphKit kit(jvms); Node* n = kit.argument(0); ! CallGenerator* cg = CallGenerator::for_method_handle_inline(n, jvms, caller, call_method, profile); ! if (cg != NULL) { ! return cg; } return CallGenerator::for_direct_call(call_method); } else { // Get the MethodHandle from the CallSite.
*** 155,165 **** // Set the callee to have access to the class and signature in // the MethodHandleCompiler. method_handle->set_callee(call_method); method_handle->set_caller(caller); ! method_handle->set_call_profile(&profile); // Get an adapter for the MethodHandle. ciMethod* target_method = method_handle->get_invokedynamic_adapter(); if (target_method != NULL) { CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor); --- 140,150 ---- // Set the callee to have access to the class and signature in // the MethodHandleCompiler. method_handle->set_callee(call_method); method_handle->set_caller(caller); ! method_handle->set_call_profile(profile); // Get an adapter for the MethodHandle. ciMethod* target_method = method_handle->get_invokedynamic_adapter(); if (target_method != NULL) { CallGenerator* hit_cg = this->call_generator(target_method, vtable_index, false, jvms, true, prof_factor);
src/share/vm/opto/doCall.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File