Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: src/hydrogen-instructions.cc

Issue 864803002: Remove deprecated v8::base::OS::nan_value(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix invalid test expectation. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/json-parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/hydrogen.cc ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698