Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 5998:49036505ab5f
7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
Summary: Change implementor to embedded instanceKlass field.
Reviewed-by: sspitsyn, minqi, coleenp
author | jiangli |
---|---|
date | Thu, 29 Mar 2012 22:18:56 -0400 |
parents | e5f73be4c7f1 |
children | 0105f367a14c |
comparison
equal
deleted
inserted
replaced
5970:0698f5ef5535 | 5998:49036505ab5f |
---|---|
1692 // interface we have to insert a check that it's the class we | 1692 // interface we have to insert a check that it's the class we |
1693 // expect. Interface types are not checked by the verifier so | 1693 // expect. Interface types are not checked by the verifier so |
1694 // they are roughly equivalent to Object. | 1694 // they are roughly equivalent to Object. |
1695 ciInstanceKlass* singleton = NULL; | 1695 ciInstanceKlass* singleton = NULL; |
1696 if (target->holder()->nof_implementors() == 1) { | 1696 if (target->holder()->nof_implementors() == 1) { |
1697 singleton = target->holder()->implementor(0); | 1697 singleton = target->holder()->implementor(); |
1698 assert(singleton != NULL && singleton != target->holder(), | |
1699 "just checking"); | |
1698 | 1700 |
1699 assert(holder->is_interface(), "invokeinterface to non interface?"); | 1701 assert(holder->is_interface(), "invokeinterface to non interface?"); |
1700 ciInstanceKlass* decl_interface = (ciInstanceKlass*)holder; | 1702 ciInstanceKlass* decl_interface = (ciInstanceKlass*)holder; |
1701 // the number of implementors for decl_interface is less or | 1703 // the number of implementors for decl_interface is less or |
1702 // equal to the number of implementors for target->holder() so | 1704 // equal to the number of implementors for target->holder() so |