src/share/vm/code/compiledIC.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File webrev Sdiff src/share/vm/code

src/share/vm/code/compiledIC.cpp

Print this page




 207   address ic_call = _call->instruction_address();
 208 
 209   CompiledMethod* nm = iter->code();
 210   assert(ic_call != NULL, "ic_call address must be set");
 211   assert(nm != NULL, "must pass compiled method");
 212   assert(nm->contains(ic_call), "must be in compiled method");
 213 
 214   initialize_from_iter(iter);
 215 }
 216 
 217 bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
 218   assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
 219   assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
 220   assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
 221 
 222   address entry;
 223   if (call_info->call_kind() == CallInfo::itable_call) {
 224     assert(bytecode == Bytecodes::_invokeinterface, "");
 225     int itable_index = call_info->itable_index();
 226     entry = VtableStubs::find_itable_stub(itable_index);
 227     if (entry == false) {
 228       return false;
 229     }
 230 #ifdef ASSERT
 231     int index = call_info->resolved_method()->itable_index();
 232     assert(index == itable_index, "CallInfo pre-computes this");
 233 #endif //ASSERT
 234     InstanceKlass* k = call_info->resolved_method()->method_holder();
 235     assert(k->verify_itable_index(itable_index), "sanity check");
 236     InlineCacheBuffer::create_transition_stub(this, k, entry);
 237   } else {
 238     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.
 240     int vtable_index = call_info->vtable_index();
 241     assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check");
 242     entry = VtableStubs::find_vtable_stub(vtable_index);
 243     if (entry == NULL) {
 244       return false;
 245     }
 246     InlineCacheBuffer::create_transition_stub(this, NULL, entry);
 247   }




 207   address ic_call = _call->instruction_address();
 208 
 209   CompiledMethod* nm = iter->code();
 210   assert(ic_call != NULL, "ic_call address must be set");
 211   assert(nm != NULL, "must pass compiled method");
 212   assert(nm->contains(ic_call), "must be in compiled method");
 213 
 214   initialize_from_iter(iter);
 215 }
 216 
 217 bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
 218   assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
 219   assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
 220   assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
 221 
 222   address entry;
 223   if (call_info->call_kind() == CallInfo::itable_call) {
 224     assert(bytecode == Bytecodes::_invokeinterface, "");
 225     int itable_index = call_info->itable_index();
 226     entry = VtableStubs::find_itable_stub(itable_index);
 227     if (NULL == entry) {
 228       return false;
 229     }
 230 #ifdef ASSERT
 231     int index = call_info->resolved_method()->itable_index();
 232     assert(index == itable_index, "CallInfo pre-computes this");
 233 #endif //ASSERT
 234     InstanceKlass* k = call_info->resolved_method()->method_holder();
 235     assert(k->verify_itable_index(itable_index), "sanity check");
 236     InlineCacheBuffer::create_transition_stub(this, k, entry);
 237   } else {
 238     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.
 240     int vtable_index = call_info->vtable_index();
 241     assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check");
 242     entry = VtableStubs::find_vtable_stub(vtable_index);
 243     if (entry == NULL) {
 244       return false;
 245     }
 246     InlineCacheBuffer::create_transition_stub(this, NULL, entry);
 247   }


src/share/vm/code/compiledIC.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File