hotspot/src/share/vm/interpreter/linkResolver.cpp
changeset 33198 b37ad9fbf681
parent 33105 294e48b4f704
parent 33160 c59f1676d27e
child 33593 60764a78fa5c
equal deleted inserted replaced
33155:73bf16b22e89 33198:b37ad9fbf681
   122     // This path is unusual, mostly used by the '-Xcomp' stress test mode.
   122     // This path is unusual, mostly used by the '-Xcomp' stress test mode.
   123 
   123 
   124     // Note: with several active threads, the must_be_compiled may be true
   124     // Note: with several active threads, the must_be_compiled may be true
   125     //       while can_be_compiled is false; remove assert
   125     //       while can_be_compiled is false; remove assert
   126     // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile");
   126     // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile");
   127     if (THREAD->is_Compiler_thread()) {
   127     if (!THREAD->can_call_java()) {
   128       // don't force compilation, resolve was on behalf of compiler
   128       // don't force compilation, resolve was on behalf of compiler
   129       return;
   129       return;
   130     }
   130     }
   131     if (selected_method->method_holder()->is_not_initialized()) {
   131     if (selected_method->method_holder()->is_not_initialized()) {
   132       // 'is_not_initialized' means not only '!is_initialized', but also that
   132       // 'is_not_initialized' means not only '!is_initialized', but also that
   448           result->print_on(tty);
   448           result->print_on(tty);
   449         }
   449         }
   450       }
   450       }
   451       return result;
   451       return result;
   452     } else if (iid == vmIntrinsics::_invokeGeneric
   452     } else if (iid == vmIntrinsics::_invokeGeneric
   453                && !THREAD->is_Compiler_thread()
   453                && THREAD->can_call_java()
   454                && appendix_result_or_null != NULL) {
   454                && appendix_result_or_null != NULL) {
   455       // This is a method with type-checking semantics.
   455       // This is a method with type-checking semantics.
   456       // We will ask Java code to spin an adapter method for it.
   456       // We will ask Java code to spin an adapter method for it.
   457       if (!MethodHandles::enabled()) {
   457       if (!MethodHandles::enabled()) {
   458         // Make sure the Java part of the runtime has been booted up.
   458         // Make sure the Java part of the runtime has been booted up.