1820 GrowableArray<address>* SignatureHandlerLibrary::_handlers = NULL; 1821 address SignatureHandlerLibrary::_buffer = NULL; 1822 1823 1824 IRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method)) 1825 methodHandle m(thread, method); 1826 assert(m->is_native(), "sanity check"); 1827 // lookup native function entry point if it doesn't exist 1828 bool in_base_library; 1829 if (!m->has_native_function()) { 1830 NativeLookup::lookup(m, in_base_library, CHECK); 1831 } 1832 // make sure signature handler is installed 1833 SignatureHandlerLibrary::add(m); 1834 // The interpreter entry point checks the signature handler first, 1835 // before trying to fetch the native entry point and klass mirror. 1836 // We must set the signature handler last, so that multiple processors 1837 // preparing the same method will be sure to see non-null entry & mirror. 1838 IRT_END 1839 1840 #if defined(IA32) || defined(AMD64) || defined(ARM) 1841 IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address)) 1842 if (src_address == dest_address) { 1843 return; 1844 } 1845 ResetNoHandleMark rnm; // In a LEAF entry. 1846 HandleMark hm; 1847 ResourceMark rm; 1848 LastFrameAccessor last_frame(thread); 1849 assert(last_frame.is_interpreted_frame(), ""); 1850 jint bci = last_frame.bci(); 1851 methodHandle mh(thread, last_frame.method()); 1852 Bytecode_invoke invoke(mh, bci); 1853 ArgumentSizeComputer asc(invoke.signature()); 1854 int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver 1855 Copy::conjoint_jbytes(src_address, dest_address, 1856 size_of_arguments * Interpreter::stackElementSize); 1857 IRT_END 1858 #endif 1859 | 1820 GrowableArray<address>* SignatureHandlerLibrary::_handlers = NULL; 1821 address SignatureHandlerLibrary::_buffer = NULL; 1822 1823 1824 IRT_ENTRY(void, InterpreterRuntime::prepare_native_call(JavaThread* thread, Method* method)) 1825 methodHandle m(thread, method); 1826 assert(m->is_native(), "sanity check"); 1827 // lookup native function entry point if it doesn't exist 1828 bool in_base_library; 1829 if (!m->has_native_function()) { 1830 NativeLookup::lookup(m, in_base_library, CHECK); 1831 } 1832 // make sure signature handler is installed 1833 SignatureHandlerLibrary::add(m); 1834 // The interpreter entry point checks the signature handler first, 1835 // before trying to fetch the native entry point and klass mirror. 1836 // We must set the signature handler last, so that multiple processors 1837 // preparing the same method will be sure to see non-null entry & mirror. 1838 IRT_END 1839 1840 IRT_ENTRY(void, InterpreterRuntime::deoptimize_caller_frame_for_vt(JavaThread* thread, Method* callee)) 1841 // Called from within the owner thread, so no need for safepoint 1842 if (!callee->is_known_returning_vt() && !callee->is_known_not_returning_vt()) { 1843 callee->check_returning_vt(thread); 1844 } 1845 if (!callee->is_known_returning_vt()) { 1846 // deoptimize the caller only if it was compiled code that's calling a method that returns 1847 // a value type. In this case, the return type must have already been resolved. 1848 return; 1849 } 1850 RegisterMap reg_map(thread); 1851 frame last_frame = thread->last_frame(); 1852 frame caller_frame = last_frame.sender(®_map); 1853 Deoptimization::deoptimize_frame(thread, caller_frame.id()); 1854 IRT_END 1855 1856 #if defined(IA32) || defined(AMD64) || defined(ARM) 1857 IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address)) 1858 if (src_address == dest_address) { 1859 return; 1860 } 1861 ResetNoHandleMark rnm; // In a LEAF entry. 1862 HandleMark hm; 1863 ResourceMark rm; 1864 LastFrameAccessor last_frame(thread); 1865 assert(last_frame.is_interpreted_frame(), ""); 1866 jint bci = last_frame.bci(); 1867 methodHandle mh(thread, last_frame.method()); 1868 Bytecode_invoke invoke(mh, bci); 1869 ArgumentSizeComputer asc(invoke.signature()); 1870 int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver 1871 Copy::conjoint_jbytes(src_address, dest_address, 1872 size_of_arguments * Interpreter::stackElementSize); 1873 IRT_END 1874 #endif 1875 |