918 } else { |
918 } else { |
919 assert(info.call_kind() == CallInfo::direct_call || |
919 assert(info.call_kind() == CallInfo::direct_call || |
920 info.call_kind() == CallInfo::vtable_call, ""); |
920 info.call_kind() == CallInfo::vtable_call, ""); |
921 } |
921 } |
922 #endif |
922 #endif |
|
923 // Get sender or sender's unsafe_anonymous_host, and only set cpCache entry to resolved if |
|
924 // it is not an interface. The receiver for invokespecial calls within interface |
|
925 // methods must be checked for every call. |
|
926 InstanceKlass* sender = pool->pool_holder(); |
|
927 sender = sender->is_unsafe_anonymous() ? sender->unsafe_anonymous_host() : sender; |
923 |
928 |
924 switch (info.call_kind()) { |
929 switch (info.call_kind()) { |
925 case CallInfo::direct_call: { |
930 case CallInfo::direct_call: |
926 // Get sender or sender's unsafe_anonymous_host, and only set cpCache entry to resolved if |
|
927 // it is not an interface. The receiver for invokespecial calls within interface |
|
928 // methods must be checked for every call. |
|
929 InstanceKlass* pool_holder = pool->pool_holder(); |
|
930 InstanceKlass* sender = pool_holder->is_unsafe_anonymous() ? |
|
931 pool_holder->unsafe_anonymous_host() : pool_holder; |
|
932 |
|
933 cp_cache_entry->set_direct_call( |
931 cp_cache_entry->set_direct_call( |
934 bytecode, |
932 bytecode, |
935 info.resolved_method(), |
933 info.resolved_method(), |
936 sender->is_interface(), |
934 sender->is_interface()); |
937 pool_holder); |
|
938 break; |
935 break; |
939 } |
|
940 case CallInfo::vtable_call: |
936 case CallInfo::vtable_call: |
941 cp_cache_entry->set_vtable_call( |
937 cp_cache_entry->set_vtable_call( |
942 bytecode, |
938 bytecode, |
943 info.resolved_method(), |
939 info.resolved_method(), |
944 info.vtable_index()); |
940 info.vtable_index()); |