1.1 --- a/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jan 11 16:47:23 2013 -0800 1.2 +++ b/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jan 11 16:47:23 2013 -0800 1.3 @@ -1030,7 +1030,6 @@ 1.4 dest_method->holder() == java_lang_Object_klass()) 1.5 return dest_method; 1.6 1.7 -#ifdef SHARK_CAN_DEOPTIMIZE_ANYWHERE 1.8 // This code can replace a virtual call with a direct call if this 1.9 // class is the only one in the entire set of loaded classes that 1.10 // implements this method. This makes the compiled code dependent 1.11 @@ -1064,6 +1063,8 @@ 1.12 if (monomorphic_target != NULL) { 1.13 assert(!monomorphic_target->is_abstract(), "shouldn't be"); 1.14 1.15 + function()->dependencies()->assert_unique_concrete_method(actual_receiver, monomorphic_target); 1.16 + 1.17 // Opto has a bunch of type checking here that I don't 1.18 // understand. It's to inhibit casting in one direction, 1.19 // possibly because objects in Opto can have inexact 1.20 @@ -1097,7 +1098,6 @@ 1.21 // with non-monomorphic targets if the receiver has an exact 1.22 // type. We don't mark types this way, so we can't do this. 1.23 1.24 -#endif // SHARK_CAN_DEOPTIMIZE_ANYWHERE 1.25 1.26 return NULL; 1.27 } 1.28 @@ -1298,8 +1298,9 @@ 1.29 1.30 // Try to inline the call 1.31 if (!call_is_virtual) { 1.32 - if (SharkInliner::attempt_inline(call_method, current_state())) 1.33 + if (SharkInliner::attempt_inline(call_method, current_state())) { 1.34 return; 1.35 + } 1.36 } 1.37 1.38 // Find the method we are calling