hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
changeset 41669 2091069b6851
parent 40883 765d366c28e1
child 41703 fb19bea93d16
equal deleted inserted replaced
41668:e9c6bbf513e5 41669:2091069b6851
  1927         // equal to the number of implementors for target->holder() so
  1927         // equal to the number of implementors for target->holder() so
  1928         // if number of implementors of target->holder() == 1 then
  1928         // if number of implementors of target->holder() == 1 then
  1929         // number of implementors for decl_interface is 0 or 1. If
  1929         // number of implementors for decl_interface is 0 or 1. If
  1930         // it's 0 then no class implements decl_interface and there's
  1930         // it's 0 then no class implements decl_interface and there's
  1931         // no point in inlining.
  1931         // no point in inlining.
  1932         if (!holder->is_loaded() || decl_interface->nof_implementors() != 1 || decl_interface->has_default_methods()) {
  1932         if (!holder->is_loaded() || decl_interface->nof_implementors() != 1 || decl_interface->has_nonstatic_concrete_methods()) {
  1933           singleton = NULL;
  1933           singleton = NULL;
  1934         }
  1934         }
  1935       }
  1935       }
  1936       if (singleton) {
  1936       if (singleton) {
  1937         cha_monomorphic_target = target->find_monomorphic_target(calling_klass, target->holder(), singleton);
  1937         cha_monomorphic_target = target->find_monomorphic_target(calling_klass, target->holder(), singleton);
  4306 #endif // PRODUCT
  4306 #endif // PRODUCT
  4307 
  4307 
  4308 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) {
  4308 void GraphBuilder::profile_call(ciMethod* callee, Value recv, ciKlass* known_holder, Values* obj_args, bool inlined) {
  4309   assert(known_holder == NULL || (known_holder->is_instance_klass() &&
  4309   assert(known_holder == NULL || (known_holder->is_instance_klass() &&
  4310                                   (!known_holder->is_interface() ||
  4310                                   (!known_holder->is_interface() ||
  4311                                    ((ciInstanceKlass*)known_holder)->has_default_methods())), "should be default method");
  4311                                    ((ciInstanceKlass*)known_holder)->has_nonstatic_concrete_methods())), "should be non-static concrete method");
  4312   if (known_holder != NULL) {
  4312   if (known_holder != NULL) {
  4313     if (known_holder->exact_klass() == NULL) {
  4313     if (known_holder->exact_klass() == NULL) {
  4314       known_holder = compilation()->cha_exact_type(known_holder);
  4314       known_holder = compilation()->cha_exact_type(known_holder);
  4315     }
  4315     }
  4316   }
  4316   }