| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index b7c733cb259a0c589cb94a19a608570c99fdd598..396ae8d7d0e8b03ec74313b3c050a21f058bcbab 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -4311,6 +4311,18 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) {
|
| + if (FLAG_debug_code && check->hydrogen()->skip_check()) {
|
| + Label done;
|
| + __ b(NegateCondition(cc), &done);
|
| + __ stop("eliminated bounds check failed");
|
| + __ bind(&done);
|
| + } else {
|
| + DeoptimizeIf(cc, check->environment());
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
|
| if (instr->hydrogen()->skip_check()) return;
|
|
|
| @@ -4326,7 +4338,8 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
|
| } else {
|
| __ cmp(ToRegister(instr->index()), ToRegister(instr->length()));
|
| }
|
| - DeoptimizeIf(hs, instr->environment());
|
| + Condition condition = instr->hydrogen()->allow_equality() ? hi : hs;
|
| + ApplyCheckIf(condition, instr);
|
| }
|
|
|
|
|
|
|