1150 log()->identify(cha_monomorphic_target)); |
1150 log()->identify(cha_monomorphic_target)); |
1151 } |
1151 } |
1152 cha_monomorphic_target = NULL; |
1152 cha_monomorphic_target = NULL; |
1153 } |
1153 } |
1154 } |
1154 } |
|
1155 |
1155 if (cha_monomorphic_target != NULL) { |
1156 if (cha_monomorphic_target != NULL) { |
1156 // Hardwiring a virtual. |
1157 // Hardwiring a virtual. |
1157 // If we inlined because CHA revealed only a single target method, |
1158 assert(!callee->can_be_statically_bound(), "should have been handled earlier"); |
1158 // then we are dependent on that target method not getting overridden |
1159 assert(!cha_monomorphic_target->is_abstract(), ""); |
1159 // by dynamic class loading. Be sure to test the "static" receiver |
1160 if (!cha_monomorphic_target->can_be_statically_bound(actual_receiver)) { |
1160 // dest_method here, as opposed to the actual receiver, which may |
1161 // If we inlined because CHA revealed only a single target method, |
1161 // falsely lead us to believe that the receiver is final or private. |
1162 // then we are dependent on that target method not getting overridden |
1162 dependencies()->assert_unique_concrete_method(actual_receiver, cha_monomorphic_target); |
1163 // by dynamic class loading. Be sure to test the "static" receiver |
|
1164 // dest_method here, as opposed to the actual receiver, which may |
|
1165 // falsely lead us to believe that the receiver is final or private. |
|
1166 dependencies()->assert_unique_concrete_method(actual_receiver, cha_monomorphic_target); |
|
1167 } |
1163 return cha_monomorphic_target; |
1168 return cha_monomorphic_target; |
1164 } |
1169 } |
1165 |
1170 |
1166 // If the type is exact, we can still bind the method w/o a vcall. |
1171 // If the type is exact, we can still bind the method w/o a vcall. |
1167 // (This case comes after CHA so we can see how much extra work it does.) |
1172 // (This case comes after CHA so we can see how much extra work it does.) |