hotspot/src/share/vm/jvmci/jvmciEnv.cpp
changeset 34236 4558141028a9
parent 34185 ee71c590a456
parent 34229 892795cc82fe
child 34317 e93b85bf4cc2
equal deleted inserted replaced
34228:035e020c8c0d 34236:4558141028a9
   280 // name, signature, and bytecode.
   280 // name, signature, and bytecode.
   281 methodHandle JVMCIEnv::lookup_method(instanceKlassHandle h_accessor,
   281 methodHandle JVMCIEnv::lookup_method(instanceKlassHandle h_accessor,
   282                                instanceKlassHandle h_holder,
   282                                instanceKlassHandle h_holder,
   283                                Symbol*       name,
   283                                Symbol*       name,
   284                                Symbol*       sig,
   284                                Symbol*       sig,
   285                                Bytecodes::Code bc) {
   285                                Bytecodes::Code bc,
       
   286                                constantTag   tag) {
   286   JVMCI_EXCEPTION_CONTEXT;
   287   JVMCI_EXCEPTION_CONTEXT;
   287   LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
   288   LinkResolver::check_klass_accessability(h_accessor, h_holder, KILL_COMPILE_ON_FATAL_(NULL));
   288   methodHandle dest_method;
   289   methodHandle dest_method;
   289   LinkInfo link_info(h_holder, name, sig, h_accessor, /*check_access*/true);
   290   LinkInfo link_info(h_holder, name, sig, h_accessor, LinkInfo::needs_access_check, tag);
   290   switch (bc) {
   291   switch (bc) {
   291   case Bytecodes::_invokestatic:
   292   case Bytecodes::_invokestatic:
   292     dest_method =
   293     dest_method =
   293       LinkResolver::resolve_static_call_or_null(link_info);
   294       LinkResolver::resolve_static_call_or_null(link_info);
   294     break;
   295     break;
   357     }
   358     }
   358   }
   359   }
   359 
   360 
   360   if (holder_is_accessible) { // Our declared holder is loaded.
   361   if (holder_is_accessible) { // Our declared holder is loaded.
   361     instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder);
   362     instanceKlassHandle lookup = get_instance_klass_for_declared_method_holder(holder);
   362     methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc);
   363     constantTag tag = cpool->tag_ref_at(index);
       
   364     methodHandle m = lookup_method(accessor, lookup, name_sym, sig_sym, bc, tag);
   363     if (!m.is_null() &&
   365     if (!m.is_null() &&
   364         (bc == Bytecodes::_invokestatic
   366         (bc == Bytecodes::_invokestatic
   365          ?  InstanceKlass::cast(m->method_holder())->is_not_initialized()
   367          ?  InstanceKlass::cast(m->method_holder())->is_not_initialized()
   366          : !InstanceKlass::cast(m->method_holder())->is_loaded())) {
   368          : !InstanceKlass::cast(m->method_holder())->is_loaded())) {
   367       m = NULL;
   369       m = NULL;