Revision f230a1cf deps/v8/src/conversions.cc
deps/v8/src/conversions.cc | ||
---|---|---|
31 | 31 |
|
32 | 32 |
#include "conversions-inl.h" |
33 | 33 |
#include "dtoa.h" |
34 |
#include "list-inl.h" |
|
34 | 35 |
#include "strtod.h" |
35 | 36 |
#include "utils.h" |
36 | 37 |
|
... | ... | |
45 | 46 |
|
46 | 47 |
double StringToDouble(UnicodeCache* unicode_cache, |
47 | 48 |
const char* str, int flags, double empty_string_val) { |
48 |
const char* end = str + StrLength(str); |
|
49 |
return InternalStringToDouble(unicode_cache, str, end, flags, |
|
49 |
// We cast to const uint8_t* here to avoid instantiating the |
|
50 |
// InternalStringToDouble() template for const char* as well. |
|
51 |
const uint8_t* start = reinterpret_cast<const uint8_t*>(str); |
|
52 |
const uint8_t* end = start + StrLength(str); |
|
53 |
return InternalStringToDouble(unicode_cache, start, end, flags, |
|
50 | 54 |
empty_string_val); |
51 | 55 |
} |
52 | 56 |
|
... | ... | |
55 | 59 |
Vector<const char> str, |
56 | 60 |
int flags, |
57 | 61 |
double empty_string_val) { |
58 |
const char* end = str.start() + str.length(); |
|
59 |
return InternalStringToDouble(unicode_cache, str.start(), end, flags, |
|
62 |
// We cast to const uint8_t* here to avoid instantiating the |
|
63 |
// InternalStringToDouble() template for const char* as well. |
|
64 |
const uint8_t* start = reinterpret_cast<const uint8_t*>(str.start()); |
|
65 |
const uint8_t* end = start + str.length(); |
|
66 |
return InternalStringToDouble(unicode_cache, start, end, flags, |
|
60 | 67 |
empty_string_val); |
61 | 68 |
} |
62 | 69 |
|
70 |
|
|
63 | 71 |
double StringToDouble(UnicodeCache* unicode_cache, |
64 | 72 |
Vector<const uc16> str, |
65 | 73 |
int flags, |
Also available in: Unified diff