| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/bignum-dtoa.h" |
| 6 |
| 5 #include <cmath> | 7 #include <cmath> |
| 6 | 8 |
| 7 #include "src/base/logging.h" | 9 #include "src/base/logging.h" |
| 8 #include "src/utils.h" | |
| 9 | |
| 10 #include "src/bignum-dtoa.h" | |
| 11 | |
| 12 #include "src/bignum.h" | 10 #include "src/bignum.h" |
| 13 #include "src/double.h" | 11 #include "src/double.h" |
| 12 #include "src/utils.h" |
| 14 | 13 |
| 15 namespace v8 { | 14 namespace v8 { |
| 16 namespace internal { | 15 namespace internal { |
| 17 | 16 |
| 18 static int NormalizedExponent(uint64_t significand, int exponent) { | 17 static int NormalizedExponent(uint64_t significand, int exponent) { |
| 19 DCHECK(significand != 0); | 18 DCHECK(significand != 0); |
| 20 while ((significand & Double::kHiddenBit) == 0) { | 19 while ((significand & Double::kHiddenBit) == 0) { |
| 21 significand = significand << 1; | 20 significand = significand << 1; |
| 22 exponent = exponent - 1; | 21 exponent = exponent - 1; |
| 23 } | 22 } |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 delta_plus->AssignBignum(*delta_minus); | 626 delta_plus->AssignBignum(*delta_minus); |
| 628 } else { | 627 } else { |
| 629 delta_minus->Times10(); | 628 delta_minus->Times10(); |
| 630 delta_plus->Times10(); | 629 delta_plus->Times10(); |
| 631 } | 630 } |
| 632 } | 631 } |
| 633 } | 632 } |
| 634 | 633 |
| 635 } // namespace internal | 634 } // namespace internal |
| 636 } // namespace v8 | 635 } // namespace v8 |
| OLD | NEW |