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 assert(callee->is_returning_vt(), "must be"); 1843 RegisterMap reg_map(thread); 1844 frame last_frame = thread->last_frame(); 1845 frame caller_frame = last_frame.sender(®_map); 1846 Deoptimization::deoptimize_frame(thread, caller_frame.id()); 1847 IRT_END 1848 1849 #if defined(IA32) || defined(AMD64) || defined(ARM) 1850 IRT_LEAF(void, InterpreterRuntime::popframe_move_outgoing_args(JavaThread* thread, void* src_address, void* dest_address)) 1851 if (src_address == dest_address) { 1852 return; 1853 } 1854 ResetNoHandleMark rnm; // In a LEAF entry. 1855 HandleMark hm; 1856 ResourceMark rm; 1857 LastFrameAccessor last_frame(thread); 1858 assert(last_frame.is_interpreted_frame(), ""); 1859 jint bci = last_frame.bci(); 1860 methodHandle mh(thread, last_frame.method()); 1861 Bytecode_invoke invoke(mh, bci); 1862 ArgumentSizeComputer asc(invoke.signature()); 1863 int size_of_arguments = (asc.size() + (invoke.has_receiver() ? 1 : 0)); // receiver 1864 Copy::conjoint_jbytes(src_address, dest_address, 1865 size_of_arguments * Interpreter::stackElementSize); 1866 IRT_END 1867 #endif 1868 |