| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 0da9337db6f16b0c6a6f8a1e9c8cce3d3235c94f..814d423fc6acac6329fdba08ce3d09507c1ef474 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -4017,6 +4017,18 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) {
|
| + if (FLAG_debug_code && check->hydrogen()->skip_check()) {
|
| + Label done;
|
| + __ j(NegateCondition(cc), &done, Label::kNear);
|
| + __ int3();
|
| + __ bind(&done);
|
| + } else {
|
| + DeoptimizeIf(cc, check->environment());
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
|
| if (instr->hydrogen()->skip_check()) return;
|
|
|
| @@ -4054,7 +4066,9 @@ void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
|
| __ cmpq(length, ToRegister(instr->index()));
|
| }
|
| }
|
| - DeoptimizeIf(below_equal, instr->environment());
|
| + Condition condition =
|
| + instr->hydrogen()->allow_equality() ? below : below_equal;
|
| + ApplyCheckIf(condition, instr);
|
| }
|
|
|
|
|
|
|