< prev index next >

src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp

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


 574     value.load_for_store(x->elt_type());
 575   }
 576 
 577   set_no_result(x);
 578 
 579   // the CodeEmitInfo must be duplicated for each different
 580   // LIR-instruction because spilling can occur anywhere between two
 581   // instructions and so the debug information must be different
 582   CodeEmitInfo* range_check_info = state_for(x);
 583   CodeEmitInfo* null_check_info = NULL;
 584   if (x->needs_null_check()) {
 585     null_check_info = new CodeEmitInfo(range_check_info);
 586   }
 587 
 588   // emit array address setup early so it schedules better
 589   LIR_Address* array_addr = emit_array_address(array.result(), index.result(), x->elt_type(), obj_store);
 590 
 591   if (GenerateRangeChecks && needs_range_check) {
 592     if (use_length) {
 593       __ cmp(lir_cond_belowEqual, length.result(), index.result());
 594       __ branch(lir_cond_belowEqual, T_INT, new RangeCheckStub(range_check_info, index.result()));
 595     } else {
 596       array_range_check(array.result(), index.result(), null_check_info, range_check_info);
 597       // range_check also does the null check
 598       null_check_info = NULL;
 599     }
 600   }
 601 
 602   if (GenerateArrayStoreCheck && needs_store_check) {
 603     LIR_Opr tmp1 = FrameMap::R0_oop_opr;
 604     LIR_Opr tmp2 = FrameMap::R1_oop_opr;
 605     CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info);
 606     __ store_check(value.result(), array.result(), tmp1, tmp2,
 607                    LIR_OprFact::illegalOpr, store_check_info,
 608                    x->profiled_method(), x->profiled_bci());
 609   }
 610 
 611 #if INCLUDE_ALL_GCS
 612   if (obj_store) {
 613     // Needs GC write barriers.
 614     pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,




 574     value.load_for_store(x->elt_type());
 575   }
 576 
 577   set_no_result(x);
 578 
 579   // the CodeEmitInfo must be duplicated for each different
 580   // LIR-instruction because spilling can occur anywhere between two
 581   // instructions and so the debug information must be different
 582   CodeEmitInfo* range_check_info = state_for(x);
 583   CodeEmitInfo* null_check_info = NULL;
 584   if (x->needs_null_check()) {
 585     null_check_info = new CodeEmitInfo(range_check_info);
 586   }
 587 
 588   // emit array address setup early so it schedules better
 589   LIR_Address* array_addr = emit_array_address(array.result(), index.result(), x->elt_type(), obj_store);
 590 
 591   if (GenerateRangeChecks && needs_range_check) {
 592     if (use_length) {
 593       __ cmp(lir_cond_belowEqual, length.result(), index.result());
 594       __ branch(lir_cond_belowEqual, T_INT, new RangeCheckStub(range_check_info, index.result(), array.result()));
 595     } else {
 596       array_range_check(array.result(), index.result(), null_check_info, range_check_info);
 597       // range_check also does the null check
 598       null_check_info = NULL;
 599     }
 600   }
 601 
 602   if (GenerateArrayStoreCheck && needs_store_check) {
 603     LIR_Opr tmp1 = FrameMap::R0_oop_opr;
 604     LIR_Opr tmp2 = FrameMap::R1_oop_opr;
 605     CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info);
 606     __ store_check(value.result(), array.result(), tmp1, tmp2,
 607                    LIR_OprFact::illegalOpr, store_check_info,
 608                    x->profiled_method(), x->profiled_bci());
 609   }
 610 
 611 #if INCLUDE_ALL_GCS
 612   if (obj_store) {
 613     // Needs GC write barriers.
 614     pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,


< prev index next >