< prev index next >
src/hotspot/share/code/dependencies.cpp
Print this page
rev 50285 : imported patch jep181-rev1
*** 31,40 ****
--- 31,41 ----
#include "code/dependencies.hpp"
#include "compiler/compileLog.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/compileTask.hpp"
#include "memory/resourceArea.hpp"
+ #include "oops/klass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/objArrayKlass.hpp"
#include "runtime/flags/flagSetting.hpp"
#include "runtime/handles.hpp"
#include "runtime/handles.inline.hpp"
*** 1226,1237 ****
if (doing_subtype_search()) {
return Dependencies::is_concrete_klass(k);
} else if (!k->is_instance_klass()) {
return false; // no methods to find in an array type
} else {
! // Search class hierarchy first.
! Method* m = InstanceKlass::cast(k)->find_instance_method(_name, _signature);
if (!Dependencies::is_concrete_method(m, k)) {
// Check for re-abstraction of method
if (!k->is_interface() && m != NULL && m->is_abstract()) {
// Found a matching abstract method 'm' in the class hierarchy.
// This is fine iff 'k' is an abstract class and all concrete subtypes
--- 1227,1239 ----
if (doing_subtype_search()) {
return Dependencies::is_concrete_klass(k);
} else if (!k->is_instance_klass()) {
return false; // no methods to find in an array type
} else {
! // Search class hierarchy first, skipping private implementations
! // as they never override any inherited methods
! Method* m = InstanceKlass::cast(k)->find_instance_method(_name, _signature, Klass::skip_private);
if (!Dependencies::is_concrete_method(m, k)) {
// Check for re-abstraction of method
if (!k->is_interface() && m != NULL && m->is_abstract()) {
// Found a matching abstract method 'm' in the class hierarchy.
// This is fine iff 'k' is an abstract class and all concrete subtypes
< prev index next >