120 if (_can_be_statically_bound && h_m()->is_abstract()) |
120 if (_can_be_statically_bound && h_m()->is_abstract()) |
121 _can_be_statically_bound = false; |
121 _can_be_statically_bound = false; |
122 |
122 |
123 // generating _signature may allow GC and therefore move m. |
123 // generating _signature may allow GC and therefore move m. |
124 // These fields are always filled in. |
124 // These fields are always filled in. |
125 _name = env->get_object(h_m()->name())->as_symbol(); |
125 _name = env->get_symbol(h_m()->name()); |
126 _holder = env->get_object(h_m()->method_holder())->as_instance_klass(); |
126 _holder = env->get_object(h_m()->method_holder())->as_instance_klass(); |
127 ciSymbol* sig_symbol = env->get_object(h_m()->signature())->as_symbol(); |
127 ciSymbol* sig_symbol = env->get_symbol(h_m()->signature()); |
128 _signature = new (env->arena()) ciSignature(_holder, sig_symbol); |
128 _signature = new (env->arena()) ciSignature(_holder, sig_symbol); |
129 _method_data = NULL; |
129 _method_data = NULL; |
130 // Take a snapshot of these values, so they will be commensurate with the MDO. |
130 // Take a snapshot of these values, so they will be commensurate with the MDO. |
131 if (ProfileInterpreter || TieredCompilation) { |
131 if (ProfileInterpreter || TieredCompilation) { |
132 int invcnt = h_m()->interpreter_invocation_count(); |
132 int invcnt = h_m()->interpreter_invocation_count(); |
647 VM_ENTRY_MARK; |
647 VM_ENTRY_MARK; |
648 |
648 |
649 KlassHandle caller_klass (THREAD, caller->get_klassOop()); |
649 KlassHandle caller_klass (THREAD, caller->get_klassOop()); |
650 KlassHandle h_recv (THREAD, exact_receiver->get_klassOop()); |
650 KlassHandle h_recv (THREAD, exact_receiver->get_klassOop()); |
651 KlassHandle h_resolved (THREAD, holder()->get_klassOop()); |
651 KlassHandle h_resolved (THREAD, holder()->get_klassOop()); |
652 symbolHandle h_name (THREAD, name()->get_symbolOop()); |
652 Symbol* h_name = name()->get_symbol(); |
653 symbolHandle h_signature (THREAD, signature()->get_symbolOop()); |
653 Symbol* h_signature = signature()->get_symbol(); |
654 |
654 |
655 methodHandle m; |
655 methodHandle m; |
656 // Only do exact lookup if receiver klass has been linked. Otherwise, |
656 // Only do exact lookup if receiver klass has been linked. Otherwise, |
657 // the vtable has not been setup, and the LinkResolver will fail. |
657 // the vtable has not been setup, and the LinkResolver will fail. |
658 if (h_recv->oop_is_javaArray() |
658 if (h_recv->oop_is_javaArray() |
700 receiver->as_instance_klass()->is_linked())) { |
700 receiver->as_instance_klass()->is_linked())) { |
701 VM_ENTRY_MARK; |
701 VM_ENTRY_MARK; |
702 |
702 |
703 KlassHandle caller_klass (THREAD, caller->get_klassOop()); |
703 KlassHandle caller_klass (THREAD, caller->get_klassOop()); |
704 KlassHandle h_recv (THREAD, receiver->get_klassOop()); |
704 KlassHandle h_recv (THREAD, receiver->get_klassOop()); |
705 symbolHandle h_name (THREAD, name()->get_symbolOop()); |
705 Symbol* h_name = name()->get_symbol(); |
706 symbolHandle h_signature (THREAD, signature()->get_symbolOop()); |
706 Symbol* h_signature = signature()->get_symbol(); |
707 |
707 |
708 vtable_index = LinkResolver::resolve_virtual_vtable_index(h_recv, h_recv, h_name, h_signature, caller_klass); |
708 vtable_index = LinkResolver::resolve_virtual_vtable_index(h_recv, h_recv, h_name, h_signature, caller_klass); |
709 if (vtable_index == methodOopDesc::nonvirtual_vtable_index) { |
709 if (vtable_index == methodOopDesc::nonvirtual_vtable_index) { |
710 // A statically bound method. Return "no such index". |
710 // A statically bound method. Return "no such index". |
711 vtable_index = methodOopDesc::invalid_vtable_index; |
711 vtable_index = methodOopDesc::invalid_vtable_index; |