hotspot/src/share/vm/jvmci/jvmciCompilerToVM.cpp
changeset 41051 77740a69b211
parent 40878 5d87104b10d5
child 41283 2615c024f3eb
child 41325 050786119cb7
equal deleted inserted replaced
41050:1a952c00b8e4 41051:77740a69b211
   766 
   766 
   767   KlassHandle h_resolved   (THREAD, method->method_holder());
   767   KlassHandle h_resolved   (THREAD, method->method_holder());
   768   Symbol* h_name      = method->name();
   768   Symbol* h_name      = method->name();
   769   Symbol* h_signature = method->signature();
   769   Symbol* h_signature = method->signature();
   770 
   770 
       
   771   if (MethodHandles::is_signature_polymorphic_method(method())) {
       
   772       // Signature polymorphic methods are already resolved, JVMCI just returns NULL in this case.
       
   773       return NULL;
       
   774   }
       
   775 
   771   LinkInfo link_info(h_resolved, h_name, h_signature, caller_klass);
   776   LinkInfo link_info(h_resolved, h_name, h_signature, caller_klass);
   772   methodHandle m;
   777   methodHandle m;
   773   // Only do exact lookup if receiver klass has been linked.  Otherwise,
   778   // Only do exact lookup if receiver klass has been linked.  Otherwise,
   774   // the vtable has not been setup, and the LinkResolver will fail.
   779   // the vtable has not been setup, and the LinkResolver will fail.
   775   if (recv_klass->is_array_klass() ||
   780   if (recv_klass->is_array_klass() ||
   780       m = LinkResolver::resolve_virtual_call_or_null(recv_klass, link_info);
   785       m = LinkResolver::resolve_virtual_call_or_null(recv_klass, link_info);
   781     }
   786     }
   782   }
   787   }
   783 
   788 
   784   if (m.is_null()) {
   789   if (m.is_null()) {
   785     // Return NULL only if there was a problem with lookup (uninitialized class, etc.)
   790     // Return NULL if there was a problem with lookup (uninitialized class, etc.)
   786     return NULL;
   791     return NULL;
   787   }
   792   }
   788 
   793 
   789   oop result = CompilerToVM::get_jvmci_method(m, CHECK_NULL);
   794   oop result = CompilerToVM::get_jvmci_method(m, CHECK_NULL);
   790   return JNIHandles::make_local(THREAD, result);
   795   return JNIHandles::make_local(THREAD, result);