Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index e192ecff4b057d9f63cd96161de7f6d66126db69..18bc67c5cd4082b517d7182597bce731a7e0054c 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -2958,7 +2958,7 @@ Maybe<HConstant*> HConstant::CopyToTruncatedNumber(Zone* zone) { |
res = handle->BooleanValue() ? |
new(zone) HConstant(1) : new(zone) HConstant(0); |
} else if (handle->IsUndefined()) { |
- res = new(zone) HConstant(base::OS::nan_value()); |
+ res = new (zone) HConstant(std::numeric_limits<double>::quiet_NaN()); |
} else if (handle->IsNull()) { |
res = new(zone) HConstant(0); |
} |
@@ -4173,7 +4173,7 @@ HInstruction* HUnaryMathOperation::New( |
if (!constant->HasNumberValue()) break; |
double d = constant->DoubleValue(); |
if (std::isnan(d)) { // NaN poisons everything. |
- return H_CONSTANT_DOUBLE(base::OS::nan_value()); |
+ return H_CONSTANT_DOUBLE(std::numeric_limits<double>::quiet_NaN()); |
} |
if (std::isinf(d)) { // +Infinity and -Infinity. |
switch (op) { |
@@ -4181,7 +4181,8 @@ HInstruction* HUnaryMathOperation::New( |
return H_CONSTANT_DOUBLE((d > 0.0) ? d : 0.0); |
case kMathLog: |
case kMathSqrt: |
- return H_CONSTANT_DOUBLE((d > 0.0) ? d : base::OS::nan_value()); |
+ return H_CONSTANT_DOUBLE( |
+ (d > 0.0) ? d : std::numeric_limits<double>::quiet_NaN()); |
case kMathPowHalf: |
case kMathAbs: |
return H_CONSTANT_DOUBLE((d > 0.0) ? d : -d); |
@@ -4278,8 +4279,9 @@ HInstruction* HPower::New(Zone* zone, |
if (c_left->HasNumberValue() && c_right->HasNumberValue()) { |
double result = power_helper(c_left->DoubleValue(), |
c_right->DoubleValue()); |
- return H_CONSTANT_DOUBLE(std::isnan(result) ? base::OS::nan_value() |
- : result); |
+ return H_CONSTANT_DOUBLE(std::isnan(result) |
+ ? std::numeric_limits<double>::quiet_NaN() |
+ : result); |
} |
} |
return new(zone) HPower(left, right); |
@@ -4312,7 +4314,7 @@ HInstruction* HMathMinMax::New( |
} |
} |
// All comparisons failed, must be NaN. |
- return H_CONSTANT_DOUBLE(base::OS::nan_value()); |
+ return H_CONSTANT_DOUBLE(std::numeric_limits<double>::quiet_NaN()); |
} |
} |
return new(zone) HMathMinMax(context, left, right, op); |