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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "src/base/logging.h" | 9 #include "src/base/logging.h" |
10 #include "src/utils.h" | 10 #include "src/utils.h" |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 TrimZeros(buffer, length, decimal_point); | 375 TrimZeros(buffer, length, decimal_point); |
376 buffer[*length] = '\0'; | 376 buffer[*length] = '\0'; |
377 if ((*length) == 0) { | 377 if ((*length) == 0) { |
378 // The string is empty and the decimal_point thus has no importance. Mimick | 378 // The string is empty and the decimal_point thus has no importance. Mimick |
379 // Gay's dtoa and and set it to -fractional_count. | 379 // Gay's dtoa and and set it to -fractional_count. |
380 *decimal_point = -fractional_count; | 380 *decimal_point = -fractional_count; |
381 } | 381 } |
382 return true; | 382 return true; |
383 } | 383 } |
384 | 384 |
385 } } // namespace v8::internal | 385 } // namespace internal |
| 386 } // namespace v8 |
OLD | NEW |