Mercurial > hg > truffle
comparison src/share/vm/code/dependencies.cpp @ 14272:757ec609d8d5
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 | 3aaa4b9966f6 |
children | cb0dc98c287d |
comparison
equal
deleted
inserted
replaced
14271:7e8bd81ce93e | 14272:757ec609d8d5 |
---|---|
1221 // Statics are irrelevant to virtual call sites. | 1221 // Statics are irrelevant to virtual call sites. |
1222 if (m->is_static()) return false; | 1222 if (m->is_static()) return false; |
1223 | 1223 |
1224 // We could also return false if m does not yet appear to be | 1224 // We could also return false if m does not yet appear to be |
1225 // executed, if the VM version supports this distinction also. | 1225 // executed, if the VM version supports this distinction also. |
1226 // Default methods are considered "concrete" as well. | |
1226 return !m->is_abstract() && | 1227 return !m->is_abstract() && |
1227 !InstanceKlass::cast(m->method_holder())->is_interface(); | 1228 !m->is_overpass(); // error functions aren't concrete |
1228 // TODO: investigate whether default methods should be | |
1229 // considered as "concrete" in this situation. For now they | |
1230 // are not. | |
1231 } | 1229 } |
1232 | 1230 |
1233 | 1231 |
1234 Klass* Dependencies::find_finalizable_subclass(Klass* k) { | 1232 Klass* Dependencies::find_finalizable_subclass(Klass* k) { |
1235 if (k->is_interface()) return NULL; | 1233 if (k->is_interface()) return NULL; |