src/share/vm/runtime/sharedRuntime.cpp

changeset 5785
a5ac0873476c
parent 5784
190899198332
parent 5762
891687731b59
child 6113
570aaefce624
child 6472
2b8e28fdf503
     1.1 --- a/src/share/vm/runtime/sharedRuntime.cpp	Thu Sep 26 10:25:02 2013 -0400
     1.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp	Fri Sep 27 10:08:56 2013 -0400
     1.3 @@ -1506,8 +1506,11 @@
     1.4                                                  info, CHECK_(methodHandle()));
     1.5          inline_cache->set_to_monomorphic(info);
     1.6        } else if (!inline_cache->is_megamorphic() && !inline_cache->is_clean()) {
     1.7 -        // Change to megamorphic
     1.8 -        inline_cache->set_to_megamorphic(&call_info, bc, CHECK_(methodHandle()));
     1.9 +        // Potential change to megamorphic
    1.10 +        bool successful = inline_cache->set_to_megamorphic(&call_info, bc, CHECK_(methodHandle()));
    1.11 +        if (!successful) {
    1.12 +          inline_cache->set_to_clean();
    1.13 +        }
    1.14        } else {
    1.15          // Either clean or megamorphic
    1.16        }

mercurial