< prev index next >

src/hotspot/cpu/arm/templateInterpreterGenerator_arm.cpp

Print this page
rev 49827 : 8201593: Print array length in ArrayIndexOutOfBoundsException.


 168     __ bind(L);
 169   }
 170 #endif // ASSERT
 171 
 172   // Restore bcp under the assumption that the current frame is still
 173   // interpreted
 174   __ restore_bcp();
 175 
 176   // expression stack must be empty before entering the VM if an exception
 177   // happened
 178   __ empty_expression_stack();
 179 
 180   // throw exception
 181   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
 182 
 183   __ should_not_reach_here();
 184 
 185   return entry;
 186 }
 187 
 188 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler(const char* name) {
 189   address entry = __ pc();
 190 
 191   // index is in R4_ArrayIndexOutOfBounds_index
 192 
 193   InlinedString Lname(name);
 194 
 195   // expression stack must be empty before entering the VM if an exception happened
 196   __ empty_expression_stack();
 197 
 198   // setup parameters
 199   __ ldr_literal(R1, Lname);
 200   __ mov(R2, R4_ArrayIndexOutOfBounds_index);
 201 
 202   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), R1, R2);
 203 
 204   __ nop(); // to avoid filling CPU pipeline with invalid instructions
 205   __ nop();
 206   __ should_not_reach_here();
 207   __ bind_literal(Lname);
 208 
 209   return entry;
 210 }
 211 
 212 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
 213   address entry = __ pc();
 214 
 215   // object is in R2_ClassCastException_obj
 216 
 217   // expression stack must be empty before entering the VM if an exception
 218   // happened
 219   __ empty_expression_stack();




 168     __ bind(L);
 169   }
 170 #endif // ASSERT
 171 
 172   // Restore bcp under the assumption that the current frame is still
 173   // interpreted
 174   __ restore_bcp();
 175 
 176   // expression stack must be empty before entering the VM if an exception
 177   // happened
 178   __ empty_expression_stack();
 179 
 180   // throw exception
 181   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_StackOverflowError));
 182 
 183   __ should_not_reach_here();
 184 
 185   return entry;
 186 }
 187 
 188 address TemplateInterpreterGenerator::generate_ArrayIndexOutOfBounds_handler() {
 189   address entry = __ pc();
 190 
 191   // index is in R4_ArrayIndexOutOfBounds_index
 192 


 193   // expression stack must be empty before entering the VM if an exception happened
 194   __ empty_expression_stack();
 195 
 196   // setup parameters
 197   // Array expected in R1.
 198   __ mov(R2, R4_ArrayIndexOutOfBounds_index);
 199 
 200   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::throw_ArrayIndexOutOfBoundsException), R1, R2);
 201 
 202   __ nop(); // to avoid filling CPU pipeline with invalid instructions
 203   __ nop();
 204   __ should_not_reach_here();
 205   __ bind_literal(Lname);
 206 
 207   return entry;
 208 }
 209 
 210 address TemplateInterpreterGenerator::generate_ClassCastException_handler() {
 211   address entry = __ pc();
 212 
 213   // object is in R2_ClassCastException_obj
 214 
 215   // expression stack must be empty before entering the VM if an exception
 216   // happened
 217   __ empty_expression_stack();


< prev index next >