8036580: CHA: improve default method support

Reviewed-by: thartmann, neliasso
This commit is contained in:
Vladimir Ivanov 2021-06-01 12:14:48 +00:00
parent 20479c3de9
commit 74b70a5677
6 changed files with 229 additions and 22 deletions

View file

@ -1988,8 +1988,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
// no point in inlining.
ciInstanceKlass* declared_interface = callee_holder;
ciInstanceKlass* singleton = declared_interface->unique_implementor();
if (singleton != NULL &&
(!target->is_default_method() || target->is_overpass()) /* CHA doesn't support default methods yet. */ ) {
if (singleton != NULL) {
assert(singleton != declared_interface, "not a unique implementor");
cha_monomorphic_target = target->find_monomorphic_target(calling_klass, declared_interface, singleton);
if (cha_monomorphic_target != NULL) {