< prev index next >

src/hotspot/share/code/exceptionHandlerTable.cpp

Print this page

        

*** 174,184 **** *(adr(l) ) = exec_off; *(adr(l)+1) = cont_off; _len = l+1; }; ! uint ImplicitExceptionTable::continuation_offset( uint exec_off ) const { uint l = len(); for( uint i=0; i<l; i++ ) if( *adr(i) == exec_off ) return *(adr(i)+1); return 0; // Failed to find any execption offset --- 174,184 ---- *(adr(l) ) = exec_off; *(adr(l)+1) = cont_off; _len = l+1; }; ! uint ImplicitExceptionTable::at( uint exec_off ) const { uint l = len(); for( uint i=0; i<l; i++ ) if( *adr(i) == exec_off ) return *(adr(i)+1); return 0; // Failed to find any execption offset
*** 203,213 **** } else { tty->print_cr("ImplicitExceptionTable is empty"); } } ! ImplicitExceptionTable::ImplicitExceptionTable(const CompiledMethod* nm) { if (nm->nul_chk_table_size() == 0) { _len = 0; _data = NULL; } else { // the first word is the length if non-zero, so read it out and --- 203,213 ---- } else { tty->print_cr("ImplicitExceptionTable is empty"); } } ! ImplicitExceptionTable::ImplicitExceptionTable(const nmethod* nm) { if (nm->nul_chk_table_size() == 0) { _len = 0; _data = NULL; } else { // the first word is the length if non-zero, so read it out and
*** 219,244 **** _size = len(); assert(size_in_bytes() <= nm->nul_chk_table_size(), "size of space allocated in nmethod incorrect"); } void ImplicitExceptionTable::copy_to( nmethod* nm ) { ! copy_bytes_to(nm->nul_chk_table_begin(), nm->nul_chk_table_size()); ! } ! ! void ImplicitExceptionTable::copy_bytes_to(address addr, int size) { ! assert(size_in_bytes() <= size, "size of space allocated in nmethod incorrect"); if (len() != 0) { ! implicit_null_entry* nmdata = (implicit_null_entry*)addr; // store the length in the first uint nmdata[0] = _len; nmdata++; // copy the table after the length memmove( nmdata, _data, 2 * len() * sizeof(implicit_null_entry)); } else { // zero length table takes zero bytes assert(size_in_bytes() == 0, "bad size"); ! assert(size == 0, "bad size"); } } void ImplicitExceptionTable::verify(nmethod *nm) const { for (uint i = 0; i < len(); i++) { --- 219,240 ---- _size = len(); assert(size_in_bytes() <= nm->nul_chk_table_size(), "size of space allocated in nmethod incorrect"); } void ImplicitExceptionTable::copy_to( nmethod* nm ) { ! assert(size_in_bytes() <= nm->nul_chk_table_size(), "size of space allocated in nmethod incorrect"); if (len() != 0) { ! implicit_null_entry* nmdata = (implicit_null_entry*)nm->nul_chk_table_begin(); // store the length in the first uint nmdata[0] = _len; nmdata++; // copy the table after the length memmove( nmdata, _data, 2 * len() * sizeof(implicit_null_entry)); } else { // zero length table takes zero bytes assert(size_in_bytes() == 0, "bad size"); ! assert(nm->nul_chk_table_size() == 0, "bad size"); } } void ImplicitExceptionTable::verify(nmethod *nm) const { for (uint i = 0; i < len(); i++) {
< prev index next >