Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: src/unicode.h

Issue 2331303002: Use ICU for ID_START and ID_CONTINUE for Unicode 9 data (Closed)
Patch Set: undo the speculative fix to see if it's really necessary Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« src/char-predicates.h ('K') | « src/char-predicates.cc ('k') | src/unicode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698