src/share/vm/code/compiledIC.cpp

changeset 8997
f8a45a60bc6b
parent 8075
be740540f60c
child 9041
95a08233f46c
child 9185
82f9d3b7e317
equal deleted inserted replaced
8996:2667e5c45e24 8997:f8a45a60bc6b
1 /* 1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
226 return false; 226 return false;
227 } 227 }
228 #ifdef ASSERT 228 #ifdef ASSERT
229 int index = call_info->resolved_method()->itable_index(); 229 int index = call_info->resolved_method()->itable_index();
230 assert(index == itable_index, "CallInfo pre-computes this"); 230 assert(index == itable_index, "CallInfo pre-computes this");
231 #endif //ASSERT
232 InstanceKlass* k = call_info->resolved_method()->method_holder(); 231 InstanceKlass* k = call_info->resolved_method()->method_holder();
233 assert(k->verify_itable_index(itable_index), "sanity check"); 232 assert(k->verify_itable_index(itable_index), "sanity check");
234 InlineCacheBuffer::create_transition_stub(this, k, entry); 233 #endif //ASSERT
234 CompiledICHolder* holder = new CompiledICHolder(call_info->resolved_method()->method_holder(),
235 call_info->resolved_klass()());
236 holder->claim();
237 InlineCacheBuffer::create_transition_stub(this, holder, entry);
235 } else { 238 } else {
236 assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable"); 239 assert(call_info->call_kind() == CallInfo::vtable_call, "either itable or vtable");
237 // Can be different than selected_method->vtable_index(), due to package-private etc. 240 // Can be different than selected_method->vtable_index(), due to package-private etc.
238 int vtable_index = call_info->vtable_index(); 241 int vtable_index = call_info->vtable_index();
239 assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check"); 242 assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check");
525 } 528 }
526 529
527 530
528 bool CompiledIC::is_icholder_entry(address entry) { 531 bool CompiledIC::is_icholder_entry(address entry) {
529 CodeBlob* cb = CodeCache::find_blob_unsafe(entry); 532 CodeBlob* cb = CodeCache::find_blob_unsafe(entry);
530 return (cb != NULL && cb->is_adapter_blob()); 533 if (cb != NULL && cb->is_adapter_blob()) {
534 return true;
535 }
536 // itable stubs also use CompiledICHolder
537 if (VtableStubs::is_entry_point(entry) && VtableStubs::stub_containing(entry)->is_itable_stub()) {
538 return true;
539 }
540 return false;
531 } 541 }
532 542
533 // ---------------------------------------------------------------------------- 543 // ----------------------------------------------------------------------------
534 544
535 void CompiledStaticCall::set_to_clean() { 545 void CompiledStaticCall::set_to_clean() {

mercurial