comparison src/share/vm/code/dependencies.cpp @ 17504:709018897c81

8031695: CHA ignores default methods during analysis leading to incorrect code generation Reviewed-by: jrose, acorn, hseigel, lfoltan
author vlivanov
date Thu, 23 Jan 2014 01:23:23 +0400
parents ac9cb1d5a202
children 89152779163c 51e1bb81df86
comparison
equal deleted inserted replaced
17503:c2106608358b 17504:709018897c81
1159 // Statics are irrelevant to virtual call sites. 1159 // Statics are irrelevant to virtual call sites.
1160 if (m->is_static()) return false; 1160 if (m->is_static()) return false;
1161 1161
1162 // We could also return false if m does not yet appear to be 1162 // We could also return false if m does not yet appear to be
1163 // executed, if the VM version supports this distinction also. 1163 // executed, if the VM version supports this distinction also.
1164 // Default methods are considered "concrete" as well.
1164 return !m->is_abstract() && 1165 return !m->is_abstract() &&
1165 !InstanceKlass::cast(m->method_holder())->is_interface(); 1166 !m->is_overpass(); // error functions aren't concrete
1166 // TODO: investigate whether default methods should be
1167 // considered as "concrete" in this situation. For now they
1168 // are not.
1169 } 1167 }
1170 1168
1171 1169
1172 Klass* Dependencies::find_finalizable_subclass(Klass* k) { 1170 Klass* Dependencies::find_finalizable_subclass(Klass* k) {
1173 if (k->is_interface()) return NULL; 1171 if (k->is_interface()) return NULL;