mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8201593: Print array length in ArrayIndexOutOfBoundsException
Reviewed-by: dholmes, mdoerr, smonteith, shade, rriggs
This commit is contained in:
parent
b812ae6e51
commit
ac3043c692
34 changed files with 675 additions and 142 deletions
|
@ -757,11 +757,14 @@ void TemplateTable::index_check_without_pop(Register array, Register index) {
|
|||
assert(rbx != array, "different registers");
|
||||
__ movl(rbx, index);
|
||||
}
|
||||
__ jump_cc(Assembler::aboveEqual,
|
||||
ExternalAddress(Interpreter::_throw_ArrayIndexOutOfBoundsException_entry));
|
||||
Label skip;
|
||||
__ jccb(Assembler::below, skip);
|
||||
// Pass array to create more detailed exceptions.
|
||||
__ mov(NOT_LP64(rax) LP64_ONLY(c_rarg1), array);
|
||||
__ jump(ExternalAddress(Interpreter::_throw_ArrayIndexOutOfBoundsException_entry));
|
||||
__ bind(skip);
|
||||
}
|
||||
|
||||
|
||||
void TemplateTable::iaload() {
|
||||
transition(itos, itos);
|
||||
// rax: index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue