Mercurial > hg > truffle
diff src/share/vm/shark/sharkTopLevelBlock.cpp @ 7599:c566b81b3323
8005817: Shark: implement deoptimization support
Reviewed-by: twisti
Contributed-by: Roman Kennke <rkennke@redhat.com>
author | twisti |
---|---|
date | Fri, 11 Jan 2013 16:47:23 -0800 |
parents | 2cd5e15048e6 |
children | 606eada1bf86 |
line wrap: on
line diff
--- a/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jan 11 16:47:23 2013 -0800 +++ b/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jan 11 16:47:23 2013 -0800 @@ -1030,7 +1030,6 @@ dest_method->holder() == java_lang_Object_klass()) return dest_method; -#ifdef SHARK_CAN_DEOPTIMIZE_ANYWHERE // This code can replace a virtual call with a direct call if this // class is the only one in the entire set of loaded classes that // implements this method. This makes the compiled code dependent @@ -1064,6 +1063,8 @@ if (monomorphic_target != NULL) { assert(!monomorphic_target->is_abstract(), "shouldn't be"); + function()->dependencies()->assert_unique_concrete_method(actual_receiver, monomorphic_target); + // Opto has a bunch of type checking here that I don't // understand. It's to inhibit casting in one direction, // possibly because objects in Opto can have inexact @@ -1097,7 +1098,6 @@ // with non-monomorphic targets if the receiver has an exact // type. We don't mark types this way, so we can't do this. -#endif // SHARK_CAN_DEOPTIMIZE_ANYWHERE return NULL; } @@ -1298,8 +1298,9 @@ // Try to inline the call if (!call_is_virtual) { - if (SharkInliner::attempt_inline(call_method, current_state())) + if (SharkInliner::attempt_inline(call_method, current_state())) { return; + } } // Find the method we are calling