src/share/vm/code/compiledIC.cpp

changeset 5762
891687731b59
parent 5732
b2e698d2276c
child 6172
df832bd8edb9
     1.1 --- a/src/share/vm/code/compiledIC.cpp	Fri Sep 20 11:17:04 2013 -0700
     1.2 +++ b/src/share/vm/code/compiledIC.cpp	Tue Sep 24 15:56:25 2013 +0200
     1.3 @@ -160,7 +160,7 @@
     1.4  // High-level access to an inline cache. Guaranteed to be MT-safe.
     1.5  
     1.6  
     1.7 -void CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
     1.8 +bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
     1.9    assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
    1.10    assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
    1.11    assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
    1.12 @@ -170,8 +170,10 @@
    1.13      assert(bytecode == Bytecodes::_invokeinterface, "");
    1.14      int itable_index = call_info->itable_index();
    1.15      entry = VtableStubs::find_itable_stub(itable_index);
    1.16 +    if (entry == false) {
    1.17 +      return false;
    1.18 +    }
    1.19  #ifdef ASSERT
    1.20 -    assert(entry != NULL, "entry not computed");
    1.21      int index = call_info->resolved_method()->itable_index();
    1.22      assert(index == itable_index, "CallInfo pre-computes this");
    1.23  #endif //ASSERT
    1.24 @@ -184,6 +186,9 @@
    1.25      int vtable_index = call_info->vtable_index();
    1.26      assert(call_info->resolved_klass()->verify_vtable_index(vtable_index), "sanity check");
    1.27      entry = VtableStubs::find_vtable_stub(vtable_index);
    1.28 +    if (entry == NULL) {
    1.29 +      return false;
    1.30 +    }
    1.31      InlineCacheBuffer::create_transition_stub(this, NULL, entry);
    1.32    }
    1.33  
    1.34 @@ -200,6 +205,7 @@
    1.35    // race because the IC entry was complete when we safepointed so
    1.36    // cleaning it immediately is harmless.
    1.37    // assert(is_megamorphic(), "sanity check");
    1.38 +  return true;
    1.39  }
    1.40  
    1.41  

mercurial