53 // This is only called for interface methods. If the resolved_method |
53 // This is only called for interface methods. If the resolved_method |
54 // comes from java/lang/Object, it can be the subject of a virtual call, so |
54 // comes from java/lang/Object, it can be the subject of a virtual call, so |
55 // we should pick the vtable index from the resolved method. |
55 // we should pick the vtable index from the resolved method. |
56 // Other than that case, there is no valid vtable index to specify. |
56 // Other than that case, there is no valid vtable index to specify. |
57 int vtable_index = methodOopDesc::invalid_vtable_index; |
57 int vtable_index = methodOopDesc::invalid_vtable_index; |
58 if (resolved_method->method_holder() == SystemDictionary::object_klass()) { |
58 if (resolved_method->method_holder() == SystemDictionary::Object_klass()) { |
59 assert(resolved_method->vtable_index() == selected_method->vtable_index(), "sanity check"); |
59 assert(resolved_method->vtable_index() == selected_method->vtable_index(), "sanity check"); |
60 vtable_index = resolved_method->vtable_index(); |
60 vtable_index = resolved_method->vtable_index(); |
61 } |
61 } |
62 set_common(resolved_klass, selected_klass, resolved_method, selected_method, vtable_index, CHECK); |
62 set_common(resolved_klass, selected_klass, resolved_method, selected_method, vtable_index, CHECK); |
63 } |
63 } |
191 // to public. |
191 // to public. |
192 // |
192 // |
193 // We'll check for the method name first, as that's most likely |
193 // We'll check for the method name first, as that's most likely |
194 // to be false (so we'll short-circuit out of these tests). |
194 // to be false (so we'll short-circuit out of these tests). |
195 if (sel_method->name() == vmSymbols::clone_name() && |
195 if (sel_method->name() == vmSymbols::clone_name() && |
196 sel_klass() == SystemDictionary::object_klass() && |
196 sel_klass() == SystemDictionary::Object_klass() && |
197 resolved_klass->oop_is_array()) { |
197 resolved_klass->oop_is_array()) { |
198 // We need to change "protected" to "public". |
198 // We need to change "protected" to "public". |
199 assert(flags.is_protected(), "clone not protected?"); |
199 assert(flags.is_protected(), "clone not protected?"); |
200 jint new_flags = flags.as_int(); |
200 jint new_flags = flags.as_int(); |
201 new_flags = new_flags & (~JVM_ACC_PROTECTED); |
201 new_flags = new_flags & (~JVM_ACC_PROTECTED); |