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

Side by Side Diff: src/strtod.cc

Issue 1297583002: Remove grab-bag includes of v8.h from several files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-includes-heap-1
Patch Set: Fix Windows compilation. Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/strtod.h ('k') | src/utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/strtod.h"
6
5 #include <stdarg.h> 7 #include <stdarg.h>
6 #include <cmath> 8 #include <cmath>
7 9
8 #include "src/v8.h"
9
10 #include "src/bignum.h" 10 #include "src/bignum.h"
11 #include "src/cached-powers.h" 11 #include "src/cached-powers.h"
12 #include "src/double.h" 12 #include "src/double.h"
13 #include "src/globals.h" 13 #include "src/globals.h"
14 #include "src/strtod.h"
15 #include "src/utils.h" 14 #include "src/utils.h"
16 15
17 namespace v8 { 16 namespace v8 {
18 namespace internal { 17 namespace internal {
19 18
20 // 2^53 = 9007199254740992. 19 // 2^53 = 9007199254740992.
21 // Any integer with at most 15 decimal digits will hence fit into a double 20 // Any integer with at most 15 decimal digits will hence fit into a double
22 // (which has a 53bit significand) without loss of precision. 21 // (which has a 53bit significand) without loss of precision.
23 static const int kMaxExactDoubleIntegerDecimalDigits = 15; 22 static const int kMaxExactDoubleIntegerDecimalDigits = 15;
24 // 2^64 = 18446744073709551616 > 10^19 23 // 2^64 = 18446744073709551616 > 10^19
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 double guess; 413 double guess;
415 if (DoubleStrtod(trimmed, exponent, &guess) || 414 if (DoubleStrtod(trimmed, exponent, &guess) ||
416 DiyFpStrtod(trimmed, exponent, &guess)) { 415 DiyFpStrtod(trimmed, exponent, &guess)) {
417 return guess; 416 return guess;
418 } 417 }
419 return BignumStrtod(trimmed, exponent, guess); 418 return BignumStrtod(trimmed, exponent, guess);
420 } 419 }
421 420
422 } // namespace internal 421 } // namespace internal
423 } // namespace v8 422 } // namespace v8
OLDNEW
« no previous file with comments | « src/strtod.h ('k') | src/utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698