215 // retrieve information about the callee |
215 // retrieve information about the callee |
216 ciInstanceKlass* klass = target->holder(); |
216 ciInstanceKlass* klass = target->holder(); |
217 ciInstanceKlass* calling_klass = method()->holder(); |
217 ciInstanceKlass* calling_klass = method()->holder(); |
218 ciInstanceKlass* callee_holder = ciEnv::get_instance_klass_for_declared_method_holder(holder); |
218 ciInstanceKlass* callee_holder = ciEnv::get_instance_klass_for_declared_method_holder(holder); |
219 ciInstanceKlass* actual_recv = callee_holder; |
219 ciInstanceKlass* actual_recv = callee_holder; |
|
220 |
|
221 // some methods are obviously bindable without any type checks so |
|
222 // convert them directly to an invokespecial. |
|
223 if (target->is_loaded() && !target->is_abstract() && |
|
224 target->can_be_statically_bound() && code == Bytecodes::_invokevirtual) { |
|
225 code = Bytecodes::_invokespecial; |
|
226 } |
220 |
227 |
221 // compute size of arguments |
228 // compute size of arguments |
222 int arg_size = target->arg_size(); |
229 int arg_size = target->arg_size(); |
223 if (!target->is_loaded() && code == Bytecodes::_invokestatic) { |
230 if (!target->is_loaded() && code == Bytecodes::_invokestatic) { |
224 arg_size--; |
231 arg_size--; |