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

Unified Diff: src/types.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 | « src/strtod.cc ('k') | test/cctest/compiler/codegen-tester.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index fe29d9dbad4cfff80d442e8f4587cfad34223235..c4f1bae5fbcf4d3695a20e1b631e3860727467ee 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -2,10 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <iomanip>
+
#include "src/types.h"
-
-#include <iomanip>
-#include <limits>
#include "src/ostreams.h"
#include "src/types-inl.h"
@@ -82,7 +81,7 @@
DCHECK(this->Is(Number()));
if (this->IsBitset()) return BitsetType::Min(this->AsBitset());
if (this->IsUnion()) {
- double min = +std::numeric_limits<double>::infinity();
+ double min = +V8_INFINITY;
for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) {
min = std::min(min, this->AsUnion()->Get(i)->Min());
}
@@ -100,7 +99,7 @@
DCHECK(this->Is(Number()));
if (this->IsBitset()) return BitsetType::Max(this->AsBitset());
if (this->IsUnion()) {
- double max = -std::numeric_limits<double>::infinity();
+ double max = -V8_INFINITY;
for (int i = 0, n = this->AsUnion()->Length(); i < n; ++i) {
max = std::max(max, this->AsUnion()->Get(i)->Max());
}
@@ -288,7 +287,7 @@
template <class Config>
const typename TypeImpl<Config>::BitsetType::BitsetMin
TypeImpl<Config>::BitsetType::BitsetMins31[] = {
- {kOtherNumber, -std::numeric_limits<double>::infinity()},
+ {kOtherNumber, -V8_INFINITY},
{kOtherSigned32, kMinInt},
{kNegativeSignedSmall, -0x40000000},
{kUnsignedSmall, 0},
@@ -302,7 +301,7 @@
template <class Config>
const typename TypeImpl<Config>::BitsetType::BitsetMin
TypeImpl<Config>::BitsetType::BitsetMins32[] = {
- {kOtherNumber, -std::numeric_limits<double>::infinity()},
+ {kOtherNumber, -V8_INFINITY},
{kNegativeSignedSmall, kMinInt},
{kUnsignedSmall, 0},
{kOtherUnsigned32, 0x80000000},
@@ -354,7 +353,7 @@
const BitsetMin* mins = BitsetMins();
bool mz = SEMANTIC(bits & kMinusZero);
if (BitsetType::Is(mins[BitsetMinsSize()-1].bits, bits)) {
- return +std::numeric_limits<double>::infinity();
+ return +V8_INFINITY;
}
for (size_t i = BitsetMinsSize()-1; i-- > 0; ) {
if (Is(SEMANTIC(mins[i].bits), bits)) {
« no previous file with comments | « src/strtod.cc ('k') | test/cctest/compiler/codegen-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698