< prev index next >

src/hotspot/share/runtime/sharedRuntime.cpp

Print this page
rev 56252 : imported patch 8226705-v2


2885         sig_bt[i++] = T_OBJECT;
2886       SignatureStream ss(method->signature());
2887       for (; !ss.at_return_type(); ss.next()) {
2888         sig_bt[i++] = ss.type();  // Collect remaining bits of signature
2889         if (ss.type() == T_LONG || ss.type() == T_DOUBLE)
2890           sig_bt[i++] = T_VOID;   // Longs & doubles take 2 Java slots
2891       }
2892       assert(i == total_args_passed, "");
2893       BasicType ret_type = ss.type();
2894 
2895       // Now get the compiled-Java layout as input (or output) arguments.
2896       // NOTE: Stubs for compiled entry points of method handle intrinsics
2897       // are just trampolines so the argument registers must be outgoing ones.
2898       const bool is_outgoing = method->is_method_handle_intrinsic();
2899       int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed, is_outgoing);
2900 
2901       // Generate the compiled-to-native wrapper code
2902       nm = SharedRuntime::generate_native_wrapper(&_masm, method, compile_id, sig_bt, regs, ret_type, critical_entry);
2903 
2904       if (nm != NULL) {



2905         method->set_code(method, nm);


2906 
2907         DirectiveSet* directive = DirectivesStack::getDefaultDirective(CompileBroker::compiler(CompLevel_simple));
2908         if (directive->PrintAssemblyOption) {
2909           nm->print_code();
2910         }
2911         DirectivesStack::release(directive);
2912       }
2913     }
2914   } // Unlock AdapterHandlerLibrary_lock
2915 
2916 
2917   // Install the generated code.
2918   if (nm != NULL) {
2919     const char *msg = method->is_static() ? "(static)" : "";
2920     CompileTask::print_ul(nm, msg);
2921     if (PrintCompilation) {
2922       ttyLocker ttyl;
2923       CompileTask::print(tty, nm, msg);
2924     }
2925     nm->post_compiled_method_load_event();




2885         sig_bt[i++] = T_OBJECT;
2886       SignatureStream ss(method->signature());
2887       for (; !ss.at_return_type(); ss.next()) {
2888         sig_bt[i++] = ss.type();  // Collect remaining bits of signature
2889         if (ss.type() == T_LONG || ss.type() == T_DOUBLE)
2890           sig_bt[i++] = T_VOID;   // Longs & doubles take 2 Java slots
2891       }
2892       assert(i == total_args_passed, "");
2893       BasicType ret_type = ss.type();
2894 
2895       // Now get the compiled-Java layout as input (or output) arguments.
2896       // NOTE: Stubs for compiled entry points of method handle intrinsics
2897       // are just trampolines so the argument registers must be outgoing ones.
2898       const bool is_outgoing = method->is_method_handle_intrinsic();
2899       int comp_args_on_stack = SharedRuntime::java_calling_convention(sig_bt, regs, total_args_passed, is_outgoing);
2900 
2901       // Generate the compiled-to-native wrapper code
2902       nm = SharedRuntime::generate_native_wrapper(&_masm, method, compile_id, sig_bt, regs, ret_type, critical_entry);
2903 
2904       if (nm != NULL) {
2905         {
2906           MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag);
2907           if (nm->make_in_use()) {
2908             method->set_code(method, nm);
2909           }
2910         }
2911 
2912         DirectiveSet* directive = DirectivesStack::getDefaultDirective(CompileBroker::compiler(CompLevel_simple));
2913         if (directive->PrintAssemblyOption) {
2914           nm->print_code();
2915         }
2916         DirectivesStack::release(directive);
2917       }
2918     }
2919   } // Unlock AdapterHandlerLibrary_lock
2920 
2921 
2922   // Install the generated code.
2923   if (nm != NULL) {
2924     const char *msg = method->is_static() ? "(static)" : "";
2925     CompileTask::print_ul(nm, msg);
2926     if (PrintCompilation) {
2927       ttyLocker ttyl;
2928       CompileTask::print(tty, nm, msg);
2929     }
2930     nm->post_compiled_method_load_event();


< prev index next >