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 #ifndef V8_CONVERSIONS_H_ | 5 #ifndef V8_CONVERSIONS_H_ |
6 #define V8_CONVERSIONS_H_ | 6 #define V8_CONVERSIONS_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "checks.h" | 10 #include "src/checks.h" |
11 #include "handles.h" | 11 #include "src/handles.h" |
12 #include "objects.h" | 12 #include "src/objects.h" |
13 #include "utils.h" | 13 #include "src/utils.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 class UnicodeCache; | 18 class UnicodeCache; |
19 | 19 |
20 // Maximum number of significant digits in decimal representation. | 20 // Maximum number of significant digits in decimal representation. |
21 // The longest possible double in decimal representation is | 21 // The longest possible double in decimal representation is |
22 // (2^53 - 1) * 2 ^ -1074 that is (2 ^ 53 - 1) * 5 ^ 1074 / 10 ^ 1074 | 22 // (2^53 - 1) * 2 ^ -1074 that is (2 ^ 53 - 1) * 5 ^ 1074 / 10 ^ 1074 |
23 // (768 digits). If we parse a number whose first digits are equal to a | 23 // (768 digits). If we parse a number whose first digits are equal to a |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 Object* number) { | 223 Object* number) { |
224 size_t result = 0; | 224 size_t result = 0; |
225 bool is_valid = TryNumberToSize(isolate, number, &result); | 225 bool is_valid = TryNumberToSize(isolate, number, &result); |
226 CHECK(is_valid); | 226 CHECK(is_valid); |
227 return result; | 227 return result; |
228 } | 228 } |
229 | 229 |
230 } } // namespace v8::internal | 230 } } // namespace v8::internal |
231 | 231 |
232 #endif // V8_CONVERSIONS_H_ | 232 #endif // V8_CONVERSIONS_H_ |
OLD | NEW |