228 return false; |
228 return false; |
229 } |
229 } |
230 #ifdef ASSERT |
230 #ifdef ASSERT |
231 int index = call_info->resolved_method()->itable_index(); |
231 int index = call_info->resolved_method()->itable_index(); |
232 assert(index == itable_index, "CallInfo pre-computes this"); |
232 assert(index == itable_index, "CallInfo pre-computes this"); |
233 #endif //ASSERT |
|
234 InstanceKlass* k = call_info->resolved_method()->method_holder(); |
233 InstanceKlass* k = call_info->resolved_method()->method_holder(); |
235 assert(k->verify_itable_index(itable_index), "sanity check"); |
234 assert(k->verify_itable_index(itable_index), "sanity check"); |
236 InlineCacheBuffer::create_transition_stub(this, k, entry); |
235 #endif //ASSERT |
|
236 CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(), |
|
237 call_info->resolved_klass()); |
|
238 holder->claim(); |
|
239 InlineCacheBuffer::create_transition_stub(this, holder, entry); |
237 } else { |
240 } else { |
238 assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable"); |
241 assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable"); |
239 // Can be different than selected_method->vtable_index(), due to package-private etc. |
242 // Can be different than selected_method->vtable_index(), due to package-private etc. |
240 int vtable_index = call_info->vtable_index(); |
243 int vtable_index = call_info->vtable_index(); |
241 assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check"); |
244 assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check"); |
515 } |
518 } |
516 |
519 |
517 |
520 |
518 bool CompiledIC::is_icholder_entry(address entry) { |
521 bool CompiledIC::is_icholder_entry(address entry) { |
519 CodeBlob* cb = CodeCache::find_blob_unsafe(entry); |
522 CodeBlob* cb = CodeCache::find_blob_unsafe(entry); |
520 return (cb != NULL && cb->is_adapter_blob()); |
523 if (cb != NULL && cb->is_adapter_blob()) { |
|
524 return true; |
|
525 } |
|
526 // itable stubs also use CompiledICHolder |
|
527 if (VtableStubs::is_entry_point(entry) && VtableStubs::stub_containing(entry)->is_itable_stub()) { |
|
528 return true; |
|
529 } |
|
530 return false; |
521 } |
531 } |
522 |
532 |
523 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) { |
533 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site, const CompiledMethod* cm) { |
524 // This call site might have become stale so inspect it carefully. |
534 // This call site might have become stale so inspect it carefully. |
525 address dest = cm->call_wrapper_at(call_site->addr())->destination(); |
535 address dest = cm->call_wrapper_at(call_site->addr())->destination(); |