| 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 "src/base/logging.h" | 10 #include "src/base/logging.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 inline bool IsUint32Double(double value); | 168 inline bool IsUint32Double(double value); |
| 169 | 169 |
| 170 // Convert from Number object to C integer. | 170 // Convert from Number object to C integer. |
| 171 inline int32_t NumberToInt32(Object* number); | 171 inline int32_t NumberToInt32(Object* number); |
| 172 inline uint32_t NumberToUint32(Object* number); | 172 inline uint32_t NumberToUint32(Object* number); |
| 173 inline int64_t NumberToInt64(Object* number); | 173 inline int64_t NumberToInt64(Object* number); |
| 174 | 174 |
| 175 double StringToDouble(UnicodeCache* unicode_cache, Handle<String> string, | 175 double StringToDouble(UnicodeCache* unicode_cache, Handle<String> string, |
| 176 int flags, double empty_string_val = 0.0); | 176 int flags, double empty_string_val = 0.0); |
| 177 | 177 |
| 178 | 178 inline bool TryNumberToSize(Object* number, size_t* result); |
| 179 inline bool TryNumberToSize(Isolate* isolate, Object* number, size_t* result); | |
| 180 | |
| 181 | 179 |
| 182 // Converts a number into size_t. | 180 // Converts a number into size_t. |
| 183 inline size_t NumberToSize(Isolate* isolate, Object* number); | 181 inline size_t NumberToSize(Object* number); |
| 184 | |
| 185 | 182 |
| 186 // returns DoubleToString(StringToDouble(string)) == string | 183 // returns DoubleToString(StringToDouble(string)) == string |
| 187 bool IsSpecialIndex(UnicodeCache* unicode_cache, String* string); | 184 bool IsSpecialIndex(UnicodeCache* unicode_cache, String* string); |
| 188 | 185 |
| 189 } // namespace internal | 186 } // namespace internal |
| 190 } // namespace v8 | 187 } // namespace v8 |
| 191 | 188 |
| 192 #endif // V8_CONVERSIONS_H_ | 189 #endif // V8_CONVERSIONS_H_ |
| OLD | NEW |