comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 3901:aa67216400d3

7085404: JSR 292: VolatileCallSites should have push notification too Reviewed-by: never, kvn
author twisti
date Fri, 02 Sep 2011 00:36:18 -0700
parents a32de5085326
children 940513efe83a
comparison
equal deleted inserted replaced
3900:a32de5085326 3901:aa67216400d3
3742 bool GraphBuilder::for_invokedynamic_inline(ciMethod* callee) { 3742 bool GraphBuilder::for_invokedynamic_inline(ciMethod* callee) {
3743 // Get the MethodHandle from the CallSite. 3743 // Get the MethodHandle from the CallSite.
3744 ciCallSite* call_site = stream()->get_call_site(); 3744 ciCallSite* call_site = stream()->get_call_site();
3745 ciMethodHandle* method_handle = call_site->get_target(); 3745 ciMethodHandle* method_handle = call_site->get_target();
3746 3746
3747 // Inline constant and mutable call sites. We don't inline 3747 // Set the callee to have access to the class and signature in the
3748 // volatile call sites optimistically since they are specified 3748 // MethodHandleCompiler.
3749 // to change their value often and that would result in a lot of 3749 method_handle->set_callee(callee);
3750 // deoptimizations and recompiles. 3750 method_handle->set_caller(method());
3751 if (call_site->is_constant_call_site() || call_site->is_mutable_call_site()) { 3751
3752 // Set the callee to have access to the class and signature in the 3752 // Get an adapter for the MethodHandle.
3753 // MethodHandleCompiler. 3753 ciMethod* method_handle_adapter = method_handle->get_invokedynamic_adapter();
3754 method_handle->set_callee(callee); 3754 if (method_handle_adapter != NULL) {
3755 method_handle->set_caller(method()); 3755 if (try_inline(method_handle_adapter, /*holder_known=*/ true)) {
3756 3756 // Add a dependence for invalidation of the optimization.
3757 // Get an adapter for the MethodHandle. 3757 if (!call_site->is_constant_call_site()) {
3758 ciMethod* method_handle_adapter = method_handle->get_invokedynamic_adapter(); 3758 dependency_recorder()->assert_call_site_target_value(call_site, method_handle);
3759 if (method_handle_adapter != NULL) { 3759 }
3760 if (try_inline(method_handle_adapter, /*holder_known=*/ true)) { 3760 return true;
3761 // Add a dependence for invalidation of the optimization.
3762 if (!call_site->is_constant_call_site()) {
3763 dependency_recorder()->assert_call_site_target_value(call_site, method_handle);
3764 }
3765 return true;
3766 }
3767 } 3761 }
3768 } 3762 }
3769 return false; 3763 return false;
3770 } 3764 }
3771 3765