< prev index next >

src/hotspot/cpu/sparc/c1_CodeStubs_sparc.cpp

Print this page
rev 50027 : 8201593: Print array length in ArrayIndexOutOfBoundsException.
Reviewed-by: dholmes, mdoerr, smonteith, shade

*** 33,51 **** #include "utilities/macros.hpp" #include "vmreg_sparc.inline.hpp" #define __ ce->masm()-> ! RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, ! bool throw_index_out_of_bounds_exception) ! : _throw_index_out_of_bounds_exception(throw_index_out_of_bounds_exception) ! , _index(index) ! { assert(info != NULL, "must have info"); _info = new CodeEmitInfo(info); } void RangeCheckStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); if (_info->deoptimize_on_exception()) { --- 33,53 ---- #include "utilities/macros.hpp" #include "vmreg_sparc.inline.hpp" #define __ ce->masm()-> ! RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array) ! : _throw_index_out_of_bounds_exception(false), _index(index), _array(array) { assert(info != NULL, "must have info"); _info = new CodeEmitInfo(info); } + RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index) + : _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) { + assert(info != NULL, "must have info"); + _info = new CodeEmitInfo(info); + } void RangeCheckStub::emit_code(LIR_Assembler* ce) { __ bind(_entry); if (_info->deoptimize_on_exception()) {
*** 64,73 **** --- 66,76 ---- __ set(_index->as_jint(), G4); } if (_throw_index_out_of_bounds_exception) { __ call(Runtime1::entry_for(Runtime1::throw_index_exception_id), relocInfo::runtime_call_type); } else { + __ mov(_array->as_pointer_register(), G5); __ call(Runtime1::entry_for(Runtime1::throw_range_check_failed_id), relocInfo::runtime_call_type); } __ delayed()->nop(); ce->add_call_info_here(_info); ce->verify_oop_map(_info);
< prev index next >