| Index: runtime/vm/intermediate_language_x64.cc
|
| diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
|
| index 6ce429cc7e8bb65b664931a345edb03eb7558004..3b205c42a20a167bf88b47058504b459212f126d 100644
|
| --- a/runtime/vm/intermediate_language_x64.cc
|
| +++ b/runtime/vm/intermediate_language_x64.cc
|
| @@ -2653,8 +2653,7 @@ static void EmitSmiShiftLeft(FlowGraphCompiler* compiler,
|
| if (is_truncating) {
|
| if (right_needs_check) {
|
| const bool right_may_be_negative =
|
| - (right_range == NULL) ||
|
| - !right_range->IsWithin(0, RangeBoundary::kPlusInfinity);
|
| + (right_range == NULL) || right_range->IsNegative();
|
| if (right_may_be_negative) {
|
| ASSERT(shift_left->CanDeoptimize());
|
| __ CompareImmediate(right, Immediate(0), PP);
|
| @@ -3106,7 +3105,7 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ jmp(&all_done, Assembler::kNearJump);
|
| __ Bind(&subtract);
|
| __ subq(result, right);
|
| - } else if (right_range->IsWithin(0, RangeBoundary::kPlusInfinity)) {
|
| + } else if (right_range->IsPositive()) {
|
| // Right is positive.
|
| __ addq(result, right);
|
| } else {
|
| @@ -3126,7 +3125,7 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // sarq operation masks the count to 6 bits.
|
| const intptr_t kCountLimit = 0x3F;
|
| if ((right_range == NULL) ||
|
| - !right_range->IsWithin(RangeBoundary::kMinusInfinity, kCountLimit)) {
|
| + !right_range->OnlyLessThanOrEqualTo(kCountLimit)) {
|
| __ CompareImmediate(right, Immediate(kCountLimit), PP);
|
| Label count_ok;
|
| __ j(LESS, &count_ok, Assembler::kNearJump);
|
| @@ -5247,7 +5246,7 @@ void MergedMathInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ jmp(&all_done, Assembler::kNearJump);
|
| __ Bind(&subtract);
|
| __ subq(RDX, right);
|
| - } else if (right_range->IsWithin(0, RangeBoundary::kPlusInfinity)) {
|
| + } else if (right_range->IsPositive()) {
|
| // Right is positive.
|
| __ addq(RDX, right);
|
| } else {
|
|
|