comparison src/share/vm/code/dependencies.cpp @ 6934:4735d2c84362

7200776: Implement default methods in interfaces Summary: Add generic type analysis and default method selection algorithms Reviewed-by: coleenp, acorn
author kamg
date Thu, 11 Oct 2012 12:25:42 -0400
parents 9a9b6e05ffb4
children 18fb7da42534
comparison
equal deleted inserted replaced
6921:a1b8cf9cf970 6934:4735d2c84362
1158 // Statics are irrelevant to virtual call sites. 1158 // Statics are irrelevant to virtual call sites.
1159 if (m->is_static()) return false; 1159 if (m->is_static()) return false;
1160 1160
1161 // We could also return false if m does not yet appear to be 1161 // We could also return false if m does not yet appear to be
1162 // executed, if the VM version supports this distinction also. 1162 // executed, if the VM version supports this distinction also.
1163 return !m->is_abstract(); 1163 return !m->is_abstract() &&
1164 !InstanceKlass::cast(m->method_holder())->is_interface();
1165 // TODO: investigate whether default methods should be
1166 // considered as "concrete" in this situation. For now they
1167 // are not.
1164 } 1168 }
1165 1169
1166 1170
1167 Klass* Dependencies::find_finalizable_subclass(Klass* k) { 1171 Klass* Dependencies::find_finalizable_subclass(Klass* k) {
1168 if (k->is_interface()) return NULL; 1172 if (k->is_interface()) return NULL;