Mercurial > hg > truffle
comparison src/share/vm/oops/klassVtable.cpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | 2353011244bd |
children | 4ca6dc0799b6 c02077c4b79c 386dd1c71858 |
comparison
equal
deleted
inserted
replaced
14520:f84115370178 | 14521:29ccc4cbabca |
---|---|
620 // miranda method in the super, whose entry it should re-use. | 620 // miranda method in the super, whose entry it should re-use. |
621 // Actually, to handle cases that javac would not generate, we need | 621 // Actually, to handle cases that javac would not generate, we need |
622 // this check for all access permissions. | 622 // this check for all access permissions. |
623 InstanceKlass *sk = InstanceKlass::cast(super); | 623 InstanceKlass *sk = InstanceKlass::cast(super); |
624 if (sk->has_miranda_methods()) { | 624 if (sk->has_miranda_methods()) { |
625 if (sk->lookup_method_in_all_interfaces(name, signature) != NULL) { | 625 if (sk->lookup_method_in_all_interfaces(name, signature, false) != NULL) { |
626 return false; // found a matching miranda; we do not need a new entry | 626 return false; // found a matching miranda; we do not need a new entry |
627 } | 627 } |
628 } | 628 } |
629 return true; // found no match; we need a new entry | 629 return true; // found no match; we need a new entry |
630 } | 630 } |
741 | 741 |
742 if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable | 742 if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable |
743 if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? | 743 if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? |
744 InstanceKlass *sk = InstanceKlass::cast(super); | 744 InstanceKlass *sk = InstanceKlass::cast(super); |
745 // check if it is a duplicate of a super's miranda | 745 // check if it is a duplicate of a super's miranda |
746 if (sk->lookup_method_in_all_interfaces(im->name(), im->signature()) == NULL) { | 746 if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), false) == NULL) { |
747 new_mirandas->append(im); | 747 new_mirandas->append(im); |
748 } | 748 } |
749 if (all_mirandas != NULL) { | 749 if (all_mirandas != NULL) { |
750 all_mirandas->append(im); | 750 all_mirandas->append(im); |
751 } | 751 } |
1083 int ime_count = method_count_for_interface(interf_h()); | 1083 int ime_count = method_count_for_interface(interf_h()); |
1084 for (int i = 0; i < nof_methods; i++) { | 1084 for (int i = 0; i < nof_methods; i++) { |
1085 Method* m = methods->at(i); | 1085 Method* m = methods->at(i); |
1086 methodHandle target; | 1086 methodHandle target; |
1087 if (m->has_itable_index()) { | 1087 if (m->has_itable_index()) { |
1088 // This search must match the runtime resolution, i.e. selection search for invokeinterface | |
1089 // to correctly enforce loader constraints for interface method inheritance | |
1088 LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK); | 1090 LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK); |
1089 } | 1091 } |
1090 if (target == NULL || !target->is_public() || target->is_abstract()) { | 1092 if (target == NULL || !target->is_public() || target->is_abstract()) { |
1091 // Entry does not resolve. Leave it empty for AbstractMethodError. | 1093 // Entry does not resolve. Leave it empty for AbstractMethodError. |
1092 if (!(target == NULL) && !target->is_public()) { | 1094 if (!(target == NULL) && !target->is_public()) { |