Mercurial > hg > graal-compiler
diff src/share/vm/oops/klassVtable.cpp @ 14221:2353011244bd
8027804: JCK resolveMethod test fails expecting AbstractMethodError
Summary: Create AME overpass methods and fix method search logic
Reviewed-by: kamg, acorn, lfoltan, coleenp
author | hseigel |
---|---|
date | Mon, 16 Dec 2013 08:24:33 -0500 |
parents | 379f11bc04fc |
children | 4ca6dc0799b6 c02077c4b79c 386dd1c71858 |
line wrap: on
line diff
--- a/src/share/vm/oops/klassVtable.cpp Fri Dec 13 09:25:44 2013 +0100 +++ b/src/share/vm/oops/klassVtable.cpp Mon Dec 16 08:24:33 2013 -0500 @@ -622,7 +622,7 @@ // this check for all access permissions. InstanceKlass *sk = InstanceKlass::cast(super); if (sk->has_miranda_methods()) { - if (sk->lookup_method_in_all_interfaces(name, signature) != NULL) { + if (sk->lookup_method_in_all_interfaces(name, signature, false) != NULL) { return false; // found a matching miranda; we do not need a new entry } } @@ -743,7 +743,7 @@ if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? 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()) == NULL) { + if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), false) == NULL) { new_mirandas->append(im); } if (all_mirandas != NULL) { @@ -1085,6 +1085,8 @@ Method* m = methods->at(i); methodHandle target; if (m->has_itable_index()) { + // This search must match the runtime resolution, i.e. selection search for invokeinterface + // to correctly enforce loader constraints for interface method inheritance LinkResolver::lookup_instance_method_in_klasses(target, _klass, m->name(), m->signature(), CHECK); } if (target == NULL || !target->is_public() || target->is_abstract()) {