835 if (is_virtual_or_interface) { |
835 if (is_virtual_or_interface) { |
836 ciInstanceKlass* klass = target->holder(); |
836 ciInstanceKlass* klass = target->holder(); |
837 Node* receiver_node = kit.argument(0); |
837 Node* receiver_node = kit.argument(0); |
838 const TypeOopPtr* receiver_type = gvn.type(receiver_node)->isa_oopptr(); |
838 const TypeOopPtr* receiver_type = gvn.type(receiver_node)->isa_oopptr(); |
839 // call_does_dispatch and vtable_index are out-parameters. They might be changed. |
839 // call_does_dispatch and vtable_index are out-parameters. They might be changed. |
840 target = C->optimize_virtual_call(caller, jvms->bci(), klass, target, receiver_type, |
840 // optimize_virtual_call() takes 2 different holder |
841 is_virtual, |
841 // arguments for a corner case that doesn't apply here (see |
|
842 // Parse::do_call()) |
|
843 target = C->optimize_virtual_call(caller, jvms->bci(), klass, klass, |
|
844 target, receiver_type, is_virtual, |
842 call_does_dispatch, vtable_index); // out-parameters |
845 call_does_dispatch, vtable_index); // out-parameters |
843 // We lack profiling at this call but type speculation may |
846 // We lack profiling at this call but type speculation may |
844 // provide us with a type |
847 // provide us with a type |
845 speculative_receiver_type = receiver_type->speculative_type(); |
848 speculative_receiver_type = receiver_type->speculative_type(); |
846 } |
849 } |