718 int main_index = pool->cache()->secondary_entry_at(site_index)->main_entry_index(); |
718 int main_index = pool->cache()->secondary_entry_at(site_index)->main_entry_index(); |
719 |
719 |
720 // first resolve the signature to a MH.invoke methodOop |
720 // first resolve the signature to a MH.invoke methodOop |
721 if (!pool->cache()->entry_at(main_index)->is_resolved(bytecode)) { |
721 if (!pool->cache()->entry_at(main_index)->is_resolved(bytecode)) { |
722 JvmtiHideSingleStepping jhss(thread); |
722 JvmtiHideSingleStepping jhss(thread); |
723 CallInfo info; |
723 CallInfo callinfo; |
724 LinkResolver::resolve_invoke(info, Handle(), pool, |
724 LinkResolver::resolve_invoke(callinfo, Handle(), pool, |
725 site_index, bytecode, CHECK); |
725 site_index, bytecode, CHECK); |
726 // The main entry corresponds to a JVM_CONSTANT_InvokeDynamic, and serves |
726 // The main entry corresponds to a JVM_CONSTANT_InvokeDynamic, and serves |
727 // as a common reference point for all invokedynamic call sites with |
727 // as a common reference point for all invokedynamic call sites with |
728 // that exact call descriptor. We will link it in the CP cache exactly |
728 // that exact call descriptor. We will link it in the CP cache exactly |
729 // as if it were an invokevirtual of MethodHandle.invoke. |
729 // as if it were an invokevirtual of MethodHandle.invoke. |
730 pool->cache()->entry_at(main_index)->set_method( |
730 pool->cache()->entry_at(main_index)->set_method( |
731 bytecode, |
731 bytecode, |
732 info.resolved_method(), |
732 callinfo.resolved_method(), |
733 info.vtable_index()); |
733 callinfo.vtable_index()); |
734 } |
734 } |
735 |
735 |
736 // The method (f2 entry) of the main entry is the MH.invoke for the |
736 // The method (f2 entry) of the main entry is the MH.invoke for the |
737 // invokedynamic target call signature. |
737 // invokedynamic target call signature. |
738 oop f1_value = pool->cache()->entry_at(main_index)->f1(); |
738 oop f1_value = pool->cache()->entry_at(main_index)->f1(); |