2725 // Install the generated code. 2726 if (nm != NULL) { 2727 if (PrintCompilation) { 2728 ttyLocker ttyl; 2729 CompileTask::print(tty, nm, method->is_static() ? "(static)" : ""); 2730 } 2731 nm->post_compiled_method_load_event(); 2732 } 2733 } 2734 2735 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread)) 2736 assert(thread == JavaThread::current(), "must be"); 2737 // The code is about to enter a JNI lazy critical native method and 2738 // _needs_gc is true, so if this thread is already in a critical 2739 // section then just return, otherwise this thread should block 2740 // until needs_gc has been cleared. 2741 if (thread->in_critical()) { 2742 return; 2743 } 2744 // Lock and unlock a critical section to give the system a chance to block 2745 GC_locker::lock_critical(thread); 2746 GC_locker::unlock_critical(thread); 2747 JRT_END 2748 2749 // ------------------------------------------------------------------------- 2750 // Java-Java calling convention 2751 // (what you use when Java calls Java) 2752 2753 //------------------------------name_for_receiver---------------------------------- 2754 // For a given signature, return the VMReg for parameter 0. 2755 VMReg SharedRuntime::name_for_receiver() { 2756 VMRegPair regs; 2757 BasicType sig_bt = T_OBJECT; 2758 (void) java_calling_convention(&sig_bt, ®s, 1, true); 2759 // Return argument 0 register. In the LP64 build pointers 2760 // take 2 registers, but the VM wants only the 'main' name. 2761 return regs.first(); 2762 } 2763 2764 VMRegPair *SharedRuntime::find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int* arg_size) { 2765 // This method is returning a data structure allocating as a 2766 // ResourceObject, so do not put any ResourceMarks in here. | 2725 // Install the generated code. 2726 if (nm != NULL) { 2727 if (PrintCompilation) { 2728 ttyLocker ttyl; 2729 CompileTask::print(tty, nm, method->is_static() ? "(static)" : ""); 2730 } 2731 nm->post_compiled_method_load_event(); 2732 } 2733 } 2734 2735 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* thread)) 2736 assert(thread == JavaThread::current(), "must be"); 2737 // The code is about to enter a JNI lazy critical native method and 2738 // _needs_gc is true, so if this thread is already in a critical 2739 // section then just return, otherwise this thread should block 2740 // until needs_gc has been cleared. 2741 if (thread->in_critical()) { 2742 return; 2743 } 2744 // Lock and unlock a critical section to give the system a chance to block 2745 GCLocker::lock_critical(thread); 2746 GCLocker::unlock_critical(thread); 2747 JRT_END 2748 2749 // ------------------------------------------------------------------------- 2750 // Java-Java calling convention 2751 // (what you use when Java calls Java) 2752 2753 //------------------------------name_for_receiver---------------------------------- 2754 // For a given signature, return the VMReg for parameter 0. 2755 VMReg SharedRuntime::name_for_receiver() { 2756 VMRegPair regs; 2757 BasicType sig_bt = T_OBJECT; 2758 (void) java_calling_convention(&sig_bt, ®s, 1, true); 2759 // Return argument 0 register. In the LP64 build pointers 2760 // take 2 registers, but the VM wants only the 'main' name. 2761 return regs.first(); 2762 } 2763 2764 VMRegPair *SharedRuntime::find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int* arg_size) { 2765 // This method is returning a data structure allocating as a 2766 // ResourceObject, so do not put any ResourceMarks in here. |