| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 ALLOW_HEX = 1, | 115 ALLOW_HEX = 1, |
| 116 ALLOW_OCTAL = 2, | 116 ALLOW_OCTAL = 2, |
| 117 ALLOW_IMPLICIT_OCTAL = 4, | 117 ALLOW_IMPLICIT_OCTAL = 4, |
| 118 ALLOW_BINARY = 8, | 118 ALLOW_BINARY = 8, |
| 119 ALLOW_TRAILING_JUNK = 16 | 119 ALLOW_TRAILING_JUNK = 16 |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 | 122 |
| 123 // Converts a string into a double value according to ECMA-262 9.3.1 | 123 // Converts a string into a double value according to ECMA-262 9.3.1 |
| 124 double StringToDouble(UnicodeCache* unicode_cache, | 124 double StringToDouble(UnicodeCache* unicode_cache, |
| 125 Vector<const char> str, | 125 Vector<const uint8_t> str, |
| 126 int flags, | 126 int flags, |
| 127 double empty_string_val = 0); | 127 double empty_string_val = 0); |
| 128 double StringToDouble(UnicodeCache* unicode_cache, | 128 double StringToDouble(UnicodeCache* unicode_cache, |
| 129 Vector<const uc16> str, | 129 Vector<const uc16> str, |
| 130 int flags, | 130 int flags, |
| 131 double empty_string_val = 0); | 131 double empty_string_val = 0); |
| 132 // This version expects a zero-terminated character array. | 132 // This version expects a zero-terminated character array. |
| 133 double StringToDouble(UnicodeCache* unicode_cache, | 133 double StringToDouble(UnicodeCache* unicode_cache, |
| 134 const char* str, | 134 const char* str, |
| 135 int flags, | 135 int flags, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 149 // Additional number to string conversions for the number type. | 149 // Additional number to string conversions for the number type. |
| 150 // The caller is responsible for calling free on the returned pointer. | 150 // The caller is responsible for calling free on the returned pointer. |
| 151 char* DoubleToFixedCString(double value, int f); | 151 char* DoubleToFixedCString(double value, int f); |
| 152 char* DoubleToExponentialCString(double value, int f); | 152 char* DoubleToExponentialCString(double value, int f); |
| 153 char* DoubleToPrecisionCString(double value, int f); | 153 char* DoubleToPrecisionCString(double value, int f); |
| 154 char* DoubleToRadixCString(double value, int radix); | 154 char* DoubleToRadixCString(double value, int radix); |
| 155 | 155 |
| 156 } } // namespace v8::internal | 156 } } // namespace v8::internal |
| 157 | 157 |
| 158 #endif // V8_CONVERSIONS_H_ | 158 #endif // V8_CONVERSIONS_H_ |
| OLD | NEW |