< prev index next >

src/hotspot/share/oops/klassVtable.cpp

Print this page

        

*** 690,700 **** // miranda method in the super, whose entry it should re-use. // Actually, to handle cases that javac would not generate, we need // this check for all access permissions. const InstanceKlass *sk = InstanceKlass::cast(super); if (sk->has_miranda_methods()) { ! if (sk->lookup_method_in_all_interfaces(name, signature, Klass::find_defaults) != NULL) { return false; // found a matching miranda; we do not need a new entry } } return true; // found no match; we need a new entry } --- 690,700 ---- // miranda method in the super, whose entry it should re-use. // Actually, to handle cases that javac would not generate, we need // this check for all access permissions. const InstanceKlass *sk = InstanceKlass::cast(super); if (sk->has_miranda_methods()) { ! if (sk->lookup_method_in_all_interfaces(name, signature, Klass::DefaultsLookupMode::find_defaults) != NULL) { return false; // found a matching miranda; we do not need a new entry } } return true; // found no match; we need a new entry }
*** 795,805 **** Symbol* name = m->name(); Symbol* signature = m->signature(); // First look in local methods to see if already covered if (InstanceKlass::find_local_method(class_methods, name, signature, ! Klass::find_overpass, Klass::skip_static, Klass::skip_private) != NULL) { return false; } // Check local default methods --- 795,807 ---- Symbol* name = m->name(); Symbol* signature = m->signature(); // First look in local methods to see if already covered if (InstanceKlass::find_local_method(class_methods, name, signature, ! Klass::OverpassLookupMode::find_overpass, ! Klass::StaticLookupMode::skip_static, ! Klass::PrivateLookupMode::skip_private) != NULL) { return false; } // Check local default methods
*** 815,825 **** // they should have been created for pass 2 and later. for (const Klass* cursuper = super; cursuper != NULL; cursuper = cursuper->super()) { Method* found_mth = InstanceKlass::cast(cursuper)->find_local_method(name, signature, ! Klass::find_overpass, Klass::skip_static, Klass::skip_private); // Ignore non-public methods in java.lang.Object if klass is an interface. if (found_mth != NULL && (!is_interface || !SystemDictionary::is_nonpublic_Object_method(found_mth))) { return false; } --- 817,829 ---- // they should have been created for pass 2 and later. for (const Klass* cursuper = super; cursuper != NULL; cursuper = cursuper->super()) { Method* found_mth = InstanceKlass::cast(cursuper)->find_local_method(name, signature, ! Klass::OverpassLookupMode::find_overpass, ! Klass::StaticLookupMode::skip_static, ! Klass::PrivateLookupMode::skip_private); // Ignore non-public methods in java.lang.Object if klass is an interface. if (found_mth != NULL && (!is_interface || !SystemDictionary::is_nonpublic_Object_method(found_mth))) { return false; }
*** 859,869 **** if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable if (is_miranda(im, class_methods, default_methods, super, is_interface)) { // is it a miranda at all? const InstanceKlass *sk = InstanceKlass::cast(super); // check if it is a duplicate of a super's miranda ! if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), Klass::find_defaults) == NULL) { new_mirandas->append(im); } if (all_mirandas != NULL) { all_mirandas->append(im); } --- 863,873 ---- if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable if (is_miranda(im, class_methods, default_methods, super, is_interface)) { // is it a miranda at all? const InstanceKlass *sk = InstanceKlass::cast(super); // check if it is a duplicate of a super's miranda ! if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), Klass::DefaultsLookupMode::find_defaults) == NULL) { new_mirandas->append(im); } if (all_mirandas != NULL) { all_mirandas->append(im); }
*** 1211,1221 **** // Private methods are skipped as a private class method can never be the implementation // of an interface method. // Invokespecial does not perform selection based on the receiver, so it does not use // the cached itable. target = LinkResolver::lookup_instance_method_in_klasses(_klass, m->name(), m->signature(), ! Klass::skip_private, CHECK); } if (target == NULL || !target->is_public() || target->is_abstract() || target->is_overpass()) { assert(target == NULL || !target->is_overpass() || target->is_public(), "Non-public overpass method!"); // Entry does not resolve. Leave it empty for AbstractMethodError or other error. --- 1215,1225 ---- // Private methods are skipped as a private class method can never be the implementation // of an interface method. // Invokespecial does not perform selection based on the receiver, so it does not use // the cached itable. target = LinkResolver::lookup_instance_method_in_klasses(_klass, m->name(), m->signature(), ! Klass::PrivateLookupMode::skip_private, CHECK); } if (target == NULL || !target->is_public() || target->is_abstract() || target->is_overpass()) { assert(target == NULL || !target->is_overpass() || target->is_public(), "Non-public overpass method!"); // Entry does not resolve. Leave it empty for AbstractMethodError or other error.
< prev index next >