comparison src/share/vm/classfile/defaultMethods.cpp @ 13451:02f27ecb4f3a

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 18 Dec 2013 00:00:24 +0100
parents 096c224171c4 379f11bc04fc
children d8041d695d19
comparison
equal deleted inserted replaced
13371:4db09b7304da 13451:02f27ecb4f3a
623 // (can't use the vtable because it is not guaranteed to be initialized yet) 623 // (can't use the vtable because it is not guaranteed to be initialized yet)
624 InstanceKlass* super = klass->java_super(); 624 InstanceKlass* super = klass->java_super();
625 while (super != NULL) { 625 while (super != NULL) {
626 for (int i = 0; i < super->methods()->length(); ++i) { 626 for (int i = 0; i < super->methods()->length(); ++i) {
627 Method* m = super->methods()->at(i); 627 Method* m = super->methods()->at(i);
628 if (m->is_overpass()) { 628 if (m->is_overpass() || m->is_static()) {
629 // m is a method that would have been a miranda if not for the 629 // m is a method that would have been a miranda if not for the
630 // default method processing that occurred on behalf of our superclass, 630 // default method processing that occurred on behalf of our superclass,
631 // so it's a method we want to re-examine in this new context. That is, 631 // so it's a method we want to re-examine in this new context. That is,
632 // unless we have a real implementation of it in the current class. 632 // unless we have a real implementation of it in the current class.
633 Method* impl = klass->lookup_method(m->name(), m->signature()); 633 Method* impl = klass->lookup_method(m->name(), m->signature());
634 if (impl == NULL || impl->is_overpass()) { 634 if (impl == NULL || impl->is_overpass() || impl->is_static()) {
635 if (!already_in_vtable_slots(slots, m)) { 635 if (!already_in_vtable_slots(slots, m)) {
636 slots->append(new EmptyVtableSlot(m)); 636 slots->append(new EmptyVtableSlot(m));
637 } 637 }
638 } 638 }
639 } 639 }
646 // m is a method that would have been a miranda if not for the 646 // m is a method that would have been a miranda if not for the
647 // default method processing that occurred on behalf of our superclass, 647 // default method processing that occurred on behalf of our superclass,
648 // so it's a method we want to re-examine in this new context. That is, 648 // so it's a method we want to re-examine in this new context. That is,
649 // unless we have a real implementation of it in the current class. 649 // unless we have a real implementation of it in the current class.
650 Method* impl = klass->lookup_method(m->name(), m->signature()); 650 Method* impl = klass->lookup_method(m->name(), m->signature());
651 if (impl == NULL || impl->is_overpass()) { 651 if (impl == NULL || impl->is_overpass() || impl->is_static()) {
652 if (!already_in_vtable_slots(slots, m)) { 652 if (!already_in_vtable_slots(slots, m)) {
653 slots->append(new EmptyVtableSlot(m)); 653 slots->append(new EmptyVtableSlot(m));
654 } 654 }
655 } 655 }
656 } 656 }