| 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_UNICODE_H_ | 5 #ifndef V8_UNICODE_H_ |
| 6 #define V8_UNICODE_H_ | 6 #define V8_UNICODE_H_ |
| 7 | 7 |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 #include "src/utils.h" | 10 #include "src/utils.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // Excludes non-characters from the set of valid code points. | 166 // Excludes non-characters from the set of valid code points. |
| 167 static inline bool IsValidCharacter(uchar c); | 167 static inline bool IsValidCharacter(uchar c); |
| 168 | 168 |
| 169 static bool Validate(const byte* str, size_t length); | 169 static bool Validate(const byte* str, size_t length); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 struct Uppercase { | 172 struct Uppercase { |
| 173 static bool Is(uchar c); | 173 static bool Is(uchar c); |
| 174 }; | 174 }; |
| 175 struct Lowercase { | |
| 176 static bool Is(uchar c); | |
| 177 }; | |
| 178 struct Letter { | 175 struct Letter { |
| 179 static bool Is(uchar c); | 176 static bool Is(uchar c); |
| 180 }; | 177 }; |
| 178 #ifndef V8_INTL_START |
| 181 struct V8_EXPORT_PRIVATE ID_Start { | 179 struct V8_EXPORT_PRIVATE ID_Start { |
| 182 static bool Is(uchar c); | 180 static bool Is(uchar c); |
| 183 }; | 181 }; |
| 184 struct V8_EXPORT_PRIVATE ID_Continue { | 182 struct V8_EXPORT_PRIVATE ID_Continue { |
| 185 static bool Is(uchar c); | 183 static bool Is(uchar c); |
| 186 }; | 184 }; |
| 187 struct V8_EXPORT_PRIVATE WhiteSpace { | 185 struct V8_EXPORT_PRIVATE WhiteSpace { |
| 188 static bool Is(uchar c); | 186 static bool Is(uchar c); |
| 189 }; | 187 }; |
| 190 struct V8_EXPORT_PRIVATE LineTerminator { | 188 struct V8_EXPORT_PRIVATE LineTerminator { |
| 191 static bool Is(uchar c); | 189 static bool Is(uchar c); |
| 192 }; | 190 }; |
| 191 #endif // !V8_INTL_SUPPORT |
| 193 struct ToLowercase { | 192 struct ToLowercase { |
| 194 static const int kMaxWidth = 3; | 193 static const int kMaxWidth = 3; |
| 195 static const bool kIsToLower = true; | 194 static const bool kIsToLower = true; |
| 196 static int Convert(uchar c, | 195 static int Convert(uchar c, |
| 197 uchar n, | 196 uchar n, |
| 198 uchar* result, | 197 uchar* result, |
| 199 bool* allow_caching_ptr); | 198 bool* allow_caching_ptr); |
| 200 }; | 199 }; |
| 201 struct ToUppercase { | 200 struct ToUppercase { |
| 202 static const int kMaxWidth = 3; | 201 static const int kMaxWidth = 3; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 224 static const int kMaxWidth = 1; | 223 static const int kMaxWidth = 1; |
| 225 static int Convert(uchar c, | 224 static int Convert(uchar c, |
| 226 uchar n, | 225 uchar n, |
| 227 uchar* result, | 226 uchar* result, |
| 228 bool* allow_caching_ptr); | 227 bool* allow_caching_ptr); |
| 229 }; | 228 }; |
| 230 | 229 |
| 231 } // namespace unibrow | 230 } // namespace unibrow |
| 232 | 231 |
| 233 #endif // V8_UNICODE_H_ | 232 #endif // V8_UNICODE_H_ |
| OLD | NEW |