Mercurial > hg > graal-compiler
comparison src/share/vm/oops/klassVtable.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 3eed8712d410 f73af4455d7d |
children | 12dcf5ba8b34 |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
36 #include "oops/oop.inline.hpp" | 36 #include "oops/oop.inline.hpp" |
37 #include "prims/jvmtiRedefineClassesTrace.hpp" | 37 #include "prims/jvmtiRedefineClassesTrace.hpp" |
38 #include "runtime/arguments.hpp" | 38 #include "runtime/arguments.hpp" |
39 #include "runtime/handles.inline.hpp" | 39 #include "runtime/handles.inline.hpp" |
40 #include "utilities/copy.hpp" | 40 #include "utilities/copy.hpp" |
41 | |
42 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
41 | 43 |
42 inline InstanceKlass* klassVtable::ik() const { | 44 inline InstanceKlass* klassVtable::ik() const { |
43 Klass* k = _klass(); | 45 Klass* k = _klass(); |
44 assert(k->oop_is_instance(), "not an InstanceKlass"); | 46 assert(k->oop_is_instance(), "not an InstanceKlass"); |
45 return (InstanceKlass*)k; | 47 return (InstanceKlass*)k; |
641 // miranda method in the super, whose entry it should re-use. | 643 // miranda method in the super, whose entry it should re-use. |
642 // Actually, to handle cases that javac would not generate, we need | 644 // Actually, to handle cases that javac would not generate, we need |
643 // this check for all access permissions. | 645 // this check for all access permissions. |
644 InstanceKlass *sk = InstanceKlass::cast(super); | 646 InstanceKlass *sk = InstanceKlass::cast(super); |
645 if (sk->has_miranda_methods()) { | 647 if (sk->has_miranda_methods()) { |
646 if (sk->lookup_method_in_all_interfaces(name, signature, false) != NULL) { | 648 if (sk->lookup_method_in_all_interfaces(name, signature, Klass::normal) != NULL) { |
647 return false; // found a matching miranda; we do not need a new entry | 649 return false; // found a matching miranda; we do not need a new entry |
648 } | 650 } |
649 } | 651 } |
650 return true; // found no match; we need a new entry | 652 return true; // found no match; we need a new entry |
651 } | 653 } |
717 Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature); | 719 Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature); |
718 while (mo != NULL && mo->access_flags().is_static() | 720 while (mo != NULL && mo->access_flags().is_static() |
719 && mo->method_holder() != NULL | 721 && mo->method_holder() != NULL |
720 && mo->method_holder()->super() != NULL) | 722 && mo->method_holder()->super() != NULL) |
721 { | 723 { |
722 mo = mo->method_holder()->super()->uncached_lookup_method(name, signature); | 724 mo = mo->method_holder()->super()->uncached_lookup_method(name, signature, Klass::normal); |
723 } | 725 } |
724 if (mo == NULL || mo->access_flags().is_private() ) { | 726 if (mo == NULL || mo->access_flags().is_private() ) { |
725 // super class hierarchy does not implement it or protection is different | 727 // super class hierarchy does not implement it or protection is different |
726 return true; | 728 return true; |
727 } | 729 } |
762 | 764 |
763 if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable | 765 if (!is_duplicate) { // we don't want duplicate miranda entries in the vtable |
764 if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? | 766 if (is_miranda(im, class_methods, default_methods, super)) { // is it a miranda at all? |
765 InstanceKlass *sk = InstanceKlass::cast(super); | 767 InstanceKlass *sk = InstanceKlass::cast(super); |
766 // check if it is a duplicate of a super's miranda | 768 // check if it is a duplicate of a super's miranda |
767 if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), false) == NULL) { | 769 if (sk->lookup_method_in_all_interfaces(im->name(), im->signature(), Klass::normal) == NULL) { |
768 new_mirandas->append(im); | 770 new_mirandas->append(im); |
769 } | 771 } |
770 if (all_mirandas != NULL) { | 772 if (all_mirandas != NULL) { |
771 all_mirandas->append(im); | 773 all_mirandas->append(im); |
772 } | 774 } |