Mercurial > hg > truffle
changeset 13165:0097301f34fa
integrated patch from Roland that prevents abstract types showing up in C1 generated type profiles
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 26 Nov 2013 00:08:15 +0100 |
parents | 70e6bb85d802 |
children | 107fee7fa3bb |
files | src/share/vm/c1/c1_GraphBuilder.cpp |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_GraphBuilder.cpp Mon Nov 25 23:49:49 2013 +0100 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Tue Nov 26 00:08:15 2013 +0100 @@ -4340,11 +4340,15 @@ #endif // PRODUCT void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) { - // A default method's holder is an interface - if (known_holder != NULL && known_holder->is_interface()) { - assert(known_holder->is_instance_klass() && ((ciInstanceKlass*)known_holder)->has_default_methods(), "should be default method"); - known_holder = NULL; + assert(known_holder == NULL || (known_holder->is_instance_klass() && + (!known_holder->is_interface() || + ((ciInstanceKlass*)known_holder)->has_default_methods())), "should be default method"); + if (known_holder != NULL) { + if (known_holder->exact_klass() == NULL) { + known_holder = compilation()->cha_exact_type(known_holder); + } } + append(new ProfileCall(method(), bci(), callee, recv, known_holder, obj_args, inlined)); }