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

Unified Diff: test/cctest/compiler/test-typer.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-typer.cc
diff --git a/test/cctest/compiler/test-typer.cc b/test/cctest/compiler/test-typer.cc
index 56a85674e1621cdc5cda4cafe9d77fa8efcd45df..2b9d91af02c017e8477af6602151cf2c831078c3 100644
--- a/test/cctest/compiler/test-typer.cc
+++ b/test/cctest/compiler/test-typer.cc
@@ -32,8 +32,8 @@
integers.push_back(0);
integers.push_back(-1);
integers.push_back(+1);
- integers.push_back(-std::numeric_limits<double>::infinity());
- integers.push_back(+std::numeric_limits<double>::infinity());
+ integers.push_back(-V8_INFINITY);
+ integers.push_back(+V8_INFINITY);
for (int i = 0; i < 5; ++i) {
double x = rng_->NextInt();
integers.push_back(x);
@@ -99,12 +99,9 @@
case 1: return max;
default: break;
}
- if (min == +std::numeric_limits<double>::infinity())
- return +std::numeric_limits<double>::infinity();
- if (max == -std::numeric_limits<double>::infinity())
- return -std::numeric_limits<double>::infinity();
- if (min == -std::numeric_limits<double>::infinity() &&
- max == +std::numeric_limits<double>::infinity()) {
+ if (min == +V8_INFINITY) return +V8_INFINITY;
+ if (max == -V8_INFINITY) return -V8_INFINITY;
+ if (min == -V8_INFINITY && max == +V8_INFINITY) {
return rng_->NextInt() * static_cast<double>(rng_->NextInt());
}
double result = nearbyint(min + (max - min) * rng_->NextDouble());
« no previous file with comments | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698