src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
changeset 53352 ac431929db51
parent 52907 7cc17c043ce0
child 53582 881c5fbeb849
equal deleted inserted replaced
53351:bdb29aa5fd31 53352:ac431929db51
   598   Symbol* h_signature = method->signature();
   598   Symbol* h_signature = method->signature();
   599 
   599 
   600   if (MethodHandles::is_signature_polymorphic_method(method())) {
   600   if (MethodHandles::is_signature_polymorphic_method(method())) {
   601       // Signature polymorphic methods are already resolved, JVMCI just returns NULL in this case.
   601       // Signature polymorphic methods are already resolved, JVMCI just returns NULL in this case.
   602       return NULL;
   602       return NULL;
       
   603   }
       
   604 
       
   605   if (method->name() == vmSymbols::clone_name() &&
       
   606       resolved == SystemDictionary::Object_klass() &&
       
   607       recv_klass->is_array_klass()) {
       
   608     // Resolution of the clone method on arrays always returns Object.clone even though that method
       
   609     // has protected access.  There's some trickery in the access checking to make this all work out
       
   610     // so it's necessary to pass in the array class as the resolved class to properly trigger this.
       
   611     // Otherwise it's impossible to resolve the array clone methods through JVMCI.  See
       
   612     // LinkResolver::check_method_accessability for the matching logic.
       
   613     resolved = recv_klass;
   603   }
   614   }
   604 
   615 
   605   LinkInfo link_info(resolved, h_name, h_signature, caller_klass);
   616   LinkInfo link_info(resolved, h_name, h_signature, caller_klass);
   606   methodHandle m;
   617   methodHandle m;
   607   // Only do exact lookup if receiver klass has been linked.  Otherwise,
   618   // Only do exact lookup if receiver klass has been linked.  Otherwise,