1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // This file was generated at 2014-10-08 15:25:47.940335
6
7 #include "src/unicode.h"
8 #include "src/unicode-inl.h"
9 #include <stdio.h>
10 #include <stdlib.h>
11
12 #ifdef V8_INTL_SUPPORT
13 #include "unicode/uchar.h"
14 #endif
15
16 namespace unibrow {
17
18 static const int kStartBit = (1 << 30);
19 static const int kChunkBits = (1 << 13);
20 static const uchar kSentinel = static_cast<uchar>(-1);
21
22 /**
23 * \file
24 * Implementations of functions for working with Unicode.
25 */
26
27 typedef signed short int16_t; // NOLINT
28 typedef unsigned short uint16_t; // NOLINT
29 typedef int int32_t; // NOLINT
30
31
32 // All access to the character table should go through this function.
33 template <int D>
TableGet(const int32_t * table,int index)34 static inline uchar TableGet(const int32_t* table, int index) {
35 return table[D * index];
36 }
37
38
GetEntry(int32_t entry)39 static inline uchar GetEntry(int32_t entry) {
40 return entry & (kStartBit - 1);
41 }
42
IsStart(int32_t entry)43 static inline bool IsStart(int32_t entry) {
44 return (entry & kStartBit) != 0;
45 }
46
47 #ifndef V8_INTL_SUPPORT
48 /**
49 * Look up a character in the Unicode table using a mix of binary and
50 * interpolation search. For a uniformly distributed array
51 * interpolation search beats binary search by a wide margin. However,
52 * in this case interpolation search degenerates because of some very
53 * high values in the lower end of the table so this function uses a
54 * combination. The average number of steps to look up the information
55 * about a character is around 10, slightly higher if there is no
56 * information available about the character.
57 */
LookupPredicate(const int32_t * table,uint16_t size,uchar chr)58 static bool LookupPredicate(const int32_t* table, uint16_t size, uchar chr) {
59 static const int kEntryDist = 1;
60 uint16_t value = chr & (kChunkBits - 1);
61 unsigned int low = 0;
62 unsigned int high = size - 1;
63 while (high != low) {
64 unsigned int mid = low + ((high - low) >> 1);
65 uchar current_value = GetEntry(TableGet<kEntryDist>(table, mid));
66 // If we've found an entry less than or equal to this one, and the
67 // next one is not also less than this one, we've arrived.
68 if ((current_value <= value) &&
69 (mid + 1 == size ||
70 GetEntry(TableGet<kEntryDist>(table, mid + 1)) > value)) {
71 low = mid;
72 break;
73 } else if (current_value < value) {
74 low = mid + 1;
75 } else if (current_value > value) {
76 // If we've just checked the bottom-most value and it's not
77 // the one we're looking for, we're done.
78 if (mid == 0) break;
79 high = mid - 1;
80 }
81 }
82 int32_t field = TableGet<kEntryDist>(table, low);
83 uchar entry = GetEntry(field);
84 bool is_start = IsStart(field);
85 return (entry == value) || (entry < value && is_start);
86 }
87 #endif // !V8_INTL_SUPPORT
88
89 template <int kW>
90 struct MultiCharacterSpecialCase {
91 static const uchar kEndOfEncoding = kSentinel;
92 uchar chars[kW];
93 };
94
95 // Look up the mapping for the given character in the specified table,
96 // which is of the specified length and uses the specified special case
97 // mapping for multi-char mappings. The next parameter is the character
98 // following the one to map. The result will be written in to the result
99 // buffer and the number of characters written will be returned. Finally,
100 // if the allow_caching_ptr is non-null then false will be stored in
101 // it if the result contains multiple characters or depends on the
102 // context.
103 // If ranges are linear, a match between a start and end point is
104 // offset by the distance between the match and the start. Otherwise
105 // the result is the same as for the start point on the entire range.
106 template <bool ranges_are_linear, int kW>
LookupMapping(const int32_t * table,uint16_t size,const MultiCharacterSpecialCase<kW> * multi_chars,uchar chr,uchar next,uchar * result,bool * allow_caching_ptr)107 static int LookupMapping(const int32_t* table,
108 uint16_t size,
109 const MultiCharacterSpecialCase<kW>* multi_chars,
110 uchar chr,
111 uchar next,
112 uchar* result,
113 bool* allow_caching_ptr) {
114 static const int kEntryDist = 2;
115 uint16_t key = chr & (kChunkBits - 1);
116 uint16_t chunk_start = chr - key;
117 unsigned int low = 0;
118 unsigned int high = size - 1;
119 while (high != low) {
120 unsigned int mid = low + ((high - low) >> 1);
121 uchar current_value = GetEntry(TableGet<kEntryDist>(table, mid));
122 // If we've found an entry less than or equal to this one, and the next one
123 // is not also less than this one, we've arrived.
124 if ((current_value <= key) &&
125 (mid + 1 == size ||
126 GetEntry(TableGet<kEntryDist>(table, mid + 1)) > key)) {
127 low = mid;
128 break;
129 } else if (current_value < key) {
130 low = mid + 1;
131 } else if (current_value > key) {
132 // If we've just checked the bottom-most value and it's not
133 // the one we're looking for, we're done.
134 if (mid == 0) break;
135 high = mid - 1;
136 }
137 }
138 int32_t field = TableGet<kEntryDist>(table, low);
139 uchar entry = GetEntry(field);
140 bool is_start = IsStart(field);
141 bool found = (entry == key) || (entry < key && is_start);
142 if (found) {
143 int32_t value = table[2 * low + 1];
144 if (value == 0) {
145 // 0 means not present
146 return 0;
147 } else if ((value & 3) == 0) {
148 // Low bits 0 means a constant offset from the given character.
149 if (ranges_are_linear) {
150 result[0] = chr + (value >> 2);
151 } else {
152 result[0] = entry + chunk_start + (value >> 2);
153 }
154 return 1;
155 } else if ((value & 3) == 1) {
156 // Low bits 1 means a special case mapping
157 if (allow_caching_ptr) *allow_caching_ptr = false;
158 const MultiCharacterSpecialCase<kW>& mapping = multi_chars[value >> 2];
159 int length = 0;
160 for (length = 0; length < kW; length++) {
161 uchar mapped = mapping.chars[length];
162 if (mapped == MultiCharacterSpecialCase<kW>::kEndOfEncoding) break;
163 if (ranges_are_linear) {
164 result[length] = mapped + (key - entry);
165 } else {
166 result[length] = mapped;
167 }
168 }
169 return length;
170 } else {
171 // Low bits 2 means a really really special case
172 if (allow_caching_ptr) *allow_caching_ptr = false;
173 // The cases of this switch are defined in unicode.py in the
174 // really_special_cases mapping.
175 switch (value >> 2) {
176 case 1:
177 // Really special case 1: upper case sigma. This letter
178 // converts to two different lower case sigmas depending on
179 // whether or not it occurs at the end of a word.
180 if (next != 0 && Letter::Is(next)) {
181 result[0] = 0x03C3;
182 } else {
183 result[0] = 0x03C2;
184 }
185 return 1;
186 default:
187 return 0;
188 }
189 return -1;
190 }
191 } else {
192 return 0;
193 }
194 }
195
196 // This method decodes an UTF-8 value according to RFC 3629 and
197 // https://encoding.spec.whatwg.org/#utf-8-decoder .
CalculateValue(const byte * str,size_t max_length,size_t * cursor)198 uchar Utf8::CalculateValue(const byte* str, size_t max_length, size_t* cursor) {
199 DCHECK_GT(max_length, 0);
200 DCHECK_GT(str[0], kMaxOneByteChar);
201
202 State state = State::kAccept;
203 Utf8IncrementalBuffer buffer = 0;
204 uchar t;
205
206 size_t i = 0;
207 do {
208 t = ValueOfIncremental(str[i], &i, &state, &buffer);
209 } while (i < max_length && t == kIncomplete);
210
211 *cursor += i;
212 return (state == State::kAccept) ? t : kBadChar;
213 }
214
215 // Decodes UTF-8 bytes incrementally, allowing the decoding of bytes as they
216 // stream in. This **must** be followed by a call to ValueOfIncrementalFinish
217 // when the stream is complete, to ensure incomplete sequences are handled.
ValueOfIncremental(byte next,size_t * cursor,State * state,Utf8IncrementalBuffer * buffer)218 uchar Utf8::ValueOfIncremental(byte next, size_t* cursor, State* state,
219 Utf8IncrementalBuffer* buffer) {
220 DCHECK_NOT_NULL(buffer);
221 State old_state = *state;
222 *cursor += 1;
223
224 if (V8_LIKELY(next <= kMaxOneByteChar && old_state == State::kAccept)) {
225 DCHECK_EQ(0u, *buffer);
226 return static_cast<uchar>(next);
227 }
228
229 // So we're at the lead byte of a 2/3/4 sequence, or we're at a continuation
230 // char in that sequence.
231 Utf8DfaDecoder::Decode(next, state, buffer);
232
233 switch (*state) {
234 case State::kAccept: {
235 uchar t = *buffer;
236 *buffer = 0;
237 return t;
238 }
239
240 case State::kReject:
241 *state = State::kAccept;
242 *buffer = 0;
243
244 // If we hit a bad byte, we need to determine if we were trying to start
245 // a sequence or continue one. If we were trying to start a sequence,
246 // that means it's just an invalid lead byte and we need to continue to
247 // the next (which we already did above). If we were already in a
248 // sequence, we need to reprocess this same byte after resetting to the
249 // initial state.
250 if (old_state != State::kAccept) {
251 // We were trying to continue a sequence, so let's reprocess this byte
252 // next time.
253 *cursor -= 1;
254 }
255 return kBadChar;
256
257 default:
258 return kIncomplete;
259 }
260 }
261
262 // Finishes the incremental decoding, ensuring that if an unfinished sequence
263 // is left that it is replaced by a replacement char.
ValueOfIncrementalFinish(State * state)264 uchar Utf8::ValueOfIncrementalFinish(State* state) {
265 if (*state == State::kAccept) {
266 return kBufferEmpty;
267 } else {
268 DCHECK_GT(*state, State::kAccept);
269 *state = State::kAccept;
270 return kBadChar;
271 }
272 }
273
ValidateEncoding(const byte * bytes,size_t length)274 bool Utf8::ValidateEncoding(const byte* bytes, size_t length) {
275 State state = State::kAccept;
276 Utf8IncrementalBuffer throw_away = 0;
277 for (size_t i = 0; i < length && state != State::kReject; i++) {
278 Utf8DfaDecoder::Decode(bytes[i], &state, &throw_away);
279 }
280 return state == State::kAccept;
281 }
282
283 // Uppercase: point.category == 'Lu'
284 // TODO(jshin): Check if it's ok to exclude Other_Uppercase characters.
285 #ifdef V8_INTL_SUPPORT
Is(uchar c)286 bool Uppercase::Is(uchar c) { return static_cast<bool>(u_isupper(c)); }
287 #else
288 static const uint16_t kUppercaseTable0Size = 455;
289 static const int32_t kUppercaseTable0[455] = {
290 1073741889, 90, 1073742016, 214,
291 1073742040, 222, 256, 258, // NOLINT
292 260, 262, 264, 266,
293 268, 270, 272, 274, // NOLINT
294 276, 278, 280, 282,
295 284, 286, 288, 290, // NOLINT
296 292, 294, 296, 298,
297 300, 302, 304, 306, // NOLINT
298 308, 310, 313, 315,
299 317, 319, 321, 323, // NOLINT
300 325, 327, 330, 332,
301 334, 336, 338, 340, // NOLINT
302 342, 344, 346, 348,
303 350, 352, 354, 356, // NOLINT
304 358, 360, 362, 364,
305 366, 368, 370, 372, // NOLINT
306 374, 1073742200, 377, 379,
307 381, 1073742209, 386, 388, // NOLINT
308 1073742214, 391, 1073742217, 395,
309 1073742222, 401, 1073742227, 404, // NOLINT
310 1073742230, 408, 1073742236, 413,
311 1073742239, 416, 418, 420, // NOLINT
312 1073742246, 423, 425, 428,
313 1073742254, 431, 1073742257, 435, // NOLINT
314 437, 1073742263, 440, 444,
315 452, 455, 458, 461, // NOLINT
316 463, 465, 467, 469,
317 471, 473, 475, 478, // NOLINT
318 480, 482, 484, 486,
319 488, 490, 492, 494, // NOLINT
320 497, 500, 1073742326, 504,
321 506, 508, 510, 512, // NOLINT
322 514, 516, 518, 520,
323 522, 524, 526, 528, // NOLINT
324 530, 532, 534, 536,
325 538, 540, 542, 544, // NOLINT
326 546, 548, 550, 552,
327 554, 556, 558, 560, // NOLINT
328 562, 1073742394, 571, 1073742397,
329 574, 577, 1073742403, 582, // NOLINT
330 584, 586, 588, 590,
331 880, 882, 886, 895, // NOLINT
332 902, 1073742728, 906, 908,
333 1073742734, 911, 1073742737, 929, // NOLINT
334 1073742755, 939, 975, 1073742802,
335 980, 984, 986, 988, // NOLINT
336 990, 992, 994, 996,
337 998, 1000, 1002, 1004, // NOLINT
338 1006, 1012, 1015, 1073742841,
339 1018, 1073742845, 1071, 1120, // NOLINT
340 1122, 1124, 1126, 1128,
341 1130, 1132, 1134, 1136, // NOLINT
342 1138, 1140, 1142, 1144,
343 1146, 1148, 1150, 1152, // NOLINT
344 1162, 1164, 1166, 1168,
345 1170, 1172, 1174, 1176, // NOLINT
346 1178, 1180, 1182, 1184,
347 1186, 1188, 1190, 1192, // NOLINT
348 1194, 1196, 1198, 1200,
349 1202, 1204, 1206, 1208, // NOLINT
350 1210, 1212, 1214, 1073743040,
351 1217, 1219, 1221, 1223, // NOLINT
352 1225, 1227, 1229, 1232,
353 1234, 1236, 1238, 1240, // NOLINT
354 1242, 1244, 1246, 1248,
355 1250, 1252, 1254, 1256, // NOLINT
356 1258, 1260, 1262, 1264,
357 1266, 1268, 1270, 1272, // NOLINT
358 1274, 1276, 1278, 1280,
359 1282, 1284, 1286, 1288, // NOLINT
360 1290, 1292, 1294, 1296,
361 1298, 1300, 1302, 1304, // NOLINT
362 1306, 1308, 1310, 1312,
363 1314, 1316, 1318, 1320, // NOLINT
364 1322, 1324, 1326, 1073743153,
365 1366, 1073746080, 4293, 4295, // NOLINT
366 4301, 7680, 7682, 7684,
367 7686, 7688, 7690, 7692, // NOLINT
368 7694, 7696, 7698, 7700,
369 7702, 7704, 7706, 7708, // NOLINT
370 7710, 7712, 7714, 7716,
371 7718, 7720, 7722, 7724, // NOLINT
372 7726, 7728, 7730, 7732,
373 7734, 7736, 7738, 7740, // NOLINT
374 7742, 7744, 7746, 7748,
375 7750, 7752, 7754, 7756, // NOLINT
376 7758, 7760, 7762, 7764,
377 7766, 7768, 7770, 7772, // NOLINT
378 7774, 7776, 7778, 7780,
379 7782, 7784, 7786, 7788, // NOLINT
380 7790, 7792, 7794, 7796,
381 7798, 7800, 7802, 7804, // NOLINT
382 7806, 7808, 7810, 7812,
383 7814, 7816, 7818, 7820, // NOLINT
384 7822, 7824, 7826, 7828,
385 7838, 7840, 7842, 7844, // NOLINT
386 7846, 7848, 7850, 7852,
387 7854, 7856, 7858, 7860, // NOLINT
388 7862, 7864, 7866, 7868,
389 7870, 7872, 7874, 7876, // NOLINT
390 7878, 7880, 7882, 7884,
391 7886, 7888, 7890, 7892, // NOLINT
392 7894, 7896, 7898, 7900,
393 7902, 7904, 7906, 7908, // NOLINT
394 7910, 7912, 7914, 7916,
395 7918, 7920, 7922, 7924, // NOLINT
396 7926, 7928, 7930, 7932,
397 7934, 1073749768, 7951, 1073749784, // NOLINT
398 7965, 1073749800, 7983, 1073749816,
399 7999, 1073749832, 8013, 8025, // NOLINT
400 8027, 8029, 8031, 1073749864,
401 8047, 1073749944, 8123, 1073749960, // NOLINT
402 8139, 1073749976, 8155, 1073749992,
403 8172, 1073750008, 8187}; // NOLINT
404 static const uint16_t kUppercaseTable1Size = 86;
405 static const int32_t kUppercaseTable1[86] = {
406 258, 263, 1073742091, 269, 1073742096, 274, 277, 1073742105, // NOLINT
407 285, 292, 294, 296, 1073742122, 301, 1073742128, 307, // NOLINT
408 1073742142, 319, 325, 387, 1073744896, 3118, 3168, 1073744994, // NOLINT
409 3172, 3175, 3177, 3179, 1073745005, 3184, 3186, 3189, // NOLINT
410 1073745022, 3200, 3202, 3204, 3206, 3208, 3210, 3212, // NOLINT
411 3214, 3216, 3218, 3220, 3222, 3224, 3226, 3228, // NOLINT
412 3230, 3232, 3234, 3236, 3238, 3240, 3242, 3244, // NOLINT
413 3246, 3248, 3250, 3252, 3254, 3256, 3258, 3260, // NOLINT
414 3262, 3264, 3266, 3268, 3270, 3272, 3274, 3276, // NOLINT
415 3278, 3280, 3282, 3284, 3286, 3288, 3290, 3292, // NOLINT
416 3294, 3296, 3298, 3307, 3309, 3314 }; // NOLINT
417 static const uint16_t kUppercaseTable5Size = 101;
418 static const int32_t kUppercaseTable5[101] = {
419 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1614, // NOLINT
420 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, // NOLINT
421 1632, 1634, 1636, 1638, 1640, 1642, 1644, 1664, // NOLINT
422 1666, 1668, 1670, 1672, 1674, 1676, 1678, 1680, // NOLINT
423 1682, 1684, 1686, 1688, 1690, 1826, 1828, 1830, // NOLINT
424 1832, 1834, 1836, 1838, 1842, 1844, 1846, 1848, // NOLINT
425 1850, 1852, 1854, 1856, 1858, 1860, 1862, 1864, // NOLINT
426 1866, 1868, 1870, 1872, 1874, 1876, 1878, 1880, // NOLINT
427 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896, // NOLINT
428 1898, 1900, 1902, 1913, 1915, 1073743741, 1918, 1920, // NOLINT
429 1922, 1924, 1926, 1931, 1933, 1936, 1938, 1942, // NOLINT
430 1944, 1946, 1948, 1950, 1952, 1954, 1956, 1958, // NOLINT
431 1960, 1073743786, 1965, 1073743792, 1969}; // NOLINT
432 static const uint16_t kUppercaseTable7Size = 2;
433 static const int32_t kUppercaseTable7[2] = {
434 1073749793, 7994 }; // NOLINT
Is(uchar c)435 bool Uppercase::Is(uchar c) {
436 int chunk_index = c >> 13;
437 switch (chunk_index) {
438 case 0: return LookupPredicate(kUppercaseTable0,
439 kUppercaseTable0Size,
440 c);
441 case 1: return LookupPredicate(kUppercaseTable1,
442 kUppercaseTable1Size,
443 c);
444 case 5: return LookupPredicate(kUppercaseTable5,
445 kUppercaseTable5Size,
446 c);
447 case 7: return LookupPredicate(kUppercaseTable7,
448 kUppercaseTable7Size,
449 c);
450 default: return false;
451 }
452 }
453 #endif // V8_INTL_SUPPORT
454
455 // Letter: point.category in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl']
456 #ifdef V8_INTL_SUPPORT
Is(uchar c)457 bool Letter::Is(uchar c) { return static_cast<bool>(u_isalpha(c)); }
458 #else
459 static const uint16_t kLetterTable0Size = 431;
460 static const int32_t kLetterTable0[431] = {
461 1073741889, 90, 1073741921, 122,
462 170, 181, 186, 1073742016, // NOLINT
463 214, 1073742040, 246, 1073742072,
464 705, 1073742534, 721, 1073742560, // NOLINT
465 740, 748, 750, 1073742704,
466 884, 1073742710, 887, 1073742714, // NOLINT
467 893, 895, 902, 1073742728,
468 906, 908, 1073742734, 929, // NOLINT
469 1073742755, 1013, 1073742839, 1153,
470 1073742986, 1327, 1073743153, 1366, // NOLINT
471 1369, 1073743201, 1415, 1073743312,
472 1514, 1073743344, 1522, 1073743392, // NOLINT
473 1610, 1073743470, 1647, 1073743473,
474 1747, 1749, 1073743589, 1766, // NOLINT
475 1073743598, 1775, 1073743610, 1788,
476 1791, 1808, 1073743634, 1839, // NOLINT
477 1073743693, 1957, 1969, 1073743818,
478 2026, 1073743860, 2037, 2042, // NOLINT
479 1073743872, 2069, 2074, 2084,
480 2088, 1073743936, 2136, 1073744032, // NOLINT
481 2226, 1073744132, 2361, 2365,
482 2384, 1073744216, 2401, 1073744241, // NOLINT
483 2432, 1073744261, 2444, 1073744271,
484 2448, 1073744275, 2472, 1073744298, // NOLINT
485 2480, 2482, 1073744310, 2489,
486 2493, 2510, 1073744348, 2525, // NOLINT
487 1073744351, 2529, 1073744368, 2545,
488 1073744389, 2570, 1073744399, 2576, // NOLINT
489 1073744403, 2600, 1073744426, 2608,
490 1073744434, 2611, 1073744437, 2614, // NOLINT
491 1073744440, 2617, 1073744473, 2652,
492 2654, 1073744498, 2676, 1073744517, // NOLINT
493 2701, 1073744527, 2705, 1073744531,
494 2728, 1073744554, 2736, 1073744562, // NOLINT
495 2739, 1073744565, 2745, 2749,
496 2768, 1073744608, 2785, 1073744645, // NOLINT
497 2828, 1073744655, 2832, 1073744659,
498 2856, 1073744682, 2864, 1073744690, // NOLINT
499 2867, 1073744693, 2873, 2877,
500 1073744732, 2909, 1073744735, 2913, // NOLINT
501 2929, 2947, 1073744773, 2954,
502 1073744782, 2960, 1073744786, 2965, // NOLINT
503 1073744793, 2970, 2972, 1073744798,
504 2975, 1073744803, 2980, 1073744808, // NOLINT
505 2986, 1073744814, 3001, 3024,
506 1073744901, 3084, 1073744910, 3088, // NOLINT
507 1073744914, 3112, 1073744938, 3129,
508 3133, 1073744984, 3161, 1073744992, // NOLINT
509 3169, 1073745029, 3212, 1073745038,
510 3216, 1073745042, 3240, 1073745066, // NOLINT
511 3251, 1073745077, 3257, 3261,
512 3294, 1073745120, 3297, 1073745137, // NOLINT
513 3314, 1073745157, 3340, 1073745166,
514 3344, 1073745170, 3386, 3389, // NOLINT
515 3406, 1073745248, 3425, 1073745274,
516 3455, 1073745285, 3478, 1073745306, // NOLINT
517 3505, 1073745331, 3515, 3517,
518 1073745344, 3526, 1073745409, 3632, // NOLINT
519 1073745458, 3635, 1073745472, 3654,
520 1073745537, 3714, 3716, 1073745543, // NOLINT
521 3720, 3722, 3725, 1073745556,
522 3735, 1073745561, 3743, 1073745569, // NOLINT
523 3747, 3749, 3751, 1073745578,
524 3755, 1073745581, 3760, 1073745586, // NOLINT
525 3763, 3773, 1073745600, 3780,
526 3782, 1073745628, 3807, 3840, // NOLINT
527 1073745728, 3911, 1073745737, 3948,
528 1073745800, 3980, 1073745920, 4138, // NOLINT
529 4159, 1073746000, 4181, 1073746010,
530 4189, 4193, 1073746021, 4198, // NOLINT
531 1073746030, 4208, 1073746037, 4225,
532 4238, 1073746080, 4293, 4295, // NOLINT
533 4301, 1073746128, 4346, 1073746172,
534 4680, 1073746506, 4685, 1073746512, // NOLINT
535 4694, 4696, 1073746522, 4701,
536 1073746528, 4744, 1073746570, 4749, // NOLINT
537 1073746576, 4784, 1073746610, 4789,
538 1073746616, 4798, 4800, 1073746626, // NOLINT
539 4805, 1073746632, 4822, 1073746648,
540 4880, 1073746706, 4885, 1073746712, // NOLINT
541 4954, 1073746816, 5007, 1073746848,
542 5108, 1073746945, 5740, 1073747567, // NOLINT
543 5759, 1073747585, 5786, 1073747616,
544 5866, 1073747694, 5880, 1073747712, // NOLINT
545 5900, 1073747726, 5905, 1073747744,
546 5937, 1073747776, 5969, 1073747808, // NOLINT
547 5996, 1073747822, 6000, 1073747840,
548 6067, 6103, 6108, 1073748000, // NOLINT
549 6263, 1073748096, 6312, 6314,
550 1073748144, 6389, 1073748224, 6430, // NOLINT
551 1073748304, 6509, 1073748336, 6516,
552 1073748352, 6571, 1073748417, 6599, // NOLINT
553 1073748480, 6678, 1073748512, 6740,
554 6823, 1073748741, 6963, 1073748805, // NOLINT
555 6987, 1073748867, 7072, 1073748910,
556 7087, 1073748922, 7141, 1073748992, // NOLINT
557 7203, 1073749069, 7247, 1073749082,
558 7293, 1073749225, 7404, 1073749230, // NOLINT
559 7409, 1073749237, 7414, 1073749248,
560 7615, 1073749504, 7957, 1073749784, // NOLINT
561 7965, 1073749792, 8005, 1073749832,
562 8013, 1073749840, 8023, 8025, // NOLINT
563 8027, 8029, 1073749855, 8061,
564 1073749888, 8116, 1073749942, 8124, // NOLINT
565 8126, 1073749954, 8132, 1073749958,
566 8140, 1073749968, 8147, 1073749974, // NOLINT
567 8155, 1073749984, 8172, 1073750002,
568 8180, 1073750006, 8188}; // NOLINT
569 static const uint16_t kLetterTable1Size = 87;
570 static const int32_t kLetterTable1[87] = {
571 113, 127, 1073741968, 156, 258, 263, 1073742090, 275, // NOLINT
572 277, 1073742105, 285, 292, 294, 296, 1073742122, 301, // NOLINT
573 1073742127, 313, 1073742140, 319, 1073742149, 329, 334, 1073742176, // NOLINT
574 392, 1073744896, 3118, 1073744944, 3166, 1073744992, 3300, 1073745131, // NOLINT
575 3310, 1073745138, 3315, 1073745152, 3365, 3367, 3373, 1073745200, // NOLINT
576 3431, 3439, 1073745280, 3478, 1073745312, 3494, 1073745320, 3502, // NOLINT
577 1073745328, 3510, 1073745336, 3518, 1073745344, 3526, 1073745352, 3534, // NOLINT
578 1073745360, 3542, 1073745368, 3550, 3631, 1073745925, 4103, 1073745953, // NOLINT
579 4137, 1073745969, 4149, 1073745976, 4156, 1073745985, 4246, 1073746077, // NOLINT
580 4255, 1073746081, 4346, 1073746172, 4351, 1073746181, 4397, 1073746225, // NOLINT
581 4494, 1073746336, 4538, 1073746416, 4607, 1073746944, 8191 }; // NOLINT
582 static const uint16_t kLetterTable2Size = 4;
583 static const int32_t kLetterTable2[4] = {
584 1073741824, 3509, 1073745408, 8191 }; // NOLINT
585 static const uint16_t kLetterTable3Size = 2;
586 static const int32_t kLetterTable3[2] = {
587 1073741824, 8191 }; // NOLINT
588 static const uint16_t kLetterTable4Size = 2;
589 static const int32_t kLetterTable4[2] = {
590 1073741824, 8140 }; // NOLINT
591 static const uint16_t kLetterTable5Size = 100;
592 static const int32_t kLetterTable5[100] = {
593 1073741824, 1164, 1073743056, 1277,
594 1073743104, 1548, 1073743376, 1567, // NOLINT
595 1073743402, 1579, 1073743424, 1646,
596 1073743487, 1693, 1073743520, 1775, // NOLINT
597 1073743639, 1823, 1073743650, 1928,
598 1073743755, 1934, 1073743760, 1965, // NOLINT
599 1073743792, 1969, 1073743863, 2049,
600 1073743875, 2053, 1073743879, 2058, // NOLINT
601 1073743884, 2082, 1073743936, 2163,
602 1073744002, 2227, 1073744114, 2295, // NOLINT
603 2299, 1073744138, 2341, 1073744176,
604 2374, 1073744224, 2428, 1073744260, // NOLINT
605 2482, 2511, 1073744352, 2532,
606 1073744358, 2543, 1073744378, 2558, // NOLINT
607 1073744384, 2600, 1073744448, 2626,
608 1073744452, 2635, 1073744480, 2678, // NOLINT
609 2682, 1073744510, 2735, 2737,
610 1073744565, 2742, 1073744569, 2749, // NOLINT
611 2752, 2754, 1073744603, 2781,
612 1073744608, 2794, 1073744626, 2804, // NOLINT
613 1073744641, 2822, 1073744649, 2830,
614 1073744657, 2838, 1073744672, 2854, // NOLINT
615 1073744680, 2862, 1073744688, 2906,
616 1073744732, 2911, 1073744740, 2917, // NOLINT
617 1073744832, 3042, 1073744896, 8191}; // NOLINT
618 static const uint16_t kLetterTable6Size = 6;
619 static const int32_t kLetterTable6[6] = {
620 1073741824, 6051, 1073747888, 6086, 1073747915, 6139 }; // NOLINT
621 static const uint16_t kLetterTable7Size = 48;
622 static const int32_t kLetterTable7[48] = {
623 1073748224, 6765, 1073748592, 6873, 1073748736, 6918, 1073748755, 6935, // NOLINT
624 6941, 1073748767, 6952, 1073748778, 6966, 1073748792, 6972, 6974, // NOLINT
625 1073748800, 6977, 1073748803, 6980, 1073748806, 7089, 1073748947, 7485, // NOLINT
626 1073749328, 7567, 1073749394, 7623, 1073749488, 7675, 1073749616, 7796, // NOLINT
627 1073749622, 7932, 1073749793, 7994, 1073749825, 8026, 1073749862, 8126, // NOLINT
628 1073749954, 8135, 1073749962, 8143, 1073749970, 8151, 1073749978, 8156 }; // NOLINT
Is(uchar c)629 bool Letter::Is(uchar c) {
630 int chunk_index = c >> 13;
631 switch (chunk_index) {
632 case 0: return LookupPredicate(kLetterTable0,
633 kLetterTable0Size,
634 c);
635 case 1: return LookupPredicate(kLetterTable1,
636 kLetterTable1Size,
637 c);
638 case 2: return LookupPredicate(kLetterTable2,
639 kLetterTable2Size,
640 c);
641 case 3: return LookupPredicate(kLetterTable3,
642 kLetterTable3Size,
643 c);
644 case 4: return LookupPredicate(kLetterTable4,
645 kLetterTable4Size,
646 c);
647 case 5: return LookupPredicate(kLetterTable5,
648 kLetterTable5Size,
649 c);
650 case 6: return LookupPredicate(kLetterTable6,
651 kLetterTable6Size,
652 c);
653 case 7: return LookupPredicate(kLetterTable7,
654 kLetterTable7Size,
655 c);
656 default: return false;
657 }
658 }
659 #endif
660
661 #ifndef V8_INTL_SUPPORT
662 // ID_Start: ((point.category in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo',
663 // 'Nl'] or 'Other_ID_Start' in point.properties) and ('Pattern_Syntax' not in
664 // point.properties) and ('Pattern_White_Space' not in point.properties)) or
665 // ('JS_ID_Start' in point.properties)
666
667 static const uint16_t kID_StartTable0Size = 434;
668 static const int32_t kID_StartTable0[434] = {
669 36, 1073741889, 90, 92,
670 95, 1073741921, 122, 170, // NOLINT
671 181, 186, 1073742016, 214,
672 1073742040, 246, 1073742072, 705, // NOLINT
673 1073742534, 721, 1073742560, 740,
674 748, 750, 1073742704, 884, // NOLINT
675 1073742710, 887, 1073742714, 893,
676 895, 902, 1073742728, 906, // NOLINT
677 908, 1073742734, 929, 1073742755,
678 1013, 1073742839, 1153, 1073742986, // NOLINT
679 1327, 1073743153, 1366, 1369,
680 1073743201, 1415, 1073743312, 1514, // NOLINT
681 1073743344, 1522, 1073743392, 1610,
682 1073743470, 1647, 1073743473, 1747, // NOLINT
683 1749, 1073743589, 1766, 1073743598,
684 1775, 1073743610, 1788, 1791, // NOLINT
685 1808, 1073743634, 1839, 1073743693,
686 1957, 1969, 1073743818, 2026, // NOLINT
687 1073743860, 2037, 2042, 1073743872,
688 2069, 2074, 2084, 2088, // NOLINT
689 1073743936, 2136, 1073744032, 2226,
690 1073744132, 2361, 2365, 2384, // NOLINT
691 1073744216, 2401, 1073744241, 2432,
692 1073744261, 2444, 1073744271, 2448, // NOLINT
693 1073744275, 2472, 1073744298, 2480,
694 2482, 1073744310, 2489, 2493, // NOLINT
695 2510, 1073744348, 2525, 1073744351,
696 2529, 1073744368, 2545, 1073744389, // NOLINT
697 2570, 1073744399, 2576, 1073744403,
698 2600, 1073744426, 2608, 1073744434, // NOLINT
699 2611, 1073744437, 2614, 1073744440,
700 2617, 1073744473, 2652, 2654, // NOLINT
701 1073744498, 2676, 1073744517, 2701,
702 1073744527, 2705, 1073744531, 2728, // NOLINT
703 1073744554, 2736, 1073744562, 2739,
704 1073744565, 2745, 2749, 2768, // NOLINT
705 1073744608, 2785, 1073744645, 2828,
706 1073744655, 2832, 1073744659, 2856, // NOLINT
707 1073744682, 2864, 1073744690, 2867,
708 1073744693, 2873, 2877, 1073744732, // NOLINT
709 2909, 1073744735, 2913, 2929,
710 2947, 1073744773, 2954, 1073744782, // NOLINT
711 2960, 1073744786, 2965, 1073744793,
712 2970, 2972, 1073744798, 2975, // NOLINT
713 1073744803, 2980, 1073744808, 2986,
714 1073744814, 3001, 3024, 1073744901, // NOLINT
715 3084, 1073744910, 3088, 1073744914,
716 3112, 1073744938, 3129, 3133, // NOLINT
717 1073744984, 3161, 1073744992, 3169,
718 1073745029, 3212, 1073745038, 3216, // NOLINT
719 1073745042, 3240, 1073745066, 3251,
720 1073745077, 3257, 3261, 3294, // NOLINT
721 1073745120, 3297, 1073745137, 3314,
722 1073745157, 3340, 1073745166, 3344, // NOLINT
723 1073745170, 3386, 3389, 3406,
724 1073745248, 3425, 1073745274, 3455, // NOLINT
725 1073745285, 3478, 1073745306, 3505,
726 1073745331, 3515, 3517, 1073745344, // NOLINT
727 3526, 1073745409, 3632, 1073745458,
728 3635, 1073745472, 3654, 1073745537, // NOLINT
729 3714, 3716, 1073745543, 3720,
730 3722, 3725, 1073745556, 3735, // NOLINT
731 1073745561, 3743, 1073745569, 3747,
732 3749, 3751, 1073745578, 3755, // NOLINT
733 1073745581, 3760, 1073745586, 3763,
734 3773, 1073745600, 3780, 3782, // NOLINT
735 1073745628, 3807, 3840, 1073745728,
736 3911, 1073745737, 3948, 1073745800, // NOLINT
737 3980, 1073745920, 4138, 4159,
738 1073746000, 4181, 1073746010, 4189, // NOLINT
739 4193, 1073746021, 4198, 1073746030,
740 4208, 1073746037, 4225, 4238, // NOLINT
741 1073746080, 4293, 4295, 4301,
742 1073746128, 4346, 1073746172, 4680, // NOLINT
743 1073746506, 4685, 1073746512, 4694,
744 4696, 1073746522, 4701, 1073746528, // NOLINT
745 4744, 1073746570, 4749, 1073746576,
746 4784, 1073746610, 4789, 1073746616, // NOLINT
747 4798, 4800, 1073746626, 4805,
748 1073746632, 4822, 1073746648, 4880, // NOLINT
749 1073746706, 4885, 1073746712, 4954,
750 1073746816, 5007, 1073746848, 5108, // NOLINT
751 1073746945, 5740, 1073747567, 5759,
752 1073747585, 5786, 1073747616, 5866, // NOLINT
753 1073747694, 5880, 1073747712, 5900,
754 1073747726, 5905, 1073747744, 5937, // NOLINT
755 1073747776, 5969, 1073747808, 5996,
756 1073747822, 6000, 1073747840, 6067, // NOLINT
757 6103, 6108, 1073748000, 6263,
758 1073748096, 6312, 6314, 1073748144, // NOLINT
759 6389, 1073748224, 6430, 1073748304,
760 6509, 1073748336, 6516, 1073748352, // NOLINT
761 6571, 1073748417, 6599, 1073748480,
762 6678, 1073748512, 6740, 6823, // NOLINT
763 1073748741, 6963, 1073748805, 6987,
764 1073748867, 7072, 1073748910, 7087, // NOLINT
765 1073748922, 7141, 1073748992, 7203,
766 1073749069, 7247, 1073749082, 7293, // NOLINT
767 1073749225, 7404, 1073749230, 7409,
768 1073749237, 7414, 1073749248, 7615, // NOLINT
769 1073749504, 7957, 1073749784, 7965,
770 1073749792, 8005, 1073749832, 8013, // NOLINT
771 1073749840, 8023, 8025, 8027,
772 8029, 1073749855, 8061, 1073749888, // NOLINT
773 8116, 1073749942, 8124, 8126,
774 1073749954, 8132, 1073749958, 8140, // NOLINT
775 1073749968, 8147, 1073749974, 8155,
776 1073749984, 8172, 1073750002, 8180, // NOLINT
777 1073750006, 8188}; // NOLINT
778 static const uint16_t kID_StartTable1Size = 84;
779 static const int32_t kID_StartTable1[84] = {
780 113, 127, 1073741968, 156,
781 258, 263, 1073742090, 275, // NOLINT
782 277, 1073742104, 285, 292,
783 294, 296, 1073742122, 313, // NOLINT
784 1073742140, 319, 1073742149, 329,
785 334, 1073742176, 392, 1073744896, // NOLINT
786 3118, 1073744944, 3166, 1073744992,
787 3300, 1073745131, 3310, 1073745138, // NOLINT
788 3315, 1073745152, 3365, 3367,
789 3373, 1073745200, 3431, 3439, // NOLINT
790 1073745280, 3478, 1073745312, 3494,
791 1073745320, 3502, 1073745328, 3510, // NOLINT
792 1073745336, 3518, 1073745344, 3526,
793 1073745352, 3534, 1073745360, 3542, // NOLINT
794 1073745368, 3550, 1073745925, 4103,
795 1073745953, 4137, 1073745969, 4149, // NOLINT
796 1073745976, 4156, 1073745985, 4246,
797 1073746075, 4255, 1073746081, 4346, // NOLINT
798 1073746172, 4351, 1073746181, 4397,
799 1073746225, 4494, 1073746336, 4538, // NOLINT
800 1073746416, 4607, 1073746944, 8191}; // NOLINT
801 static const uint16_t kID_StartTable2Size = 4;
802 static const int32_t kID_StartTable2[4] = {1073741824, 3509, 1073745408,
803 8191}; // NOLINT
804 static const uint16_t kID_StartTable3Size = 2;
805 static const int32_t kID_StartTable3[2] = {1073741824, 8191}; // NOLINT
806 static const uint16_t kID_StartTable4Size = 2;
807 static const int32_t kID_StartTable4[2] = {1073741824, 8140}; // NOLINT
808 static const uint16_t kID_StartTable5Size = 100;
809 static const int32_t kID_StartTable5[100] = {
810 1073741824, 1164, 1073743056, 1277,
811 1073743104, 1548, 1073743376, 1567, // NOLINT
812 1073743402, 1579, 1073743424, 1646,
813 1073743487, 1693, 1073743520, 1775, // NOLINT
814 1073743639, 1823, 1073743650, 1928,
815 1073743755, 1934, 1073743760, 1965, // NOLINT
816 1073743792, 1969, 1073743863, 2049,
817 1073743875, 2053, 1073743879, 2058, // NOLINT
818 1073743884, 2082, 1073743936, 2163,
819 1073744002, 2227, 1073744114, 2295, // NOLINT
820 2299, 1073744138, 2341, 1073744176,
821 2374, 1073744224, 2428, 1073744260, // NOLINT
822 2482, 2511, 1073744352, 2532,
823 1073744358, 2543, 1073744378, 2558, // NOLINT
824 1073744384, 2600, 1073744448, 2626,
825 1073744452, 2635, 1073744480, 2678, // NOLINT
826 2682, 1073744510, 2735, 2737,
827 1073744565, 2742, 1073744569, 2749, // NOLINT
828 2752, 2754, 1073744603, 2781,
829 1073744608, 2794, 1073744626, 2804, // NOLINT
830 1073744641, 2822, 1073744649, 2830,
831 1073744657, 2838, 1073744672, 2854, // NOLINT
832 1073744680, 2862, 1073744688, 2906,
833 1073744732, 2911, 1073744740, 2917, // NOLINT
834 1073744832, 3042, 1073744896, 8191}; // NOLINT
835 static const uint16_t kID_StartTable6Size = 6;
836 static const int32_t kID_StartTable6[6] = {1073741824, 6051, 1073747888, 6086,
837 1073747915, 6139}; // NOLINT
838 static const uint16_t kID_StartTable7Size = 48;
839 static const int32_t kID_StartTable7[48] = {
840 1073748224, 6765, 1073748592, 6873,
841 1073748736, 6918, 1073748755, 6935, // NOLINT
842 6941, 1073748767, 6952, 1073748778,
843 6966, 1073748792, 6972, 6974, // NOLINT
844 1073748800, 6977, 1073748803, 6980,
845 1073748806, 7089, 1073748947, 7485, // NOLINT
846 1073749328, 7567, 1073749394, 7623,
847 1073749488, 7675, 1073749616, 7796, // NOLINT
848 1073749622, 7932, 1073749793, 7994,
849 1073749825, 8026, 1073749862, 8126, // NOLINT
850 1073749954, 8135, 1073749962, 8143,
851 1073749970, 8151, 1073749978, 8156}; // NOLINT
Is(uchar c)852 bool ID_Start::Is(uchar c) {
853 int chunk_index = c >> 13;
854 switch (chunk_index) {
855 case 0:
856 return LookupPredicate(kID_StartTable0, kID_StartTable0Size, c);
857 case 1:
858 return LookupPredicate(kID_StartTable1, kID_StartTable1Size, c);
859 case 2:
860 return LookupPredicate(kID_StartTable2, kID_StartTable2Size, c);
861 case 3:
862 return LookupPredicate(kID_StartTable3, kID_StartTable3Size, c);
863 case 4:
864 return LookupPredicate(kID_StartTable4, kID_StartTable4Size, c);
865 case 5:
866 return LookupPredicate(kID_StartTable5, kID_StartTable5Size, c);
867 case 6:
868 return LookupPredicate(kID_StartTable6, kID_StartTable6Size, c);
869 case 7:
870 return LookupPredicate(kID_StartTable7, kID_StartTable7Size, c);
871 default:
872 return false;
873 }
874 }
875
876
877 // ID_Continue: point.category in ['Nd', 'Mn', 'Mc', 'Pc'] or
878 // 'Other_ID_Continue' in point.properties or 'JS_ID_Continue' in
879 // point.properties
880
881 static const uint16_t kID_ContinueTable0Size = 315;
882 static const int32_t kID_ContinueTable0[315] = {
883 1073741872, 57, 95, 183,
884 1073742592, 879, 903, 1073742979, // NOLINT
885 1159, 1073743249, 1469, 1471,
886 1073743297, 1474, 1073743300, 1477, // NOLINT
887 1479, 1073743376, 1562, 1073743435,
888 1641, 1648, 1073743574, 1756, // NOLINT
889 1073743583, 1764, 1073743591, 1768,
890 1073743594, 1773, 1073743600, 1785, // NOLINT
891 1809, 1073743664, 1866, 1073743782,
892 1968, 1073743808, 1993, 1073743851, // NOLINT
893 2035, 1073743894, 2073, 1073743899,
894 2083, 1073743909, 2087, 1073743913, // NOLINT
895 2093, 1073743961, 2139, 1073744100,
896 2307, 1073744186, 2364, 1073744190, // NOLINT
897 2383, 1073744209, 2391, 1073744226,
898 2403, 1073744230, 2415, 1073744257, // NOLINT
899 2435, 2492, 1073744318, 2500,
900 1073744327, 2504, 1073744331, 2509, // NOLINT
901 2519, 1073744354, 2531, 1073744358,
902 2543, 1073744385, 2563, 2620, // NOLINT
903 1073744446, 2626, 1073744455, 2632,
904 1073744459, 2637, 2641, 1073744486, // NOLINT
905 2673, 2677, 1073744513, 2691,
906 2748, 1073744574, 2757, 1073744583, // NOLINT
907 2761, 1073744587, 2765, 1073744610,
908 2787, 1073744614, 2799, 1073744641, // NOLINT
909 2819, 2876, 1073744702, 2884,
910 1073744711, 2888, 1073744715, 2893, // NOLINT
911 1073744726, 2903, 1073744738, 2915,
912 1073744742, 2927, 2946, 1073744830, // NOLINT
913 3010, 1073744838, 3016, 1073744842,
914 3021, 3031, 1073744870, 3055, // NOLINT
915 1073744896, 3075, 1073744958, 3140,
916 1073744966, 3144, 1073744970, 3149, // NOLINT
917 1073744981, 3158, 1073744994, 3171,
918 1073744998, 3183, 1073745025, 3203, // NOLINT
919 3260, 1073745086, 3268, 1073745094,
920 3272, 1073745098, 3277, 1073745109, // NOLINT
921 3286, 1073745122, 3299, 1073745126,
922 3311, 1073745153, 3331, 1073745214, // NOLINT
923 3396, 1073745222, 3400, 1073745226,
924 3405, 3415, 1073745250, 3427, // NOLINT
925 1073745254, 3439, 1073745282, 3459,
926 3530, 1073745359, 3540, 3542, // NOLINT
927 1073745368, 3551, 1073745382, 3567,
928 1073745394, 3571, 3633, 1073745460, // NOLINT
929 3642, 1073745479, 3662, 1073745488,
930 3673, 3761, 1073745588, 3769, // NOLINT
931 1073745595, 3772, 1073745608, 3789,
932 1073745616, 3801, 1073745688, 3865, // NOLINT
933 1073745696, 3881, 3893, 3895,
934 3897, 1073745726, 3903, 1073745777, // NOLINT
935 3972, 1073745798, 3975, 1073745805,
936 3991, 1073745817, 4028, 4038, // NOLINT
937 1073745963, 4158, 1073745984, 4169,
938 1073746006, 4185, 1073746014, 4192, // NOLINT
939 1073746018, 4196, 1073746023, 4205,
940 1073746033, 4212, 1073746050, 4237, // NOLINT
941 1073746063, 4253, 1073746781, 4959,
942 1073746793, 4977, 1073747730, 5908, // NOLINT
943 1073747762, 5940, 1073747794, 5971,
944 1073747826, 6003, 1073747892, 6099, // NOLINT
945 6109, 1073747936, 6121, 1073747979,
946 6157, 1073747984, 6169, 6313, // NOLINT
947 1073748256, 6443, 1073748272, 6459,
948 1073748294, 6479, 1073748400, 6592, // NOLINT
949 1073748424, 6601, 1073748432, 6618,
950 1073748503, 6683, 1073748565, 6750, // NOLINT
951 1073748576, 6780, 1073748607, 6793,
952 1073748624, 6809, 1073748656, 6845, // NOLINT
953 1073748736, 6916, 1073748788, 6980,
954 1073748816, 7001, 1073748843, 7027, // NOLINT
955 1073748864, 7042, 1073748897, 7085,
956 1073748912, 7097, 1073748966, 7155, // NOLINT
957 1073749028, 7223, 1073749056, 7241,
958 1073749072, 7257, 1073749200, 7378, // NOLINT
959 1073749204, 7400, 7405, 1073749234,
960 7412, 1073749240, 7417, 1073749440, // NOLINT
961 7669, 1073749500, 7679}; // NOLINT
962 static const uint16_t kID_ContinueTable1Size = 19;
963 static const int32_t kID_ContinueTable1[19] = {
964 1073741836, 13, 1073741887, 64,
965 84, 1073742032, 220, 225, // NOLINT
966 1073742053, 240, 1073745135, 3313,
967 3455, 1073745376, 3583, 1073745962, // NOLINT
968 4143, 1073746073, 4250}; // NOLINT
969 static const uint16_t kID_ContinueTable5Size = 63;
970 static const int32_t kID_ContinueTable5[63] = {
971 1073743392, 1577, 1647, 1073743476,
972 1661, 1695, 1073743600, 1777, // NOLINT
973 2050, 2054, 2059, 1073743907,
974 2087, 1073744000, 2177, 1073744052, // NOLINT
975 2244, 1073744080, 2265, 1073744096,
976 2289, 1073744128, 2313, 1073744166, // NOLINT
977 2349, 1073744199, 2387, 1073744256,
978 2435, 1073744307, 2496, 1073744336, // NOLINT
979 2521, 2533, 1073744368, 2553,
980 1073744425, 2614, 2627, 1073744460, // NOLINT
981 2637, 1073744464, 2649, 1073744507,
982 2685, 2736, 1073744562, 2740, // NOLINT
983 1073744567, 2744, 1073744574, 2751,
984 2753, 1073744619, 2799, 1073744629, // NOLINT
985 2806, 1073744867, 3050, 1073744876,
986 3053, 1073744880, 3065}; // NOLINT
987 static const uint16_t kID_ContinueTable7Size = 12;
988 static const int32_t kID_ContinueTable7[12] = {
989 6942, 1073749504, 7695, 1073749536,
990 7725, 1073749555, 7732, 1073749581, // NOLINT
991 7759, 1073749776, 7961, 7999}; // NOLINT
Is(uchar c)992 bool ID_Continue::Is(uchar c) {
993 int chunk_index = c >> 13;
994 switch (chunk_index) {
995 case 0:
996 return LookupPredicate(kID_ContinueTable0, kID_ContinueTable0Size, c);
997 case 1:
998 return LookupPredicate(kID_ContinueTable1, kID_ContinueTable1Size, c);
999 case 5:
1000 return LookupPredicate(kID_ContinueTable5, kID_ContinueTable5Size, c);
1001 case 7:
1002 return LookupPredicate(kID_ContinueTable7, kID_ContinueTable7Size, c);
1003 default: return false;
1004 }
1005 }
1006
1007 // WhiteSpace: (point.category == 'Zs') or ('JS_White_Space' in
1008 // point.properties)
1009
1010 static const uint16_t kWhiteSpaceTable0Size = 6;
1011 static const int32_t kWhiteSpaceTable0[6] = {9, 1073741835, 12,
1012 32, 160, 5760}; // NOLINT
1013 static const uint16_t kWhiteSpaceTable1Size = 5;
1014 static const int32_t kWhiteSpaceTable1[5] = {
1015 1073741824, 10, 47, 95, 4096 }; // NOLINT
1016 static const uint16_t kWhiteSpaceTable7Size = 1;
1017 static const int32_t kWhiteSpaceTable7[1] = {7935}; // NOLINT
Is(uchar c)1018 bool WhiteSpace::Is(uchar c) {
1019 int chunk_index = c >> 13;
1020 switch (chunk_index) {
1021 case 0: return LookupPredicate(kWhiteSpaceTable0,
1022 kWhiteSpaceTable0Size,
1023 c);
1024 case 1: return LookupPredicate(kWhiteSpaceTable1,
1025 kWhiteSpaceTable1Size,
1026 c);
1027 case 7:
1028 return LookupPredicate(kWhiteSpaceTable7, kWhiteSpaceTable7Size, c);
1029 default: return false;
1030 }
1031 }
1032 #endif // !V8_INTL_SUPPORT
1033
1034 #ifndef V8_INTL_SUPPORT
1035 static const MultiCharacterSpecialCase<2> kToLowercaseMultiStrings0[2] = { // NOLINT
1036 {{105, 775}}, {{kSentinel}} }; // NOLINT
1037 static const uint16_t kToLowercaseTable0Size = 488; // NOLINT
1038 static const int32_t kToLowercaseTable0[976] = {
1039 1073741889, 128, 90, 128, 1073742016, 128,
1040 214, 128, 1073742040, 128, 222, 128,
1041 256, 4, 258, 4, // NOLINT
1042 260, 4, 262, 4, 264, 4,
1043 266, 4, 268, 4, 270, 4,
1044 272, 4, 274, 4, // NOLINT
1045 276, 4, 278, 4, 280, 4,
1046 282, 4, 284, 4, 286, 4,
1047 288, 4, 290, 4, // NOLINT
1048 292, 4, 294, 4, 296, 4,
1049 298, 4, 300, 4, 302, 4,
1050 304, 1, 306, 4, // NOLINT
1051 308, 4, 310, 4, 313, 4,
1052 315, 4, 317, 4, 319, 4,
1053 321, 4, 323, 4, // NOLINT
1054 325, 4, 327, 4, 330, 4,
1055 332, 4, 334, 4, 336, 4,
1056 338, 4, 340, 4, // NOLINT
1057 342, 4, 344, 4, 346, 4,
1058 348, 4, 350, 4, 352, 4,
1059 354, 4, 356, 4, // NOLINT
1060 358, 4, 360, 4, 362, 4,
1061 364, 4, 366, 4, 368, 4,
1062 370, 4, 372, 4, // NOLINT
1063 374, 4, 376, -484, 377, 4,
1064 379, 4, 381, 4, 385, 840,
1065 386, 4, 388, 4, // NOLINT
1066 390, 824, 391, 4, 1073742217, 820,
1067 394, 820, 395, 4, 398, 316,
1068 399, 808, 400, 812, // NOLINT
1069 401, 4, 403, 820, 404, 828,
1070 406, 844, 407, 836, 408, 4,
1071 412, 844, 413, 852, // NOLINT
1072 415, 856, 416, 4, 418, 4,
1073 420, 4, 422, 872, 423, 4,
1074 425, 872, 428, 4, // NOLINT
1075 430, 872, 431, 4, 1073742257, 868,
1076 434, 868, 435, 4, 437, 4,
1077 439, 876, 440, 4, // NOLINT
1078 444, 4, 452, 8, 453, 4,
1079 455, 8, 456, 4, 458, 8,
1080 459, 4, 461, 4, // NOLINT
1081 463, 4, 465, 4, 467, 4,
1082 469, 4, 471, 4, 473, 4,
1083 475, 4, 478, 4, // NOLINT
1084 480, 4, 482, 4, 484, 4,
1085 486, 4, 488, 4, 490, 4,
1086 492, 4, 494, 4, // NOLINT
1087 497, 8, 498, 4, 500, 4,
1088 502, -388, 503, -224, 504, 4,
1089 506, 4, 508, 4, // NOLINT
1090 510, 4, 512, 4, 514, 4,
1091 516, 4, 518, 4, 520, 4,
1092 522, 4, 524, 4, // NOLINT
1093 526, 4, 528, 4, 530, 4,
1094 532, 4, 534, 4, 536, 4,
1095 538, 4, 540, 4, // NOLINT
1096 542, 4, 544, -520, 546, 4,
1097 548, 4, 550, 4, 552, 4,
1098 554, 4, 556, 4, // NOLINT
1099 558, 4, 560, 4, 562, 4,
1100 570, 43180, 571, 4, 573, -652,
1101 574, 43168, 577, 4, // NOLINT
1102 579, -780, 580, 276, 581, 284,
1103 582, 4, 584, 4, 586, 4,
1104 588, 4, 590, 4, // NOLINT
1105 880, 4, 882, 4, 886, 4,
1106 895, 464, 902, 152, 1073742728, 148,
1107 906, 148, 908, 256, // NOLINT
1108 1073742734, 252, 911, 252, 1073742737, 128,
1109 929, 128, 931, 6, 1073742756, 128,
1110 939, 128, 975, 32, // NOLINT
1111 984, 4, 986, 4, 988, 4,
1112 990, 4, 992, 4, 994, 4,
1113 996, 4, 998, 4, // NOLINT
1114 1000, 4, 1002, 4, 1004, 4,
1115 1006, 4, 1012, -240, 1015, 4,
1116 1017, -28, 1018, 4, // NOLINT
1117 1073742845, -520, 1023, -520, 1073742848, 320,
1118 1039, 320, 1073742864, 128, 1071, 128,
1119 1120, 4, 1122, 4, // NOLINT
1120 1124, 4, 1126, 4, 1128, 4,
1121 1130, 4, 1132, 4, 1134, 4,
1122 1136, 4, 1138, 4, // NOLINT
1123 1140, 4, 1142, 4, 1144, 4,
1124 1146, 4, 1148, 4, 1150, 4,
1125 1152, 4, 1162, 4, // NOLINT
1126 1164, 4, 1166, 4, 1168, 4,
1127 1170, 4, 1172, 4, 1174, 4,
1128 1176, 4, 1178, 4, // NOLINT
1129 1180, 4, 1182, 4, 1184, 4,
1130 1186, 4, 1188, 4, 1190, 4,
1131 1192, 4, 1194, 4, // NOLINT
1132 1196, 4, 1198, 4, 1200, 4,
1133 1202, 4, 1204, 4, 1206, 4,
1134 1208, 4, 1210, 4, // NOLINT
1135 1212, 4, 1214, 4, 1216, 60,
1136 1217, 4, 1219, 4, 1221, 4,
1137 1223, 4, 1225, 4, // NOLINT
1138 1227, 4, 1229, 4, 1232, 4,
1139 1234, 4, 1236, 4, 1238, 4,
1140 1240, 4, 1242, 4, // NOLINT
1141 1244, 4, 1246, 4, 1248, 4,
1142 1250, 4, 1252, 4, 1254, 4,
1143 1256, 4, 1258, 4, // NOLINT
1144 1260, 4, 1262, 4, 1264, 4,
1145 1266, 4, 1268, 4, 1270, 4,
1146 1272, 4, 1274, 4, // NOLINT
1147 1276, 4, 1278, 4, 1280, 4,
1148 1282, 4, 1284, 4, 1286, 4,
1149 1288, 4, 1290, 4, // NOLINT
1150 1292, 4, 1294, 4, 1296, 4,
1151 1298, 4, 1300, 4, 1302, 4,
1152 1304, 4, 1306, 4, // NOLINT
1153 1308, 4, 1310, 4, 1312, 4,
1154 1314, 4, 1316, 4, 1318, 4,
1155 1320, 4, 1322, 4, // NOLINT
1156 1324, 4, 1326, 4, 1073743153, 192,
1157 1366, 192, 1073746080, 29056, 4293, 29056,
1158 4295, 29056, 4301, 29056, // NOLINT
1159 7680, 4, 7682, 4, 7684, 4,
1160 7686, 4, 7688, 4, 7690, 4,
1161 7692, 4, 7694, 4, // NOLINT
1162 7696, 4, 7698, 4, 7700, 4,
1163 7702, 4, 7704, 4, 7706, 4,
1164 7708, 4, 7710, 4, // NOLINT
1165 7712, 4, 7714, 4, 7716, 4,
1166 7718, 4, 7720, 4, 7722, 4,
1167 7724, 4, 7726, 4, // NOLINT
1168 7728, 4, 7730, 4, 7732, 4,
1169 7734, 4, 7736, 4, 7738, 4,
1170 7740, 4, 7742, 4, // NOLINT
1171 7744, 4, 7746, 4, 7748, 4,
1172 7750, 4, 7752, 4, 7754, 4,
1173 7756, 4, 7758, 4, // NOLINT
1174 7760, 4, 7762, 4, 7764, 4,
1175 7766, 4, 7768, 4, 7770, 4,
1176 7772, 4, 7774, 4, // NOLINT
1177 7776, 4, 7778, 4, 7780, 4,
1178 7782, 4, 7784, 4, 7786, 4,
1179 7788, 4, 7790, 4, // NOLINT
1180 7792, 4, 7794, 4, 7796, 4,
1181 7798, 4, 7800, 4, 7802, 4,
1182 7804, 4, 7806, 4, // NOLINT
1183 7808, 4, 7810, 4, 7812, 4,
1184 7814, 4, 7816, 4, 7818, 4,
1185 7820, 4, 7822, 4, // NOLINT
1186 7824, 4, 7826, 4, 7828, 4,
1187 7838, -30460, 7840, 4, 7842, 4,
1188 7844, 4, 7846, 4, // NOLINT
1189 7848, 4, 7850, 4, 7852, 4,
1190 7854, 4, 7856, 4, 7858, 4,
1191 7860, 4, 7862, 4, // NOLINT
1192 7864, 4, 7866, 4, 7868, 4,
1193 7870, 4, 7872, 4, 7874, 4,
1194 7876, 4, 7878, 4, // NOLINT
1195 7880, 4, 7882, 4, 7884, 4,
1196 7886, 4, 7888, 4, 7890, 4,
1197 7892, 4, 7894, 4, // NOLINT
1198 7896, 4, 7898, 4, 7900, 4,
1199 7902, 4, 7904, 4, 7906, 4,
1200 7908, 4, 7910, 4, // NOLINT
1201 7912, 4, 7914, 4, 7916, 4,
1202 7918, 4, 7920, 4, 7922, 4,
1203 7924, 4, 7926, 4, // NOLINT
1204 7928, 4, 7930, 4, 7932, 4,
1205 7934, 4, 1073749768, -32, 7951, -32,
1206 1073749784, -32, 7965, -32, // NOLINT
1207 1073749800, -32, 7983, -32, 1073749816, -32,
1208 7999, -32, 1073749832, -32, 8013, -32,
1209 8025, -32, 8027, -32, // NOLINT
1210 8029, -32, 8031, -32, 1073749864, -32,
1211 8047, -32, 1073749896, -32, 8079, -32,
1212 1073749912, -32, 8095, -32, // NOLINT
1213 1073749928, -32, 8111, -32, 1073749944, -32,
1214 8121, -32, 1073749946, -296, 8123, -296,
1215 8124, -36, 1073749960, -344, // NOLINT
1216 8139, -344, 8140, -36, 1073749976, -32,
1217 8153, -32, 1073749978, -400, 8155, -400,
1218 1073749992, -32, 8169, -32, // NOLINT
1219 1073749994, -448, 8171, -448, 8172, -28,
1220 1073750008, -512, 8185, -512, 1073750010, -504,
1221 8187, -504, 8188, -36}; // NOLINT
1222 static const uint16_t kToLowercaseMultiStrings0Size = 2; // NOLINT
1223 static const MultiCharacterSpecialCase<1> kToLowercaseMultiStrings1[1] = { // NOLINT
1224 {{kSentinel}} }; // NOLINT
1225 static const uint16_t kToLowercaseTable1Size = 79; // NOLINT
1226 static const int32_t kToLowercaseTable1[158] = {
1227 294, -30068, 298, -33532, 299, -33048, 306, 112, 1073742176, 64, 367, 64, 387, 4, 1073743030, 104, // NOLINT
1228 1231, 104, 1073744896, 192, 3118, 192, 3168, 4, 3170, -42972, 3171, -15256, 3172, -42908, 3175, 4, // NOLINT
1229 3177, 4, 3179, 4, 3181, -43120, 3182, -42996, 3183, -43132, 3184, -43128, 3186, 4, 3189, 4, // NOLINT
1230 1073745022, -43260, 3199, -43260, 3200, 4, 3202, 4, 3204, 4, 3206, 4, 3208, 4, 3210, 4, // NOLINT
1231 3212, 4, 3214, 4, 3216, 4, 3218, 4, 3220, 4, 3222, 4, 3224, 4, 3226, 4, // NOLINT
1232 3228, 4, 3230, 4, 3232, 4, 3234, 4, 3236, 4, 3238, 4, 3240, 4, 3242, 4, // NOLINT
1233 3244, 4, 3246, 4, 3248, 4, 3250, 4, 3252, 4, 3254, 4, 3256, 4, 3258, 4, // NOLINT
1234 3260, 4, 3262, 4, 3264, 4, 3266, 4, 3268, 4, 3270, 4, 3272, 4, 3274, 4, // NOLINT
1235 3276, 4, 3278, 4, 3280, 4, 3282, 4, 3284, 4, 3286, 4, 3288, 4, 3290, 4, // NOLINT
1236 3292, 4, 3294, 4, 3296, 4, 3298, 4, 3307, 4, 3309, 4, 3314, 4 }; // NOLINT
1237 static const uint16_t kToLowercaseMultiStrings1Size = 1; // NOLINT
1238 static const MultiCharacterSpecialCase<1> kToLowercaseMultiStrings5[1] = { // NOLINT
1239 {{kSentinel}} }; // NOLINT
1240 static const uint16_t kToLowercaseTable5Size = 103; // NOLINT
1241 static const int32_t kToLowercaseTable5[206] = {
1242 1600, 4, 1602, 4, 1604, 4, 1606, 4,
1243 1608, 4, 1610, 4, 1612, 4, 1614, 4, // NOLINT
1244 1616, 4, 1618, 4, 1620, 4, 1622, 4,
1245 1624, 4, 1626, 4, 1628, 4, 1630, 4, // NOLINT
1246 1632, 4, 1634, 4, 1636, 4, 1638, 4,
1247 1640, 4, 1642, 4, 1644, 4, 1664, 4, // NOLINT
1248 1666, 4, 1668, 4, 1670, 4, 1672, 4,
1249 1674, 4, 1676, 4, 1678, 4, 1680, 4, // NOLINT
1250 1682, 4, 1684, 4, 1686, 4, 1688, 4,
1251 1690, 4, 1826, 4, 1828, 4, 1830, 4, // NOLINT
1252 1832, 4, 1834, 4, 1836, 4, 1838, 4,
1253 1842, 4, 1844, 4, 1846, 4, 1848, 4, // NOLINT
1254 1850, 4, 1852, 4, 1854, 4, 1856, 4,
1255 1858, 4, 1860, 4, 1862, 4, 1864, 4, // NOLINT
1256 1866, 4, 1868, 4, 1870, 4, 1872, 4,
1257 1874, 4, 1876, 4, 1878, 4, 1880, 4, // NOLINT
1258 1882, 4, 1884, 4, 1886, 4, 1888, 4,
1259 1890, 4, 1892, 4, 1894, 4, 1896, 4, // NOLINT
1260 1898, 4, 1900, 4, 1902, 4, 1913, 4,
1261 1915, 4, 1917, -141328, 1918, 4, 1920, 4, // NOLINT
1262 1922, 4, 1924, 4, 1926, 4, 1931, 4,
1263 1933, -169120, 1936, 4, 1938, 4, 1942, 4, // NOLINT
1264 1944, 4, 1946, 4, 1948, 4, 1950, 4,
1265 1952, 4, 1954, 4, 1956, 4, 1958, 4, // NOLINT
1266 1960, 4, 1962, -169232, 1963, -169276, 1964, -169260,
1267 1965, -169220, 1968, -169032, 1969, -169128}; // NOLINT
1268 static const uint16_t kToLowercaseMultiStrings5Size = 1; // NOLINT
1269 static const MultiCharacterSpecialCase<1> kToLowercaseMultiStrings7[1] = { // NOLINT
1270 {{kSentinel}} }; // NOLINT
1271 static const uint16_t kToLowercaseTable7Size = 2; // NOLINT
1272 static const int32_t kToLowercaseTable7[4] = {
1273 1073749793, 128, 7994, 128 }; // NOLINT
1274 static const uint16_t kToLowercaseMultiStrings7Size = 1; // NOLINT
Convert(uchar c,uchar n,uchar * result,bool * allow_caching_ptr)1275 int ToLowercase::Convert(uchar c,
1276 uchar n,
1277 uchar* result,
1278 bool* allow_caching_ptr) {
1279 int chunk_index = c >> 13;
1280 switch (chunk_index) {
1281 case 0: return LookupMapping<true>(kToLowercaseTable0,
1282 kToLowercaseTable0Size,
1283 kToLowercaseMultiStrings0,
1284 c,
1285 n,
1286 result,
1287 allow_caching_ptr);
1288 case 1: return LookupMapping<true>(kToLowercaseTable1,
1289 kToLowercaseTable1Size,
1290 kToLowercaseMultiStrings1,
1291 c,
1292 n,
1293 result,
1294 allow_caching_ptr);
1295 case 5: return LookupMapping<true>(kToLowercaseTable5,
1296 kToLowercaseTable5Size,
1297 kToLowercaseMultiStrings5,
1298 c,
1299 n,
1300 result,
1301 allow_caching_ptr);
1302 case 7: return LookupMapping<true>(kToLowercaseTable7,
1303 kToLowercaseTable7Size,
1304 kToLowercaseMultiStrings7,
1305 c,
1306 n,
1307 result,
1308 allow_caching_ptr);
1309 default: return 0;
1310 }
1311 }
1312
1313 static const MultiCharacterSpecialCase<3> kToUppercaseMultiStrings0[62] = { // NOLINT
1314 {{83, 83, kSentinel}}, {{700, 78, kSentinel}}, {{74, 780, kSentinel}}, {{921, 776, 769}}, // NOLINT
1315 {{933, 776, 769}}, {{1333, 1362, kSentinel}}, {{72, 817, kSentinel}}, {{84, 776, kSentinel}}, // NOLINT
1316 {{87, 778, kSentinel}}, {{89, 778, kSentinel}}, {{65, 702, kSentinel}}, {{933, 787, kSentinel}}, // NOLINT
1317 {{933, 787, 768}}, {{933, 787, 769}}, {{933, 787, 834}}, {{7944, 921, kSentinel}}, // NOLINT
1318 {{7945, 921, kSentinel}}, {{7946, 921, kSentinel}}, {{7947, 921, kSentinel}}, {{7948, 921, kSentinel}}, // NOLINT
1319 {{7949, 921, kSentinel}}, {{7950, 921, kSentinel}}, {{7951, 921, kSentinel}}, {{7976, 921, kSentinel}}, // NOLINT
1320 {{7977, 921, kSentinel}}, {{7978, 921, kSentinel}}, {{7979, 921, kSentinel}}, {{7980, 921, kSentinel}}, // NOLINT
1321 {{7981, 921, kSentinel}}, {{7982, 921, kSentinel}}, {{7983, 921, kSentinel}}, {{8040, 921, kSentinel}}, // NOLINT
1322 {{8041, 921, kSentinel}}, {{8042, 921, kSentinel}}, {{8043, 921, kSentinel}}, {{8044, 921, kSentinel}}, // NOLINT
1323 {{8045, 921, kSentinel}}, {{8046, 921, kSentinel}}, {{8047, 921, kSentinel}}, {{8122, 921, kSentinel}}, // NOLINT
1324 {{913, 921, kSentinel}}, {{902, 921, kSentinel}}, {{913, 834, kSentinel}}, {{913, 834, 921}}, // NOLINT
1325 {{8138, 921, kSentinel}}, {{919, 921, kSentinel}}, {{905, 921, kSentinel}}, {{919, 834, kSentinel}}, // NOLINT
1326 {{919, 834, 921}}, {{921, 776, 768}}, {{921, 834, kSentinel}}, {{921, 776, 834}}, // NOLINT
1327 {{933, 776, 768}}, {{929, 787, kSentinel}}, {{933, 834, kSentinel}}, {{933, 776, 834}}, // NOLINT
1328 {{8186, 921, kSentinel}}, {{937, 921, kSentinel}}, {{911, 921, kSentinel}}, {{937, 834, kSentinel}}, // NOLINT
1329 {{937, 834, 921}}, {{kSentinel}} }; // NOLINT
1330 static const uint16_t kToUppercaseTable0Size = 590; // NOLINT
1331 static const int32_t kToUppercaseTable0[1180] = {
1332 1073741921, -128, 122, -128, 181, 2972,
1333 223, 1, 1073742048, -128, 246, -128,
1334 1073742072, -128, 254, -128, // NOLINT
1335 255, 484, 257, -4, 259, -4,
1336 261, -4, 263, -4, 265, -4,
1337 267, -4, 269, -4, // NOLINT
1338 271, -4, 273, -4, 275, -4,
1339 277, -4, 279, -4, 281, -4,
1340 283, -4, 285, -4, // NOLINT
1341 287, -4, 289, -4, 291, -4,
1342 293, -4, 295, -4, 297, -4,
1343 299, -4, 301, -4, // NOLINT
1344 303, -4, 305, -928, 307, -4,
1345 309, -4, 311, -4, 314, -4,
1346 316, -4, 318, -4, // NOLINT
1347 320, -4, 322, -4, 324, -4,
1348 326, -4, 328, -4, 329, 5,
1349 331, -4, 333, -4, // NOLINT
1350 335, -4, 337, -4, 339, -4,
1351 341, -4, 343, -4, 345, -4,
1352 347, -4, 349, -4, // NOLINT
1353 351, -4, 353, -4, 355, -4,
1354 357, -4, 359, -4, 361, -4,
1355 363, -4, 365, -4, // NOLINT
1356 367, -4, 369, -4, 371, -4,
1357 373, -4, 375, -4, 378, -4,
1358 380, -4, 382, -4, // NOLINT
1359 383, -1200, 384, 780, 387, -4,
1360 389, -4, 392, -4, 396, -4,
1361 402, -4, 405, 388, // NOLINT
1362 409, -4, 410, 652, 414, 520,
1363 417, -4, 419, -4, 421, -4,
1364 424, -4, 429, -4, // NOLINT
1365 432, -4, 436, -4, 438, -4,
1366 441, -4, 445, -4, 447, 224,
1367 453, -4, 454, -8, // NOLINT
1368 456, -4, 457, -8, 459, -4,
1369 460, -8, 462, -4, 464, -4,
1370 466, -4, 468, -4, // NOLINT
1371 470, -4, 472, -4, 474, -4,
1372 476, -4, 477, -316, 479, -4,
1373 481, -4, 483, -4, // NOLINT
1374 485, -4, 487, -4, 489, -4,
1375 491, -4, 493, -4, 495, -4,
1376 496, 9, 498, -4, // NOLINT
1377 499, -8, 501, -4, 505, -4,
1378 507, -4, 509, -4, 511, -4,
1379 513, -4, 515, -4, // NOLINT
1380 517, -4, 519, -4, 521, -4,
1381 523, -4, 525, -4, 527, -4,
1382 529, -4, 531, -4, // NOLINT
1383 533, -4, 535, -4, 537, -4,
1384 539, -4, 541, -4, 543, -4,
1385 547, -4, 549, -4, // NOLINT
1386 551, -4, 553, -4, 555, -4,
1387 557, -4, 559, -4, 561, -4,
1388 563, -4, 572, -4, // NOLINT
1389 1073742399, 43260, 576, 43260, 578, -4,
1390 583, -4, 585, -4, 587, -4,
1391 589, -4, 591, -4, // NOLINT
1392 592, 43132, 593, 43120, 594, 43128,
1393 595, -840, 596, -824, 1073742422, -820,
1394 599, -820, 601, -808, // NOLINT
1395 603, -812, 604, 169276, 608, -820,
1396 609, 169260, 611, -828, 613, 169120,
1397 614, 169232, 616, -836, // NOLINT
1398 617, -844, 619, 42972, 620, 169220,
1399 623, -844, 625, 42996, 626, -852,
1400 629, -856, 637, 42908, // NOLINT
1401 640, -872, 643, -872, 647, 169128,
1402 648, -872, 649, -276, 1073742474, -868,
1403 651, -868, 652, -284, // NOLINT
1404 658, -876, 670, 169032, 837, 336,
1405 881, -4, 883, -4, 887, -4,
1406 1073742715, 520, 893, 520, // NOLINT
1407 912, 13, 940, -152, 1073742765, -148,
1408 943, -148, 944, 17, 1073742769, -128,
1409 961, -128, 962, -124, // NOLINT
1410 1073742787, -128, 971, -128, 972, -256,
1411 1073742797, -252, 974, -252, 976, -248,
1412 977, -228, 981, -188, // NOLINT
1413 982, -216, 983, -32, 985, -4,
1414 987, -4, 989, -4, 991, -4,
1415 993, -4, 995, -4, // NOLINT
1416 997, -4, 999, -4, 1001, -4,
1417 1003, -4, 1005, -4, 1007, -4,
1418 1008, -344, 1009, -320, // NOLINT
1419 1010, 28, 1011, -464, 1013, -384,
1420 1016, -4, 1019, -4, 1073742896, -128,
1421 1103, -128, 1073742928, -320, // NOLINT
1422 1119, -320, 1121, -4, 1123, -4,
1423 1125, -4, 1127, -4, 1129, -4,
1424 1131, -4, 1133, -4, // NOLINT
1425 1135, -4, 1137, -4, 1139, -4,
1426 1141, -4, 1143, -4, 1145, -4,
1427 1147, -4, 1149, -4, // NOLINT
1428 1151, -4, 1153, -4, 1163, -4,
1429 1165, -4, 1167, -4, 1169, -4,
1430 1171, -4, 1173, -4, // NOLINT
1431 1175, -4, 1177, -4, 1179, -4,
1432 1181, -4, 1183, -4, 1185, -4,
1433 1187, -4, 1189, -4, // NOLINT
1434 1191, -4, 1193, -4, 1195, -4,
1435 1197, -4, 1199, -4, 1201, -4,
1436 1203, -4, 1205, -4, // NOLINT
1437 1207, -4, 1209, -4, 1211, -4,
1438 1213, -4, 1215, -4, 1218, -4,
1439 1220, -4, 1222, -4, // NOLINT
1440 1224, -4, 1226, -4, 1228, -4,
1441 1230, -4, 1231, -60, 1233, -4,
1442 1235, -4, 1237, -4, // NOLINT
1443 1239, -4, 1241, -4, 1243, -4,
1444 1245, -4, 1247, -4, 1249, -4,
1445 1251, -4, 1253, -4, // NOLINT
1446 1255, -4, 1257, -4, 1259, -4,
1447 1261, -4, 1263, -4, 1265, -4,
1448 1267, -4, 1269, -4, // NOLINT
1449 1271, -4, 1273, -4, 1275, -4,
1450 1277, -4, 1279, -4, 1281, -4,
1451 1283, -4, 1285, -4, // NOLINT
1452 1287, -4, 1289, -4, 1291, -4,
1453 1293, -4, 1295, -4, 1297, -4,
1454 1299, -4, 1301, -4, // NOLINT
1455 1303, -4, 1305, -4, 1307, -4,
1456 1309, -4, 1311, -4, 1313, -4,
1457 1315, -4, 1317, -4, // NOLINT
1458 1319, -4, 1321, -4, 1323, -4,
1459 1325, -4, 1327, -4, 1073743201, -192,
1460 1414, -192, 1415, 21, // NOLINT
1461 7545, 141328, 7549, 15256, 7681, -4,
1462 7683, -4, 7685, -4, 7687, -4,
1463 7689, -4, 7691, -4, // NOLINT
1464 7693, -4, 7695, -4, 7697, -4,
1465 7699, -4, 7701, -4, 7703, -4,
1466 7705, -4, 7707, -4, // NOLINT
1467 7709, -4, 7711, -4, 7713, -4,
1468 7715, -4, 7717, -4, 7719, -4,
1469 7721, -4, 7723, -4, // NOLINT
1470 7725, -4, 7727, -4, 7729, -4,
1471 7731, -4, 7733, -4, 7735, -4,
1472 7737, -4, 7739, -4, // NOLINT
1473 7741, -4, 7743, -4, 7745, -4,
1474 7747, -4, 7749, -4, 7751, -4,
1475 7753, -4, 7755, -4, // NOLINT
1476 7757, -4, 7759, -4, 7761, -4,
1477 7763, -4, 7765, -4, 7767, -4,
1478 7769, -4, 7771, -4, // NOLINT
1479 7773, -4, 7775, -4, 7777, -4,
1480 7779, -4, 7781, -4, 7783, -4,
1481 7785, -4, 7787, -4, // NOLINT
1482 7789, -4, 7791, -4, 7793, -4,
1483 7795, -4, 7797, -4, 7799, -4,
1484 7801, -4, 7803, -4, // NOLINT
1485 7805, -4, 7807, -4, 7809, -4,
1486 7811, -4, 7813, -4, 7815, -4,
1487 7817, -4, 7819, -4, // NOLINT
1488 7821, -4, 7823, -4, 7825, -4,
1489 7827, -4, 7829, -4, 7830, 25,
1490 7831, 29, 7832, 33, // NOLINT
1491 7833, 37, 7834, 41, 7835, -236,
1492 7841, -4, 7843, -4, 7845, -4,
1493 7847, -4, 7849, -4, // NOLINT
1494 7851, -4, 7853, -4, 7855, -4,
1495 7857, -4, 7859, -4, 7861, -4,
1496 7863, -4, 7865, -4, // NOLINT
1497 7867, -4, 7869, -4, 7871, -4,
1498 7873, -4, 7875, -4, 7877, -4,
1499 7879, -4, 7881, -4, // NOLINT
1500 7883, -4, 7885, -4, 7887, -4,
1501 7889, -4, 7891, -4, 7893, -4,
1502 7895, -4, 7897, -4, // NOLINT
1503 7899, -4, 7901, -4, 7903, -4,
1504 7905, -4, 7907, -4, 7909, -4,
1505 7911, -4, 7913, -4, // NOLINT
1506 7915, -4, 7917, -4, 7919, -4,
1507 7921, -4, 7923, -4, 7925, -4,
1508 7927, -4, 7929, -4, // NOLINT
1509 7931, -4, 7933, -4, 7935, -4,
1510 1073749760, 32, 7943, 32, 1073749776, 32,
1511 7957, 32, 1073749792, 32, // NOLINT
1512 7975, 32, 1073749808, 32, 7991, 32,
1513 1073749824, 32, 8005, 32, 8016, 45,
1514 8017, 32, 8018, 49, // NOLINT
1515 8019, 32, 8020, 53, 8021, 32,
1516 8022, 57, 8023, 32, 1073749856, 32,
1517 8039, 32, 1073749872, 296, // NOLINT
1518 8049, 296, 1073749874, 344, 8053, 344,
1519 1073749878, 400, 8055, 400, 1073749880, 512,
1520 8057, 512, 1073749882, 448, // NOLINT
1521 8059, 448, 1073749884, 504, 8061, 504,
1522 8064, 61, 8065, 65, 8066, 69,
1523 8067, 73, 8068, 77, // NOLINT
1524 8069, 81, 8070, 85, 8071, 89,
1525 8072, 61, 8073, 65, 8074, 69,
1526 8075, 73, 8076, 77, // NOLINT
1527 8077, 81, 8078, 85, 8079, 89,
1528 8080, 93, 8081, 97, 8082, 101,
1529 8083, 105, 8084, 109, // NOLINT
1530 8085, 113, 8086, 117, 8087, 121,
1531 8088, 93, 8089, 97, 8090, 101,
1532 8091, 105, 8092, 109, // NOLINT
1533 8093, 113, 8094, 117, 8095, 121,
1534 8096, 125, 8097, 129, 8098, 133,
1535 8099, 137, 8100, 141, // NOLINT
1536 8101, 145, 8102, 149, 8103, 153,
1537 8104, 125, 8105, 129, 8106, 133,
1538 8107, 137, 8108, 141, // NOLINT
1539 8109, 145, 8110, 149, 8111, 153,
1540 1073749936, 32, 8113, 32, 8114, 157,
1541 8115, 161, 8116, 165, // NOLINT
1542 8118, 169, 8119, 173, 8124, 161,
1543 8126, -28820, 8130, 177, 8131, 181,
1544 8132, 185, 8134, 189, // NOLINT
1545 8135, 193, 8140, 181, 1073749968, 32,
1546 8145, 32, 8146, 197, 8147, 13,
1547 8150, 201, 8151, 205, // NOLINT
1548 1073749984, 32, 8161, 32, 8162, 209,
1549 8163, 17, 8164, 213, 8165, 28,
1550 8166, 217, 8167, 221, // NOLINT
1551 8178, 225, 8179, 229, 8180, 233,
1552 8182, 237, 8183, 241, 8188, 229}; // NOLINT
1553 static const uint16_t kToUppercaseMultiStrings0Size = 62; // NOLINT
1554 static const MultiCharacterSpecialCase<1> kToUppercaseMultiStrings1[1] = { // NOLINT
1555 {{kSentinel}} }; // NOLINT
1556 static const uint16_t kToUppercaseTable1Size = 73; // NOLINT
1557 static const int32_t kToUppercaseTable1[146] = {
1558 334, -112, 1073742192, -64, 383, -64, 388, -4, 1073743056, -104, 1257, -104, 1073744944, -192, 3166, -192, // NOLINT
1559 3169, -4, 3173, -43180, 3174, -43168, 3176, -4, 3178, -4, 3180, -4, 3187, -4, 3190, -4, // NOLINT
1560 3201, -4, 3203, -4, 3205, -4, 3207, -4, 3209, -4, 3211, -4, 3213, -4, 3215, -4, // NOLINT
1561 3217, -4, 3219, -4, 3221, -4, 3223, -4, 3225, -4, 3227, -4, 3229, -4, 3231, -4, // NOLINT
1562 3233, -4, 3235, -4, 3237, -4, 3239, -4, 3241, -4, 3243, -4, 3245, -4, 3247, -4, // NOLINT
1563 3249, -4, 3251, -4, 3253, -4, 3255, -4, 3257, -4, 3259, -4, 3261, -4, 3263, -4, // NOLINT
1564 3265, -4, 3267, -4, 3269, -4, 3271, -4, 3273, -4, 3275, -4, 3277, -4, 3279, -4, // NOLINT
1565 3281, -4, 3283, -4, 3285, -4, 3287, -4, 3289, -4, 3291, -4, 3293, -4, 3295, -4, // NOLINT
1566 3297, -4, 3299, -4, 3308, -4, 3310, -4, 3315, -4, 1073745152, -29056, 3365, -29056, 3367, -29056, // NOLINT
1567 3373, -29056 }; // NOLINT
1568 static const uint16_t kToUppercaseMultiStrings1Size = 1; // NOLINT
1569 static const MultiCharacterSpecialCase<1> kToUppercaseMultiStrings5[1] = { // NOLINT
1570 {{kSentinel}} }; // NOLINT
1571 static const uint16_t kToUppercaseTable5Size = 95; // NOLINT
1572 static const int32_t
1573 kToUppercaseTable5[190] = {1601, -4, 1603, -4, 1605, -4, 1607, -4, 1609, -4,
1574 1611, -4, 1613, -4, 1615, -4, // NOLINT
1575 1617, -4, 1619, -4, 1621, -4, 1623, -4, 1625, -4,
1576 1627, -4, 1629, -4, 1631, -4, // NOLINT
1577 1633, -4, 1635, -4, 1637, -4, 1639, -4, 1641, -4,
1578 1643, -4, 1645, -4, 1665, -4, // NOLINT
1579 1667, -4, 1669, -4, 1671, -4, 1673, -4, 1675, -4,
1580 1677, -4, 1679, -4, 1681, -4, // NOLINT
1581 1683, -4, 1685, -4, 1687, -4, 1689, -4, 1691, -4,
1582 1827, -4, 1829, -4, 1831, -4, // NOLINT
1583 1833, -4, 1835, -4, 1837, -4, 1839, -4, 1843, -4,
1584 1845, -4, 1847, -4, 1849, -4, // NOLINT
1585 1851, -4, 1853, -4, 1855, -4, 1857, -4, 1859, -4,
1586 1861, -4, 1863, -4, 1865, -4, // NOLINT
1587 1867, -4, 1869, -4, 1871, -4, 1873, -4, 1875, -4,
1588 1877, -4, 1879, -4, 1881, -4, // NOLINT
1589 1883, -4, 1885, -4, 1887, -4, 1889, -4, 1891, -4,
1590 1893, -4, 1895, -4, 1897, -4, // NOLINT
1591 1899, -4, 1901, -4, 1903, -4, 1914, -4, 1916, -4,
1592 1919, -4, 1921, -4, 1923, -4, // NOLINT
1593 1925, -4, 1927, -4, 1932, -4, 1937, -4, 1939, -4,
1594 1943, -4, 1945, -4, 1947, -4, // NOLINT
1595 1949, -4, 1951, -4, 1953, -4, 1955, -4, 1957, -4,
1596 1959, -4, 1961, -4}; // NOLINT
1597 static const uint16_t kToUppercaseMultiStrings5Size = 1; // NOLINT
1598 static const MultiCharacterSpecialCase<3> kToUppercaseMultiStrings7[12] = { // NOLINT
1599 {{70, 70, kSentinel}}, {{70, 73, kSentinel}}, {{70, 76, kSentinel}}, {{70, 70, 73}}, // NOLINT
1600 {{70, 70, 76}}, {{83, 84, kSentinel}}, {{1348, 1350, kSentinel}}, {{1348, 1333, kSentinel}}, // NOLINT
1601 {{1348, 1339, kSentinel}}, {{1358, 1350, kSentinel}}, {{1348, 1341, kSentinel}}, {{kSentinel}} }; // NOLINT
1602 static const uint16_t kToUppercaseTable7Size = 14; // NOLINT
1603 static const int32_t kToUppercaseTable7[28] = {
1604 6912, 1, 6913, 5, 6914, 9, 6915, 13, 6916, 17, 6917, 21, 6918, 21, 6931, 25, // NOLINT
1605 6932, 29, 6933, 33, 6934, 37, 6935, 41, 1073749825, -128, 8026, -128 }; // NOLINT
1606 static const uint16_t kToUppercaseMultiStrings7Size = 12; // NOLINT
Convert(uchar c,uchar n,uchar * result,bool * allow_caching_ptr)1607 int ToUppercase::Convert(uchar c,
1608 uchar n,
1609 uchar* result,
1610 bool* allow_caching_ptr) {
1611 int chunk_index = c >> 13;
1612 switch (chunk_index) {
1613 case 0: return LookupMapping<true>(kToUppercaseTable0,
1614 kToUppercaseTable0Size,
1615 kToUppercaseMultiStrings0,
1616 c,
1617 n,
1618 result,
1619 allow_caching_ptr);
1620 case 1: return LookupMapping<true>(kToUppercaseTable1,
1621 kToUppercaseTable1Size,
1622 kToUppercaseMultiStrings1,
1623 c,
1624 n,
1625 result,
1626 allow_caching_ptr);
1627 case 5: return LookupMapping<true>(kToUppercaseTable5,
1628 kToUppercaseTable5Size,
1629 kToUppercaseMultiStrings5,
1630 c,
1631 n,
1632 result,
1633 allow_caching_ptr);
1634 case 7: return LookupMapping<true>(kToUppercaseTable7,
1635 kToUppercaseTable7Size,
1636 kToUppercaseMultiStrings7,
1637 c,
1638 n,
1639 result,
1640 allow_caching_ptr);
1641 default: return 0;
1642 }
1643 }
1644 #endif // !V8_INTL_SUPPORT
1645
1646 static const MultiCharacterSpecialCase<1> kEcma262CanonicalizeMultiStrings0[1] = { // NOLINT
1647 {{kSentinel}} }; // NOLINT
1648 static const uint16_t kEcma262CanonicalizeTable0Size = 498; // NOLINT
1649 static const int32_t kEcma262CanonicalizeTable0[996] = {
1650 1073741921, -128, 122, -128, 181, 2972,
1651 1073742048, -128, 246, -128, 1073742072, -128,
1652 254, -128, 255, 484, // NOLINT
1653 257, -4, 259, -4, 261, -4,
1654 263, -4, 265, -4, 267, -4,
1655 269, -4, 271, -4, // NOLINT
1656 273, -4, 275, -4, 277, -4,
1657 279, -4, 281, -4, 283, -4,
1658 285, -4, 287, -4, // NOLINT
1659 289, -4, 291, -4, 293, -4,
1660 295, -4, 297, -4, 299, -4,
1661 301, -4, 303, -4, // NOLINT
1662 307, -4, 309, -4, 311, -4,
1663 314, -4, 316, -4, 318, -4,
1664 320, -4, 322, -4, // NOLINT
1665 324, -4, 326, -4, 328, -4,
1666 331, -4, 333, -4, 335, -4,
1667 337, -4, 339, -4, // NOLINT
1668 341, -4, 343, -4, 345, -4,
1669 347, -4, 349, -4, 351, -4,
1670 353, -4, 355, -4, // NOLINT
1671 357, -4, 359, -4, 361, -4,
1672 363, -4, 365, -4, 367, -4,
1673 369, -4, 371, -4, // NOLINT
1674 373, -4, 375, -4, 378, -4,
1675 380, -4, 382, -4, 384, 780,
1676 387, -4, 389, -4, // NOLINT
1677 392, -4, 396, -4, 402, -4,
1678 405, 388, 409, -4, 410, 652,
1679 414, 520, 417, -4, // NOLINT
1680 419, -4, 421, -4, 424, -4,
1681 429, -4, 432, -4, 436, -4,
1682 438, -4, 441, -4, // NOLINT
1683 445, -4, 447, 224, 453, -4,
1684 454, -8, 456, -4, 457, -8,
1685 459, -4, 460, -8, // NOLINT
1686 462, -4, 464, -4, 466, -4,
1687 468, -4, 470, -4, 472, -4,
1688 474, -4, 476, -4, // NOLINT
1689 477, -316, 479, -4, 481, -4,
1690 483, -4, 485, -4, 487, -4,
1691 489, -4, 491, -4, // NOLINT
1692 493, -4, 495, -4, 498, -4,
1693 499, -8, 501, -4, 505, -4,
1694 507, -4, 509, -4, // NOLINT
1695 511, -4, 513, -4, 515, -4,
1696 517, -4, 519, -4, 521, -4,
1697 523, -4, 525, -4, // NOLINT
1698 527, -4, 529, -4, 531, -4,
1699 533, -4, 535, -4, 537, -4,
1700 539, -4, 541, -4, // NOLINT
1701 543, -4, 547, -4, 549, -4,
1702 551, -4, 553, -4, 555, -4,
1703 557, -4, 559, -4, // NOLINT
1704 561, -4, 563, -4, 572, -4,
1705 1073742399, 43260, 576, 43260, 578, -4,
1706 583, -4, 585, -4, // NOLINT
1707 587, -4, 589, -4, 591, -4,
1708 592, 43132, 593, 43120, 594, 43128,
1709 595, -840, 596, -824, // NOLINT
1710 1073742422, -820, 599, -820, 601, -808,
1711 603, -812, 604, 169276, 608, -820,
1712 609, 169260, 611, -828, // NOLINT
1713 613, 169120, 614, 169232, 616, -836,
1714 617, -844, 619, 42972, 620, 169220,
1715 623, -844, 625, 42996, // NOLINT
1716 626, -852, 629, -856, 637, 42908,
1717 640, -872, 643, -872, 647, 169128,
1718 648, -872, 649, -276, // NOLINT
1719 1073742474, -868, 651, -868, 652, -284,
1720 658, -876, 670, 169032, 837, 336,
1721 881, -4, 883, -4, // NOLINT
1722 887, -4, 1073742715, 520, 893, 520,
1723 940, -152, 1073742765, -148, 943, -148,
1724 1073742769, -128, 961, -128, // NOLINT
1725 962, -124, 1073742787, -128, 971, -128,
1726 972, -256, 1073742797, -252, 974, -252,
1727 976, -248, 977, -228, // NOLINT
1728 981, -188, 982, -216, 983, -32,
1729 985, -4, 987, -4, 989, -4,
1730 991, -4, 993, -4, // NOLINT
1731 995, -4, 997, -4, 999, -4,
1732 1001, -4, 1003, -4, 1005, -4,
1733 1007, -4, 1008, -344, // NOLINT
1734 1009, -320, 1010, 28, 1011, -464,
1735 1013, -384, 1016, -4, 1019, -4,
1736 1073742896, -128, 1103, -128, // NOLINT
1737 1073742928, -320, 1119, -320, 1121, -4,
1738 1123, -4, 1125, -4, 1127, -4,
1739 1129, -4, 1131, -4, // NOLINT
1740 1133, -4, 1135, -4, 1137, -4,
1741 1139, -4, 1141, -4, 1143, -4,
1742 1145, -4, 1147, -4, // NOLINT
1743 1149, -4, 1151, -4, 1153, -4,
1744 1163, -4, 1165, -4, 1167, -4,
1745 1169, -4, 1171, -4, // NOLINT
1746 1173, -4, 1175, -4, 1177, -4,
1747 1179, -4, 1181, -4, 1183, -4,
1748 1185, -4, 1187, -4, // NOLINT
1749 1189, -4, 1191, -4, 1193, -4,
1750 1195, -4, 1197, -4, 1199, -4,
1751 1201, -4, 1203, -4, // NOLINT
1752 1205, -4, 1207, -4, 1209, -4,
1753 1211, -4, 1213, -4, 1215, -4,
1754 1218, -4, 1220, -4, // NOLINT
1755 1222, -4, 1224, -4, 1226, -4,
1756 1228, -4, 1230, -4, 1231, -60,
1757 1233, -4, 1235, -4, // NOLINT
1758 1237, -4, 1239, -4, 1241, -4,
1759 1243, -4, 1245, -4, 1247, -4,
1760 1249, -4, 1251, -4, // NOLINT
1761 1253, -4, 1255, -4, 1257, -4,
1762 1259, -4, 1261, -4, 1263, -4,
1763 1265, -4, 1267, -4, // NOLINT
1764 1269, -4, 1271, -4, 1273, -4,
1765 1275, -4, 1277, -4, 1279, -4,
1766 1281, -4, 1283, -4, // NOLINT
1767 1285, -4, 1287, -4, 1289, -4,
1768 1291, -4, 1293, -4, 1295, -4,
1769 1297, -4, 1299, -4, // NOLINT
1770 1301, -4, 1303, -4, 1305, -4,
1771 1307, -4, 1309, -4, 1311, -4,
1772 1313, -4, 1315, -4, // NOLINT
1773 1317, -4, 1319, -4, 1321, -4,
1774 1323, -4, 1325, -4, 1327, -4,
1775 1073743201, -192, 1414, -192, // NOLINT
1776 7545, 141328, 7549, 15256, 7681, -4,
1777 7683, -4, 7685, -4, 7687, -4,
1778 7689, -4, 7691, -4, // NOLINT
1779 7693, -4, 7695, -4, 7697, -4,
1780 7699, -4, 7701, -4, 7703, -4,
1781 7705, -4, 7707, -4, // NOLINT
1782 7709, -4, 7711, -4, 7713, -4,
1783 7715, -4, 7717, -4, 7719, -4,
1784 7721, -4, 7723, -4, // NOLINT
1785 7725, -4, 7727, -4, 7729, -4,
1786 7731, -4, 7733, -4, 7735, -4,
1787 7737, -4, 7739, -4, // NOLINT
1788 7741, -4, 7743, -4, 7745, -4,
1789 7747, -4, 7749, -4, 7751, -4,
1790 7753, -4, 7755, -4, // NOLINT
1791 7757, -4, 7759, -4, 7761, -4,
1792 7763, -4, 7765, -4, 7767, -4,
1793 7769, -4, 7771, -4, // NOLINT
1794 7773, -4, 7775, -4, 7777, -4,
1795 7779, -4, 7781, -4, 7783, -4,
1796 7785, -4, 7787, -4, // NOLINT
1797 7789, -4, 7791, -4, 7793, -4,
1798 7795, -4, 7797, -4, 7799, -4,
1799 7801, -4, 7803, -4, // NOLINT
1800 7805, -4, 7807, -4, 7809, -4,
1801 7811, -4, 7813, -4, 7815, -4,
1802 7817, -4, 7819, -4, // NOLINT
1803 7821, -4, 7823, -4, 7825, -4,
1804 7827, -4, 7829, -4, 7835, -236,
1805 7841, -4, 7843, -4, // NOLINT
1806 7845, -4, 7847, -4, 7849, -4,
1807 7851, -4, 7853, -4, 7855, -4,
1808 7857, -4, 7859, -4, // NOLINT
1809 7861, -4, 7863, -4, 7865, -4,
1810 7867, -4, 7869, -4, 7871, -4,
1811 7873, -4, 7875, -4, // NOLINT
1812 7877, -4, 7879, -4, 7881, -4,
1813 7883, -4, 7885, -4, 7887, -4,
1814 7889, -4, 7891, -4, // NOLINT
1815 7893, -4, 7895, -4, 7897, -4,
1816 7899, -4, 7901, -4, 7903, -4,
1817 7905, -4, 7907, -4, // NOLINT
1818 7909, -4, 7911, -4, 7913, -4,
1819 7915, -4, 7917, -4, 7919, -4,
1820 7921, -4, 7923, -4, // NOLINT
1821 7925, -4, 7927, -4, 7929, -4,
1822 7931, -4, 7933, -4, 7935, -4,
1823 1073749760, 32, 7943, 32, // NOLINT
1824 1073749776, 32, 7957, 32, 1073749792, 32,
1825 7975, 32, 1073749808, 32, 7991, 32,
1826 1073749824, 32, 8005, 32, // NOLINT
1827 8017, 32, 8019, 32, 8021, 32,
1828 8023, 32, 1073749856, 32, 8039, 32,
1829 1073749872, 296, 8049, 296, // NOLINT
1830 1073749874, 344, 8053, 344, 1073749878, 400,
1831 8055, 400, 1073749880, 512, 8057, 512,
1832 1073749882, 448, 8059, 448, // NOLINT
1833 1073749884, 504, 8061, 504, 1073749936, 32,
1834 8113, 32, 8126, -28820, 1073749968, 32,
1835 8145, 32, 1073749984, 32, // NOLINT
1836 8161, 32, 8165, 28}; // NOLINT
1837 static const uint16_t kEcma262CanonicalizeMultiStrings0Size = 1; // NOLINT
1838 static const MultiCharacterSpecialCase<1> kEcma262CanonicalizeMultiStrings1[1] = { // NOLINT
1839 {{kSentinel}} }; // NOLINT
1840 static const uint16_t kEcma262CanonicalizeTable1Size = 73; // NOLINT
1841 static const int32_t kEcma262CanonicalizeTable1[146] = {
1842 334, -112, 1073742192, -64, 383, -64, 388, -4, 1073743056, -104, 1257, -104, 1073744944, -192, 3166, -192, // NOLINT
1843 3169, -4, 3173, -43180, 3174, -43168, 3176, -4, 3178, -4, 3180, -4, 3187, -4, 3190, -4, // NOLINT
1844 3201, -4, 3203, -4, 3205, -4, 3207, -4, 3209, -4, 3211, -4, 3213, -4, 3215, -4, // NOLINT
1845 3217, -4, 3219, -4, 3221, -4, 3223, -4, 3225, -4, 3227, -4, 3229, -4, 3231, -4, // NOLINT
1846 3233, -4, 3235, -4, 3237, -4, 3239, -4, 3241, -4, 3243, -4, 3245, -4, 3247, -4, // NOLINT
1847 3249, -4, 3251, -4, 3253, -4, 3255, -4, 3257, -4, 3259, -4, 3261, -4, 3263, -4, // NOLINT
1848 3265, -4, 3267, -4, 3269, -4, 3271, -4, 3273, -4, 3275, -4, 3277, -4, 3279, -4, // NOLINT
1849 3281, -4, 3283, -4, 3285, -4, 3287, -4, 3289, -4, 3291, -4, 3293, -4, 3295, -4, // NOLINT
1850 3297, -4, 3299, -4, 3308, -4, 3310, -4, 3315, -4, 1073745152, -29056, 3365, -29056, 3367, -29056, // NOLINT
1851 3373, -29056 }; // NOLINT
1852 static const uint16_t kEcma262CanonicalizeMultiStrings1Size = 1; // NOLINT
1853 static const MultiCharacterSpecialCase<1> kEcma262CanonicalizeMultiStrings5[1] = { // NOLINT
1854 {{kSentinel}} }; // NOLINT
1855 static const uint16_t kEcma262CanonicalizeTable5Size = 95; // NOLINT
1856 static const int32_t kEcma262CanonicalizeTable5
1857 [190] = {1601, -4, 1603, -4, 1605, -4, 1607, -4,
1858 1609, -4, 1611, -4, 1613, -4, 1615, -4, // NOLINT
1859 1617, -4, 1619, -4, 1621, -4, 1623, -4,
1860 1625, -4, 1627, -4, 1629, -4, 1631, -4, // NOLINT
1861 1633, -4, 1635, -4, 1637, -4, 1639, -4,
1862 1641, -4, 1643, -4, 1645, -4, 1665, -4, // NOLINT
1863 1667, -4, 1669, -4, 1671, -4, 1673, -4,
1864 1675, -4, 1677, -4, 1679, -4, 1681, -4, // NOLINT
1865 1683, -4, 1685, -4, 1687, -4, 1689, -4,
1866 1691, -4, 1827, -4, 1829, -4, 1831, -4, // NOLINT
1867 1833, -4, 1835, -4, 1837, -4, 1839, -4,
1868 1843, -4, 1845, -4, 1847, -4, 1849, -4, // NOLINT
1869 1851, -4, 1853, -4, 1855, -4, 1857, -4,
1870 1859, -4, 1861, -4, 1863, -4, 1865, -4, // NOLINT
1871 1867, -4, 1869, -4, 1871, -4, 1873, -4,
1872 1875, -4, 1877, -4, 1879, -4, 1881, -4, // NOLINT
1873 1883, -4, 1885, -4, 1887, -4, 1889, -4,
1874 1891, -4, 1893, -4, 1895, -4, 1897, -4, // NOLINT
1875 1899, -4, 1901, -4, 1903, -4, 1914, -4,
1876 1916, -4, 1919, -4, 1921, -4, 1923, -4, // NOLINT
1877 1925, -4, 1927, -4, 1932, -4, 1937, -4,
1878 1939, -4, 1943, -4, 1945, -4, 1947, -4, // NOLINT
1879 1949, -4, 1951, -4, 1953, -4, 1955, -4,
1880 1957, -4, 1959, -4, 1961, -4}; // NOLINT
1881 static const uint16_t kEcma262CanonicalizeMultiStrings5Size = 1; // NOLINT
1882 static const MultiCharacterSpecialCase<1> kEcma262CanonicalizeMultiStrings7[1] = { // NOLINT
1883 {{kSentinel}} }; // NOLINT
1884 static const uint16_t kEcma262CanonicalizeTable7Size = 2; // NOLINT
1885 static const int32_t kEcma262CanonicalizeTable7[4] = {
1886 1073749825, -128, 8026, -128 }; // NOLINT
1887 static const uint16_t kEcma262CanonicalizeMultiStrings7Size = 1; // NOLINT
Convert(uchar c,uchar n,uchar * result,bool * allow_caching_ptr)1888 int Ecma262Canonicalize::Convert(uchar c,
1889 uchar n,
1890 uchar* result,
1891 bool* allow_caching_ptr) {
1892 int chunk_index = c >> 13;
1893 switch (chunk_index) {
1894 case 0: return LookupMapping<true>(kEcma262CanonicalizeTable0,
1895 kEcma262CanonicalizeTable0Size,
1896 kEcma262CanonicalizeMultiStrings0,
1897 c,
1898 n,
1899 result,
1900 allow_caching_ptr);
1901 case 1: return LookupMapping<true>(kEcma262CanonicalizeTable1,
1902 kEcma262CanonicalizeTable1Size,
1903 kEcma262CanonicalizeMultiStrings1,
1904 c,
1905 n,
1906 result,
1907 allow_caching_ptr);
1908 case 5: return LookupMapping<true>(kEcma262CanonicalizeTable5,
1909 kEcma262CanonicalizeTable5Size,
1910 kEcma262CanonicalizeMultiStrings5,
1911 c,
1912 n,
1913 result,
1914 allow_caching_ptr);
1915 case 7: return LookupMapping<true>(kEcma262CanonicalizeTable7,
1916 kEcma262CanonicalizeTable7Size,
1917 kEcma262CanonicalizeMultiStrings7,
1918 c,
1919 n,
1920 result,
1921 allow_caching_ptr);
1922 default: return 0;
1923 }
1924 }
1925
1926 static const MultiCharacterSpecialCase<4>
1927 kEcma262UnCanonicalizeMultiStrings0[507] = { // NOLINT
1928 {{65, 97, kSentinel}},
1929 {{90, 122, kSentinel}},
1930 {{181, 924, 956, kSentinel}},
1931 {{192, 224, kSentinel}}, // NOLINT
1932 {{214, 246, kSentinel}},
1933 {{216, 248, kSentinel}},
1934 {{222, 254, kSentinel}},
1935 {{255, 376, kSentinel}}, // NOLINT
1936 {{256, 257, kSentinel}},
1937 {{258, 259, kSentinel}},
1938 {{260, 261, kSentinel}},
1939 {{262, 263, kSentinel}}, // NOLINT
1940 {{264, 265, kSentinel}},
1941 {{266, 267, kSentinel}},
1942 {{268, 269, kSentinel}},
1943 {{270, 271, kSentinel}}, // NOLINT
1944 {{272, 273, kSentinel}},
1945 {{274, 275, kSentinel}},
1946 {{276, 277, kSentinel}},
1947 {{278, 279, kSentinel}}, // NOLINT
1948 {{280, 281, kSentinel}},
1949 {{282, 283, kSentinel}},
1950 {{284, 285, kSentinel}},
1951 {{286, 287, kSentinel}}, // NOLINT
1952 {{288, 289, kSentinel}},
1953 {{290, 291, kSentinel}},
1954 {{292, 293, kSentinel}},
1955 {{294, 295, kSentinel}}, // NOLINT
1956 {{296, 297, kSentinel}},
1957 {{298, 299, kSentinel}},
1958 {{300, 301, kSentinel}},
1959 {{302, 303, kSentinel}}, // NOLINT
1960 {{306, 307, kSentinel}},
1961 {{308, 309, kSentinel}},
1962 {{310, 311, kSentinel}},
1963 {{313, 314, kSentinel}}, // NOLINT
1964 {{315, 316, kSentinel}},
1965 {{317, 318, kSentinel}},
1966 {{319, 320, kSentinel}},
1967 {{321, 322, kSentinel}}, // NOLINT
1968 {{323, 324, kSentinel}},
1969 {{325, 326, kSentinel}},
1970 {{327, 328, kSentinel}},
1971 {{330, 331, kSentinel}}, // NOLINT
1972 {{332, 333, kSentinel}},
1973 {{334, 335, kSentinel}},
1974 {{336, 337, kSentinel}},
1975 {{338, 339, kSentinel}}, // NOLINT
1976 {{340, 341, kSentinel}},
1977 {{342, 343, kSentinel}},
1978 {{344, 345, kSentinel}},
1979 {{346, 347, kSentinel}}, // NOLINT
1980 {{348, 349, kSentinel}},
1981 {{350, 351, kSentinel}},
1982 {{352, 353, kSentinel}},
1983 {{354, 355, kSentinel}}, // NOLINT
1984 {{356, 357, kSentinel}},
1985 {{358, 359, kSentinel}},
1986 {{360, 361, kSentinel}},
1987 {{362, 363, kSentinel}}, // NOLINT
1988 {{364, 365, kSentinel}},
1989 {{366, 367, kSentinel}},
1990 {{368, 369, kSentinel}},
1991 {{370, 371, kSentinel}}, // NOLINT
1992 {{372, 373, kSentinel}},
1993 {{374, 375, kSentinel}},
1994 {{377, 378, kSentinel}},
1995 {{379, 380, kSentinel}}, // NOLINT
1996 {{381, 382, kSentinel}},
1997 {{384, 579, kSentinel}},
1998 {{385, 595, kSentinel}},
1999 {{386, 387, kSentinel}}, // NOLINT
2000 {{388, 389, kSentinel}},
2001 {{390, 596, kSentinel}},
2002 {{391, 392, kSentinel}},
2003 {{393, 598, kSentinel}}, // NOLINT
2004 {{394, 599, kSentinel}},
2005 {{395, 396, kSentinel}},
2006 {{398, 477, kSentinel}},
2007 {{399, 601, kSentinel}}, // NOLINT
2008 {{400, 603, kSentinel}},
2009 {{401, 402, kSentinel}},
2010 {{403, 608, kSentinel}},
2011 {{404, 611, kSentinel}}, // NOLINT
2012 {{405, 502, kSentinel}},
2013 {{406, 617, kSentinel}},
2014 {{407, 616, kSentinel}},
2015 {{408, 409, kSentinel}}, // NOLINT
2016 {{410, 573, kSentinel}},
2017 {{412, 623, kSentinel}},
2018 {{413, 626, kSentinel}},
2019 {{414, 544, kSentinel}}, // NOLINT
2020 {{415, 629, kSentinel}},
2021 {{416, 417, kSentinel}},
2022 {{418, 419, kSentinel}},
2023 {{420, 421, kSentinel}}, // NOLINT
2024 {{422, 640, kSentinel}},
2025 {{423, 424, kSentinel}},
2026 {{425, 643, kSentinel}},
2027 {{428, 429, kSentinel}}, // NOLINT
2028 {{430, 648, kSentinel}},
2029 {{431, 432, kSentinel}},
2030 {{433, 650, kSentinel}},
2031 {{434, 651, kSentinel}}, // NOLINT
2032 {{435, 436, kSentinel}},
2033 {{437, 438, kSentinel}},
2034 {{439, 658, kSentinel}},
2035 {{440, 441, kSentinel}}, // NOLINT
2036 {{444, 445, kSentinel}},
2037 {{447, 503, kSentinel}},
2038 {{452, 453, 454, kSentinel}},
2039 {{455, 456, 457, kSentinel}}, // NOLINT
2040 {{458, 459, 460, kSentinel}},
2041 {{461, 462, kSentinel}},
2042 {{463, 464, kSentinel}},
2043 {{465, 466, kSentinel}}, // NOLINT
2044 {{467, 468, kSentinel}},
2045 {{469, 470, kSentinel}},
2046 {{471, 472, kSentinel}},
2047 {{473, 474, kSentinel}}, // NOLINT
2048 {{475, 476, kSentinel}},
2049 {{478, 479, kSentinel}},
2050 {{480, 481, kSentinel}},
2051 {{482, 483, kSentinel}}, // NOLINT
2052 {{484, 485, kSentinel}},
2053 {{486, 487, kSentinel}},
2054 {{488, 489, kSentinel}},
2055 {{490, 491, kSentinel}}, // NOLINT
2056 {{492, 493, kSentinel}},
2057 {{494, 495, kSentinel}},
2058 {{497, 498, 499, kSentinel}},
2059 {{500, 501, kSentinel}}, // NOLINT
2060 {{504, 505, kSentinel}},
2061 {{506, 507, kSentinel}},
2062 {{508, 509, kSentinel}},
2063 {{510, 511, kSentinel}}, // NOLINT
2064 {{512, 513, kSentinel}},
2065 {{514, 515, kSentinel}},
2066 {{516, 517, kSentinel}},
2067 {{518, 519, kSentinel}}, // NOLINT
2068 {{520, 521, kSentinel}},
2069 {{522, 523, kSentinel}},
2070 {{524, 525, kSentinel}},
2071 {{526, 527, kSentinel}}, // NOLINT
2072 {{528, 529, kSentinel}},
2073 {{530, 531, kSentinel}},
2074 {{532, 533, kSentinel}},
2075 {{534, 535, kSentinel}}, // NOLINT
2076 {{536, 537, kSentinel}},
2077 {{538, 539, kSentinel}},
2078 {{540, 541, kSentinel}},
2079 {{542, 543, kSentinel}}, // NOLINT
2080 {{546, 547, kSentinel}},
2081 {{548, 549, kSentinel}},
2082 {{550, 551, kSentinel}},
2083 {{552, 553, kSentinel}}, // NOLINT
2084 {{554, 555, kSentinel}},
2085 {{556, 557, kSentinel}},
2086 {{558, 559, kSentinel}},
2087 {{560, 561, kSentinel}}, // NOLINT
2088 {{562, 563, kSentinel}},
2089 {{570, 11365, kSentinel}},
2090 {{571, 572, kSentinel}},
2091 {{574, 11366, kSentinel}}, // NOLINT
2092 {{575, 11390, kSentinel}},
2093 {{576, 11391, kSentinel}},
2094 {{577, 578, kSentinel}},
2095 {{580, 649, kSentinel}}, // NOLINT
2096 {{581, 652, kSentinel}},
2097 {{582, 583, kSentinel}},
2098 {{584, 585, kSentinel}},
2099 {{586, 587, kSentinel}}, // NOLINT
2100 {{588, 589, kSentinel}},
2101 {{590, 591, kSentinel}},
2102 {{592, 11375, kSentinel}},
2103 {{593, 11373, kSentinel}}, // NOLINT
2104 {{594, 11376, kSentinel}},
2105 {{604, 42923, kSentinel}},
2106 {{609, 42924, kSentinel}},
2107 {{613, 42893, kSentinel}}, // NOLINT
2108 {{614, 42922, kSentinel}},
2109 {{619, 11362, kSentinel}},
2110 {{620, 42925, kSentinel}},
2111 {{625, 11374, kSentinel}}, // NOLINT
2112 {{637, 11364, kSentinel}},
2113 {{647, 42929, kSentinel}},
2114 {{670, 42928, kSentinel}},
2115 {{837, 921, 953, 8126}}, // NOLINT
2116 {{880, 881, kSentinel}},
2117 {{882, 883, kSentinel}},
2118 {{886, 887, kSentinel}},
2119 {{891, 1021, kSentinel}}, // NOLINT
2120 {{893, 1023, kSentinel}},
2121 {{895, 1011, kSentinel}},
2122 {{902, 940, kSentinel}},
2123 {{904, 941, kSentinel}}, // NOLINT
2124 {{906, 943, kSentinel}},
2125 {{908, 972, kSentinel}},
2126 {{910, 973, kSentinel}},
2127 {{911, 974, kSentinel}}, // NOLINT
2128 {{913, 945, kSentinel}},
2129 {{914, 946, 976, kSentinel}},
2130 {{915, 947, kSentinel}},
2131 {{916, 948, kSentinel}}, // NOLINT
2132 {{917, 949, 1013, kSentinel}},
2133 {{918, 950, kSentinel}},
2134 {{919, 951, kSentinel}},
2135 {{920, 952, 977, kSentinel}}, // NOLINT
2136 {{922, 954, 1008, kSentinel}},
2137 {{923, 955, kSentinel}},
2138 {{925, 957, kSentinel}},
2139 {{927, 959, kSentinel}}, // NOLINT
2140 {{928, 960, 982, kSentinel}},
2141 {{929, 961, 1009, kSentinel}},
2142 {{931, 962, 963, kSentinel}},
2143 {{932, 964, kSentinel}}, // NOLINT
2144 {{933, 965, kSentinel}},
2145 {{934, 966, 981, kSentinel}},
2146 {{935, 967, kSentinel}},
2147 {{939, 971, kSentinel}}, // NOLINT
2148 {{975, 983, kSentinel}},
2149 {{984, 985, kSentinel}},
2150 {{986, 987, kSentinel}},
2151 {{988, 989, kSentinel}}, // NOLINT
2152 {{990, 991, kSentinel}},
2153 {{992, 993, kSentinel}},
2154 {{994, 995, kSentinel}},
2155 {{996, 997, kSentinel}}, // NOLINT
2156 {{998, 999, kSentinel}},
2157 {{1000, 1001, kSentinel}},
2158 {{1002, 1003, kSentinel}},
2159 {{1004, 1005, kSentinel}}, // NOLINT
2160 {{1006, 1007, kSentinel}},
2161 {{1010, 1017, kSentinel}},
2162 {{1015, 1016, kSentinel}},
2163 {{1018, 1019, kSentinel}}, // NOLINT
2164 {{1024, 1104, kSentinel}},
2165 {{1039, 1119, kSentinel}},
2166 {{1040, 1072, kSentinel}},
2167 {{1071, 1103, kSentinel}}, // NOLINT
2168 {{1120, 1121, kSentinel}},
2169 {{1122, 1123, kSentinel}},
2170 {{1124, 1125, kSentinel}},
2171 {{1126, 1127, kSentinel}}, // NOLINT
2172 {{1128, 1129, kSentinel}},
2173 {{1130, 1131, kSentinel}},
2174 {{1132, 1133, kSentinel}},
2175 {{1134, 1135, kSentinel}}, // NOLINT
2176 {{1136, 1137, kSentinel}},
2177 {{1138, 1139, kSentinel}},
2178 {{1140, 1141, kSentinel}},
2179 {{1142, 1143, kSentinel}}, // NOLINT
2180 {{1144, 1145, kSentinel}},
2181 {{1146, 1147, kSentinel}},
2182 {{1148, 1149, kSentinel}},
2183 {{1150, 1151, kSentinel}}, // NOLINT
2184 {{1152, 1153, kSentinel}},
2185 {{1162, 1163, kSentinel}},
2186 {{1164, 1165, kSentinel}},
2187 {{1166, 1167, kSentinel}}, // NOLINT
2188 {{1168, 1169, kSentinel}},
2189 {{1170, 1171, kSentinel}},
2190 {{1172, 1173, kSentinel}},
2191 {{1174, 1175, kSentinel}}, // NOLINT
2192 {{1176, 1177, kSentinel}},
2193 {{1178, 1179, kSentinel}},
2194 {{1180, 1181, kSentinel}},
2195 {{1182, 1183, kSentinel}}, // NOLINT
2196 {{1184, 1185, kSentinel}},
2197 {{1186, 1187, kSentinel}},
2198 {{1188, 1189, kSentinel}},
2199 {{1190, 1191, kSentinel}}, // NOLINT
2200 {{1192, 1193, kSentinel}},
2201 {{1194, 1195, kSentinel}},
2202 {{1196, 1197, kSentinel}},
2203 {{1198, 1199, kSentinel}}, // NOLINT
2204 {{1200, 1201, kSentinel}},
2205 {{1202, 1203, kSentinel}},
2206 {{1204, 1205, kSentinel}},
2207 {{1206, 1207, kSentinel}}, // NOLINT
2208 {{1208, 1209, kSentinel}},
2209 {{1210, 1211, kSentinel}},
2210 {{1212, 1213, kSentinel}},
2211 {{1214, 1215, kSentinel}}, // NOLINT
2212 {{1216, 1231, kSentinel}},
2213 {{1217, 1218, kSentinel}},
2214 {{1219, 1220, kSentinel}},
2215 {{1221, 1222, kSentinel}}, // NOLINT
2216 {{1223, 1224, kSentinel}},
2217 {{1225, 1226, kSentinel}},
2218 {{1227, 1228, kSentinel}},
2219 {{1229, 1230, kSentinel}}, // NOLINT
2220 {{1232, 1233, kSentinel}},
2221 {{1234, 1235, kSentinel}},
2222 {{1236, 1237, kSentinel}},
2223 {{1238, 1239, kSentinel}}, // NOLINT
2224 {{1240, 1241, kSentinel}},
2225 {{1242, 1243, kSentinel}},
2226 {{1244, 1245, kSentinel}},
2227 {{1246, 1247, kSentinel}}, // NOLINT
2228 {{1248, 1249, kSentinel}},
2229 {{1250, 1251, kSentinel}},
2230 {{1252, 1253, kSentinel}},
2231 {{1254, 1255, kSentinel}}, // NOLINT
2232 {{1256, 1257, kSentinel}},
2233 {{1258, 1259, kSentinel}},
2234 {{1260, 1261, kSentinel}},
2235 {{1262, 1263, kSentinel}}, // NOLINT
2236 {{1264, 1265, kSentinel}},
2237 {{1266, 1267, kSentinel}},
2238 {{1268, 1269, kSentinel}},
2239 {{1270, 1271, kSentinel}}, // NOLINT
2240 {{1272, 1273, kSentinel}},
2241 {{1274, 1275, kSentinel}},
2242 {{1276, 1277, kSentinel}},
2243 {{1278, 1279, kSentinel}}, // NOLINT
2244 {{1280, 1281, kSentinel}},
2245 {{1282, 1283, kSentinel}},
2246 {{1284, 1285, kSentinel}},
2247 {{1286, 1287, kSentinel}}, // NOLINT
2248 {{1288, 1289, kSentinel}},
2249 {{1290, 1291, kSentinel}},
2250 {{1292, 1293, kSentinel}},
2251 {{1294, 1295, kSentinel}}, // NOLINT
2252 {{1296, 1297, kSentinel}},
2253 {{1298, 1299, kSentinel}},
2254 {{1300, 1301, kSentinel}},
2255 {{1302, 1303, kSentinel}}, // NOLINT
2256 {{1304, 1305, kSentinel}},
2257 {{1306, 1307, kSentinel}},
2258 {{1308, 1309, kSentinel}},
2259 {{1310, 1311, kSentinel}}, // NOLINT
2260 {{1312, 1313, kSentinel}},
2261 {{1314, 1315, kSentinel}},
2262 {{1316, 1317, kSentinel}},
2263 {{1318, 1319, kSentinel}}, // NOLINT
2264 {{1320, 1321, kSentinel}},
2265 {{1322, 1323, kSentinel}},
2266 {{1324, 1325, kSentinel}},
2267 {{1326, 1327, kSentinel}}, // NOLINT
2268 {{1329, 1377, kSentinel}},
2269 {{1366, 1414, kSentinel}},
2270 {{4256, 11520, kSentinel}},
2271 {{4293, 11557, kSentinel}}, // NOLINT
2272 {{4295, 11559, kSentinel}},
2273 {{4301, 11565, kSentinel}},
2274 {{7545, 42877, kSentinel}},
2275 {{7549, 11363, kSentinel}}, // NOLINT
2276 {{7680, 7681, kSentinel}},
2277 {{7682, 7683, kSentinel}},
2278 {{7684, 7685, kSentinel}},
2279 {{7686, 7687, kSentinel}}, // NOLINT
2280 {{7688, 7689, kSentinel}},
2281 {{7690, 7691, kSentinel}},
2282 {{7692, 7693, kSentinel}},
2283 {{7694, 7695, kSentinel}}, // NOLINT
2284 {{7696, 7697, kSentinel}},
2285 {{7698, 7699, kSentinel}},
2286 {{7700, 7701, kSentinel}},
2287 {{7702, 7703, kSentinel}}, // NOLINT
2288 {{7704, 7705, kSentinel}},
2289 {{7706, 7707, kSentinel}},
2290 {{7708, 7709, kSentinel}},
2291 {{7710, 7711, kSentinel}}, // NOLINT
2292 {{7712, 7713, kSentinel}},
2293 {{7714, 7715, kSentinel}},
2294 {{7716, 7717, kSentinel}},
2295 {{7718, 7719, kSentinel}}, // NOLINT
2296 {{7720, 7721, kSentinel}},
2297 {{7722, 7723, kSentinel}},
2298 {{7724, 7725, kSentinel}},
2299 {{7726, 7727, kSentinel}}, // NOLINT
2300 {{7728, 7729, kSentinel}},
2301 {{7730, 7731, kSentinel}},
2302 {{7732, 7733, kSentinel}},
2303 {{7734, 7735, kSentinel}}, // NOLINT
2304 {{7736, 7737, kSentinel}},
2305 {{7738, 7739, kSentinel}},
2306 {{7740, 7741, kSentinel}},
2307 {{7742, 7743, kSentinel}}, // NOLINT
2308 {{7744, 7745, kSentinel}},
2309 {{7746, 7747, kSentinel}},
2310 {{7748, 7749, kSentinel}},
2311 {{7750, 7751, kSentinel}}, // NOLINT
2312 {{7752, 7753, kSentinel}},
2313 {{7754, 7755, kSentinel}},
2314 {{7756, 7757, kSentinel}},
2315 {{7758, 7759, kSentinel}}, // NOLINT
2316 {{7760, 7761, kSentinel}},
2317 {{7762, 7763, kSentinel}},
2318 {{7764, 7765, kSentinel}},
2319 {{7766, 7767, kSentinel}}, // NOLINT
2320 {{7768, 7769, kSentinel}},
2321 {{7770, 7771, kSentinel}},
2322 {{7772, 7773, kSentinel}},
2323 {{7774, 7775, kSentinel}}, // NOLINT
2324 {{7776, 7777, 7835, kSentinel}},
2325 {{7778, 7779, kSentinel}},
2326 {{7780, 7781, kSentinel}},
2327 {{7782, 7783, kSentinel}}, // NOLINT
2328 {{7784, 7785, kSentinel}},
2329 {{7786, 7787, kSentinel}},
2330 {{7788, 7789, kSentinel}},
2331 {{7790, 7791, kSentinel}}, // NOLINT
2332 {{7792, 7793, kSentinel}},
2333 {{7794, 7795, kSentinel}},
2334 {{7796, 7797, kSentinel}},
2335 {{7798, 7799, kSentinel}}, // NOLINT
2336 {{7800, 7801, kSentinel}},
2337 {{7802, 7803, kSentinel}},
2338 {{7804, 7805, kSentinel}},
2339 {{7806, 7807, kSentinel}}, // NOLINT
2340 {{7808, 7809, kSentinel}},
2341 {{7810, 7811, kSentinel}},
2342 {{7812, 7813, kSentinel}},
2343 {{7814, 7815, kSentinel}}, // NOLINT
2344 {{7816, 7817, kSentinel}},
2345 {{7818, 7819, kSentinel}},
2346 {{7820, 7821, kSentinel}},
2347 {{7822, 7823, kSentinel}}, // NOLINT
2348 {{7824, 7825, kSentinel}},
2349 {{7826, 7827, kSentinel}},
2350 {{7828, 7829, kSentinel}},
2351 {{7840, 7841, kSentinel}}, // NOLINT
2352 {{7842, 7843, kSentinel}},
2353 {{7844, 7845, kSentinel}},
2354 {{7846, 7847, kSentinel}},
2355 {{7848, 7849, kSentinel}}, // NOLINT
2356 {{7850, 7851, kSentinel}},
2357 {{7852, 7853, kSentinel}},
2358 {{7854, 7855, kSentinel}},
2359 {{7856, 7857, kSentinel}}, // NOLINT
2360 {{7858, 7859, kSentinel}},
2361 {{7860, 7861, kSentinel}},
2362 {{7862, 7863, kSentinel}},
2363 {{7864, 7865, kSentinel}}, // NOLINT
2364 {{7866, 7867, kSentinel}},
2365 {{7868, 7869, kSentinel}},
2366 {{7870, 7871, kSentinel}},
2367 {{7872, 7873, kSentinel}}, // NOLINT
2368 {{7874, 7875, kSentinel}},
2369 {{7876, 7877, kSentinel}},
2370 {{7878, 7879, kSentinel}},
2371 {{7880, 7881, kSentinel}}, // NOLINT
2372 {{7882, 7883, kSentinel}},
2373 {{7884, 7885, kSentinel}},
2374 {{7886, 7887, kSentinel}},
2375 {{7888, 7889, kSentinel}}, // NOLINT
2376 {{7890, 7891, kSentinel}},
2377 {{7892, 7893, kSentinel}},
2378 {{7894, 7895, kSentinel}},
2379 {{7896, 7897, kSentinel}}, // NOLINT
2380 {{7898, 7899, kSentinel}},
2381 {{7900, 7901, kSentinel}},
2382 {{7902, 7903, kSentinel}},
2383 {{7904, 7905, kSentinel}}, // NOLINT
2384 {{7906, 7907, kSentinel}},
2385 {{7908, 7909, kSentinel}},
2386 {{7910, 7911, kSentinel}},
2387 {{7912, 7913, kSentinel}}, // NOLINT
2388 {{7914, 7915, kSentinel}},
2389 {{7916, 7917, kSentinel}},
2390 {{7918, 7919, kSentinel}},
2391 {{7920, 7921, kSentinel}}, // NOLINT
2392 {{7922, 7923, kSentinel}},
2393 {{7924, 7925, kSentinel}},
2394 {{7926, 7927, kSentinel}},
2395 {{7928, 7929, kSentinel}}, // NOLINT
2396 {{7930, 7931, kSentinel}},
2397 {{7932, 7933, kSentinel}},
2398 {{7934, 7935, kSentinel}},
2399 {{7936, 7944, kSentinel}}, // NOLINT
2400 {{7943, 7951, kSentinel}},
2401 {{7952, 7960, kSentinel}},
2402 {{7957, 7965, kSentinel}},
2403 {{7968, 7976, kSentinel}}, // NOLINT
2404 {{7975, 7983, kSentinel}},
2405 {{7984, 7992, kSentinel}},
2406 {{7991, 7999, kSentinel}},
2407 {{8000, 8008, kSentinel}}, // NOLINT
2408 {{8005, 8013, kSentinel}},
2409 {{8017, 8025, kSentinel}},
2410 {{8019, 8027, kSentinel}},
2411 {{8021, 8029, kSentinel}}, // NOLINT
2412 {{8023, 8031, kSentinel}},
2413 {{8032, 8040, kSentinel}},
2414 {{8039, 8047, kSentinel}},
2415 {{8048, 8122, kSentinel}}, // NOLINT
2416 {{8049, 8123, kSentinel}},
2417 {{8050, 8136, kSentinel}},
2418 {{8053, 8139, kSentinel}},
2419 {{8054, 8154, kSentinel}}, // NOLINT
2420 {{8055, 8155, kSentinel}},
2421 {{8056, 8184, kSentinel}},
2422 {{8057, 8185, kSentinel}},
2423 {{8058, 8170, kSentinel}}, // NOLINT
2424 {{8059, 8171, kSentinel}},
2425 {{8060, 8186, kSentinel}},
2426 {{8061, 8187, kSentinel}},
2427 {{8112, 8120, kSentinel}}, // NOLINT
2428 {{8113, 8121, kSentinel}},
2429 {{8144, 8152, kSentinel}},
2430 {{8145, 8153, kSentinel}},
2431 {{8160, 8168, kSentinel}}, // NOLINT
2432 {{8161, 8169, kSentinel}},
2433 {{8165, 8172, kSentinel}},
2434 {{kSentinel}}}; // NOLINT
2435 static const uint16_t kEcma262UnCanonicalizeTable0Size = 1005; // NOLINT
2436 static const int32_t kEcma262UnCanonicalizeTable0[2010] = {
2437 1073741889, 1, 90, 5, 1073741921, 1,
2438 122, 5, 181, 9, 1073742016, 13,
2439 214, 17, 1073742040, 21, // NOLINT
2440 222, 25, 1073742048, 13, 246, 17,
2441 1073742072, 21, 254, 25, 255, 29,
2442 256, 33, 257, 33, // NOLINT
2443 258, 37, 259, 37, 260, 41,
2444 261, 41, 262, 45, 263, 45,
2445 264, 49, 265, 49, // NOLINT
2446 266, 53, 267, 53, 268, 57,
2447 269, 57, 270, 61, 271, 61,
2448 272, 65, 273, 65, // NOLINT
2449 274, 69, 275, 69, 276, 73,
2450 277, 73, 278, 77, 279, 77,
2451 280, 81, 281, 81, // NOLINT
2452 282, 85, 283, 85, 284, 89,
2453 285, 89, 286, 93, 287, 93,
2454 288, 97, 289, 97, // NOLINT
2455 290, 101, 291, 101, 292, 105,
2456 293, 105, 294, 109, 295, 109,
2457 296, 113, 297, 113, // NOLINT
2458 298, 117, 299, 117, 300, 121,
2459 301, 121, 302, 125, 303, 125,
2460 306, 129, 307, 129, // NOLINT
2461 308, 133, 309, 133, 310, 137,
2462 311, 137, 313, 141, 314, 141,
2463 315, 145, 316, 145, // NOLINT
2464 317, 149, 318, 149, 319, 153,
2465 320, 153, 321, 157, 322, 157,
2466 323, 161, 324, 161, // NOLINT
2467 325, 165, 326, 165, 327, 169,
2468 328, 169, 330, 173, 331, 173,
2469 332, 177, 333, 177, // NOLINT
2470 334, 181, 335, 181, 336, 185,
2471 337, 185, 338, 189, 339, 189,
2472 340, 193, 341, 193, // NOLINT
2473 342, 197, 343, 197, 344, 201,
2474 345, 201, 346, 205, 347, 205,
2475 348, 209, 349, 209, // NOLINT
2476 350, 213, 351, 213, 352, 217,
2477 353, 217, 354, 221, 355, 221,
2478 356, 225, 357, 225, // NOLINT
2479 358, 229, 359, 229, 360, 233,
2480 361, 233, 362, 237, 363, 237,
2481 364, 241, 365, 241, // NOLINT
2482 366, 245, 367, 245, 368, 249,
2483 369, 249, 370, 253, 371, 253,
2484 372, 257, 373, 257, // NOLINT
2485 374, 261, 375, 261, 376, 29,
2486 377, 265, 378, 265, 379, 269,
2487 380, 269, 381, 273, // NOLINT
2488 382, 273, 384, 277, 385, 281,
2489 386, 285, 387, 285, 388, 289,
2490 389, 289, 390, 293, // NOLINT
2491 391, 297, 392, 297, 1073742217, 301,
2492 394, 305, 395, 309, 396, 309,
2493 398, 313, 399, 317, // NOLINT
2494 400, 321, 401, 325, 402, 325,
2495 403, 329, 404, 333, 405, 337,
2496 406, 341, 407, 345, // NOLINT
2497 408, 349, 409, 349, 410, 353,
2498 412, 357, 413, 361, 414, 365,
2499 415, 369, 416, 373, // NOLINT
2500 417, 373, 418, 377, 419, 377,
2501 420, 381, 421, 381, 422, 385,
2502 423, 389, 424, 389, // NOLINT
2503 425, 393, 428, 397, 429, 397,
2504 430, 401, 431, 405, 432, 405,
2505 1073742257, 409, 434, 413, // NOLINT
2506 435, 417, 436, 417, 437, 421,
2507 438, 421, 439, 425, 440, 429,
2508 441, 429, 444, 433, // NOLINT
2509 445, 433, 447, 437, 452, 441,
2510 453, 441, 454, 441, 455, 445,
2511 456, 445, 457, 445, // NOLINT
2512 458, 449, 459, 449, 460, 449,
2513 461, 453, 462, 453, 463, 457,
2514 464, 457, 465, 461, // NOLINT
2515 466, 461, 467, 465, 468, 465,
2516 469, 469, 470, 469, 471, 473,
2517 472, 473, 473, 477, // NOLINT
2518 474, 477, 475, 481, 476, 481,
2519 477, 313, 478, 485, 479, 485,
2520 480, 489, 481, 489, // NOLINT
2521 482, 493, 483, 493, 484, 497,
2522 485, 497, 486, 501, 487, 501,
2523 488, 505, 489, 505, // NOLINT
2524 490, 509, 491, 509, 492, 513,
2525 493, 513, 494, 517, 495, 517,
2526 497, 521, 498, 521, // NOLINT
2527 499, 521, 500, 525, 501, 525,
2528 502, 337, 503, 437, 504, 529,
2529 505, 529, 506, 533, // NOLINT
2530 507, 533, 508, 537, 509, 537,
2531 510, 541, 511, 541, 512, 545,
2532 513, 545, 514, 549, // NOLINT
2533 515, 549, 516, 553, 517, 553,
2534 518, 557, 519, 557, 520, 561,
2535 521, 561, 522, 565, // NOLINT
2536 523, 565, 524, 569, 525, 569,
2537 526, 573, 527, 573, 528, 577,
2538 529, 577, 530, 581, // NOLINT
2539 531, 581, 532, 585, 533, 585,
2540 534, 589, 535, 589, 536, 593,
2541 537, 593, 538, 597, // NOLINT
2542 539, 597, 540, 601, 541, 601,
2543 542, 605, 543, 605, 544, 365,
2544 546, 609, 547, 609, // NOLINT
2545 548, 613, 549, 613, 550, 617,
2546 551, 617, 552, 621, 553, 621,
2547 554, 625, 555, 625, // NOLINT
2548 556, 629, 557, 629, 558, 633,
2549 559, 633, 560, 637, 561, 637,
2550 562, 641, 563, 641, // NOLINT
2551 570, 645, 571, 649, 572, 649,
2552 573, 353, 574, 653, 1073742399, 657,
2553 576, 661, 577, 665, // NOLINT
2554 578, 665, 579, 277, 580, 669,
2555 581, 673, 582, 677, 583, 677,
2556 584, 681, 585, 681, // NOLINT
2557 586, 685, 587, 685, 588, 689,
2558 589, 689, 590, 693, 591, 693,
2559 592, 697, 593, 701, // NOLINT
2560 594, 705, 595, 281, 596, 293,
2561 1073742422, 301, 599, 305, 601, 317,
2562 603, 321, 604, 709, // NOLINT
2563 608, 329, 609, 713, 611, 333,
2564 613, 717, 614, 721, 616, 345,
2565 617, 341, 619, 725, // NOLINT
2566 620, 729, 623, 357, 625, 733,
2567 626, 361, 629, 369, 637, 737,
2568 640, 385, 643, 393, // NOLINT
2569 647, 741, 648, 401, 649, 669,
2570 1073742474, 409, 651, 413, 652, 673,
2571 658, 425, 670, 745, // NOLINT
2572 837, 749, 880, 753, 881, 753,
2573 882, 757, 883, 757, 886, 761,
2574 887, 761, 1073742715, 765, // NOLINT
2575 893, 769, 895, 773, 902, 777,
2576 1073742728, 781, 906, 785, 908, 789,
2577 1073742734, 793, 911, 797, // NOLINT
2578 913, 801, 914, 805, 1073742739, 809,
2579 916, 813, 917, 817, 1073742742, 821,
2580 919, 825, 920, 829, // NOLINT
2581 921, 749, 922, 833, 923, 837,
2582 924, 9, 1073742749, 841, 927, 845,
2583 928, 849, 929, 853, // NOLINT
2584 931, 857, 1073742756, 861, 933, 865,
2585 934, 869, 1073742759, 873, 939, 877,
2586 940, 777, 1073742765, 781, // NOLINT
2587 943, 785, 945, 801, 946, 805,
2588 1073742771, 809, 948, 813, 949, 817,
2589 1073742774, 821, 951, 825, // NOLINT
2590 952, 829, 953, 749, 954, 833,
2591 955, 837, 956, 9, 1073742781, 841,
2592 959, 845, 960, 849, // NOLINT
2593 961, 853, 962, 857, 963, 857,
2594 1073742788, 861, 965, 865, 966, 869,
2595 1073742791, 873, 971, 877, // NOLINT
2596 972, 789, 1073742797, 793, 974, 797,
2597 975, 881, 976, 805, 977, 829,
2598 981, 869, 982, 849, // NOLINT
2599 983, 881, 984, 885, 985, 885,
2600 986, 889, 987, 889, 988, 893,
2601 989, 893, 990, 897, // NOLINT
2602 991, 897, 992, 901, 993, 901,
2603 994, 905, 995, 905, 996, 909,
2604 997, 909, 998, 913, // NOLINT
2605 999, 913, 1000, 917, 1001, 917,
2606 1002, 921, 1003, 921, 1004, 925,
2607 1005, 925, 1006, 929, // NOLINT
2608 1007, 929, 1008, 833, 1009, 853,
2609 1010, 933, 1011, 773, 1013, 817,
2610 1015, 937, 1016, 937, // NOLINT
2611 1017, 933, 1018, 941, 1019, 941,
2612 1073742845, 765, 1023, 769, 1073742848, 945,
2613 1039, 949, 1073742864, 953, // NOLINT
2614 1071, 957, 1073742896, 953, 1103, 957,
2615 1073742928, 945, 1119, 949, 1120, 961,
2616 1121, 961, 1122, 965, // NOLINT
2617 1123, 965, 1124, 969, 1125, 969,
2618 1126, 973, 1127, 973, 1128, 977,
2619 1129, 977, 1130, 981, // NOLINT
2620 1131, 981, 1132, 985, 1133, 985,
2621 1134, 989, 1135, 989, 1136, 993,
2622 1137, 993, 1138, 997, // NOLINT
2623 1139, 997, 1140, 1001, 1141, 1001,
2624 1142, 1005, 1143, 1005, 1144, 1009,
2625 1145, 1009, 1146, 1013, // NOLINT
2626 1147, 1013, 1148, 1017, 1149, 1017,
2627 1150, 1021, 1151, 1021, 1152, 1025,
2628 1153, 1025, 1162, 1029, // NOLINT
2629 1163, 1029, 1164, 1033, 1165, 1033,
2630 1166, 1037, 1167, 1037, 1168, 1041,
2631 1169, 1041, 1170, 1045, // NOLINT
2632 1171, 1045, 1172, 1049, 1173, 1049,
2633 1174, 1053, 1175, 1053, 1176, 1057,
2634 1177, 1057, 1178, 1061, // NOLINT
2635 1179, 1061, 1180, 1065, 1181, 1065,
2636 1182, 1069, 1183, 1069, 1184, 1073,
2637 1185, 1073, 1186, 1077, // NOLINT
2638 1187, 1077, 1188, 1081, 1189, 1081,
2639 1190, 1085, 1191, 1085, 1192, 1089,
2640 1193, 1089, 1194, 1093, // NOLINT
2641 1195, 1093, 1196, 1097, 1197, 1097,
2642 1198, 1101, 1199, 1101, 1200, 1105,
2643 1201, 1105, 1202, 1109, // NOLINT
2644 1203, 1109, 1204, 1113, 1205, 1113,
2645 1206, 1117, 1207, 1117, 1208, 1121,
2646 1209, 1121, 1210, 1125, // NOLINT
2647 1211, 1125, 1212, 1129, 1213, 1129,
2648 1214, 1133, 1215, 1133, 1216, 1137,
2649 1217, 1141, 1218, 1141, // NOLINT
2650 1219, 1145, 1220, 1145, 1221, 1149,
2651 1222, 1149, 1223, 1153, 1224, 1153,
2652 1225, 1157, 1226, 1157, // NOLINT
2653 1227, 1161, 1228, 1161, 1229, 1165,
2654 1230, 1165, 1231, 1137, 1232, 1169,
2655 1233, 1169, 1234, 1173, // NOLINT
2656 1235, 1173, 1236, 1177, 1237, 1177,
2657 1238, 1181, 1239, 1181, 1240, 1185,
2658 1241, 1185, 1242, 1189, // NOLINT
2659 1243, 1189, 1244, 1193, 1245, 1193,
2660 1246, 1197, 1247, 1197, 1248, 1201,
2661 1249, 1201, 1250, 1205, // NOLINT
2662 1251, 1205, 1252, 1209, 1253, 1209,
2663 1254, 1213, 1255, 1213, 1256, 1217,
2664 1257, 1217, 1258, 1221, // NOLINT
2665 1259, 1221, 1260, 1225, 1261, 1225,
2666 1262, 1229, 1263, 1229, 1264, 1233,
2667 1265, 1233, 1266, 1237, // NOLINT
2668 1267, 1237, 1268, 1241, 1269, 1241,
2669 1270, 1245, 1271, 1245, 1272, 1249,
2670 1273, 1249, 1274, 1253, // NOLINT
2671 1275, 1253, 1276, 1257, 1277, 1257,
2672 1278, 1261, 1279, 1261, 1280, 1265,
2673 1281, 1265, 1282, 1269, // NOLINT
2674 1283, 1269, 1284, 1273, 1285, 1273,
2675 1286, 1277, 1287, 1277, 1288, 1281,
2676 1289, 1281, 1290, 1285, // NOLINT
2677 1291, 1285, 1292, 1289, 1293, 1289,
2678 1294, 1293, 1295, 1293, 1296, 1297,
2679 1297, 1297, 1298, 1301, // NOLINT
2680 1299, 1301, 1300, 1305, 1301, 1305,
2681 1302, 1309, 1303, 1309, 1304, 1313,
2682 1305, 1313, 1306, 1317, // NOLINT
2683 1307, 1317, 1308, 1321, 1309, 1321,
2684 1310, 1325, 1311, 1325, 1312, 1329,
2685 1313, 1329, 1314, 1333, // NOLINT
2686 1315, 1333, 1316, 1337, 1317, 1337,
2687 1318, 1341, 1319, 1341, 1320, 1345,
2688 1321, 1345, 1322, 1349, // NOLINT
2689 1323, 1349, 1324, 1353, 1325, 1353,
2690 1326, 1357, 1327, 1357, 1073743153, 1361,
2691 1366, 1365, 1073743201, 1361, // NOLINT
2692 1414, 1365, 1073746080, 1369, 4293, 1373,
2693 4295, 1377, 4301, 1381, 7545, 1385,
2694 7549, 1389, 7680, 1393, // NOLINT
2695 7681, 1393, 7682, 1397, 7683, 1397,
2696 7684, 1401, 7685, 1401, 7686, 1405,
2697 7687, 1405, 7688, 1409, // NOLINT
2698 7689, 1409, 7690, 1413, 7691, 1413,
2699 7692, 1417, 7693, 1417, 7694, 1421,
2700 7695, 1421, 7696, 1425, // NOLINT
2701 7697, 1425, 7698, 1429, 7699, 1429,
2702 7700, 1433, 7701, 1433, 7702, 1437,
2703 7703, 1437, 7704, 1441, // NOLINT
2704 7705, 1441, 7706, 1445, 7707, 1445,
2705 7708, 1449, 7709, 1449, 7710, 1453,
2706 7711, 1453, 7712, 1457, // NOLINT
2707 7713, 1457, 7714, 1461, 7715, 1461,
2708 7716, 1465, 7717, 1465, 7718, 1469,
2709 7719, 1469, 7720, 1473, // NOLINT
2710 7721, 1473, 7722, 1477, 7723, 1477,
2711 7724, 1481, 7725, 1481, 7726, 1485,
2712 7727, 1485, 7728, 1489, // NOLINT
2713 7729, 1489, 7730, 1493, 7731, 1493,
2714 7732, 1497, 7733, 1497, 7734, 1501,
2715 7735, 1501, 7736, 1505, // NOLINT
2716 7737, 1505, 7738, 1509, 7739, 1509,
2717 7740, 1513, 7741, 1513, 7742, 1517,
2718 7743, 1517, 7744, 1521, // NOLINT
2719 7745, 1521, 7746, 1525, 7747, 1525,
2720 7748, 1529, 7749, 1529, 7750, 1533,
2721 7751, 1533, 7752, 1537, // NOLINT
2722 7753, 1537, 7754, 1541, 7755, 1541,
2723 7756, 1545, 7757, 1545, 7758, 1549,
2724 7759, 1549, 7760, 1553, // NOLINT
2725 7761, 1553, 7762, 1557, 7763, 1557,
2726 7764, 1561, 7765, 1561, 7766, 1565,
2727 7767, 1565, 7768, 1569, // NOLINT
2728 7769, 1569, 7770, 1573, 7771, 1573,
2729 7772, 1577, 7773, 1577, 7774, 1581,
2730 7775, 1581, 7776, 1585, // NOLINT
2731 7777, 1585, 7778, 1589, 7779, 1589,
2732 7780, 1593, 7781, 1593, 7782, 1597,
2733 7783, 1597, 7784, 1601, // NOLINT
2734 7785, 1601, 7786, 1605, 7787, 1605,
2735 7788, 1609, 7789, 1609, 7790, 1613,
2736 7791, 1613, 7792, 1617, // NOLINT
2737 7793, 1617, 7794, 1621, 7795, 1621,
2738 7796, 1625, 7797, 1625, 7798, 1629,
2739 7799, 1629, 7800, 1633, // NOLINT
2740 7801, 1633, 7802, 1637, 7803, 1637,
2741 7804, 1641, 7805, 1641, 7806, 1645,
2742 7807, 1645, 7808, 1649, // NOLINT
2743 7809, 1649, 7810, 1653, 7811, 1653,
2744 7812, 1657, 7813, 1657, 7814, 1661,
2745 7815, 1661, 7816, 1665, // NOLINT
2746 7817, 1665, 7818, 1669, 7819, 1669,
2747 7820, 1673, 7821, 1673, 7822, 1677,
2748 7823, 1677, 7824, 1681, // NOLINT
2749 7825, 1681, 7826, 1685, 7827, 1685,
2750 7828, 1689, 7829, 1689, 7835, 1585,
2751 7840, 1693, 7841, 1693, // NOLINT
2752 7842, 1697, 7843, 1697, 7844, 1701,
2753 7845, 1701, 7846, 1705, 7847, 1705,
2754 7848, 1709, 7849, 1709, // NOLINT
2755 7850, 1713, 7851, 1713, 7852, 1717,
2756 7853, 1717, 7854, 1721, 7855, 1721,
2757 7856, 1725, 7857, 1725, // NOLINT
2758 7858, 1729, 7859, 1729, 7860, 1733,
2759 7861, 1733, 7862, 1737, 7863, 1737,
2760 7864, 1741, 7865, 1741, // NOLINT
2761 7866, 1745, 7867, 1745, 7868, 1749,
2762 7869, 1749, 7870, 1753, 7871, 1753,
2763 7872, 1757, 7873, 1757, // NOLINT
2764 7874, 1761, 7875, 1761, 7876, 1765,
2765 7877, 1765, 7878, 1769, 7879, 1769,
2766 7880, 1773, 7881, 1773, // NOLINT
2767 7882, 1777, 7883, 1777, 7884, 1781,
2768 7885, 1781, 7886, 1785, 7887, 1785,
2769 7888, 1789, 7889, 1789, // NOLINT
2770 7890, 1793, 7891, 1793, 7892, 1797,
2771 7893, 1797, 7894, 1801, 7895, 1801,
2772 7896, 1805, 7897, 1805, // NOLINT
2773 7898, 1809, 7899, 1809, 7900, 1813,
2774 7901, 1813, 7902, 1817, 7903, 1817,
2775 7904, 1821, 7905, 1821, // NOLINT
2776 7906, 1825, 7907, 1825, 7908, 1829,
2777 7909, 1829, 7910, 1833, 7911, 1833,
2778 7912, 1837, 7913, 1837, // NOLINT
2779 7914, 1841, 7915, 1841, 7916, 1845,
2780 7917, 1845, 7918, 1849, 7919, 1849,
2781 7920, 1853, 7921, 1853, // NOLINT
2782 7922, 1857, 7923, 1857, 7924, 1861,
2783 7925, 1861, 7926, 1865, 7927, 1865,
2784 7928, 1869, 7929, 1869, // NOLINT
2785 7930, 1873, 7931, 1873, 7932, 1877,
2786 7933, 1877, 7934, 1881, 7935, 1881,
2787 1073749760, 1885, 7943, 1889, // NOLINT
2788 1073749768, 1885, 7951, 1889, 1073749776, 1893,
2789 7957, 1897, 1073749784, 1893, 7965, 1897,
2790 1073749792, 1901, 7975, 1905, // NOLINT
2791 1073749800, 1901, 7983, 1905, 1073749808, 1909,
2792 7991, 1913, 1073749816, 1909, 7999, 1913,
2793 1073749824, 1917, 8005, 1921, // NOLINT
2794 1073749832, 1917, 8013, 1921, 8017, 1925,
2795 8019, 1929, 8021, 1933, 8023, 1937,
2796 8025, 1925, 8027, 1929, // NOLINT
2797 8029, 1933, 8031, 1937, 1073749856, 1941,
2798 8039, 1945, 1073749864, 1941, 8047, 1945,
2799 1073749872, 1949, 8049, 1953, // NOLINT
2800 1073749874, 1957, 8053, 1961, 1073749878, 1965,
2801 8055, 1969, 1073749880, 1973, 8057, 1977,
2802 1073749882, 1981, 8059, 1985, // NOLINT
2803 1073749884, 1989, 8061, 1993, 1073749936, 1997,
2804 8113, 2001, 1073749944, 1997, 8121, 2001,
2805 1073749946, 1949, 8123, 1953, // NOLINT
2806 8126, 749, 1073749960, 1957, 8139, 1961,
2807 1073749968, 2005, 8145, 2009, 1073749976, 2005,
2808 8153, 2009, 1073749978, 1965, // NOLINT
2809 8155, 1969, 1073749984, 2013, 8161, 2017,
2810 8165, 2021, 1073749992, 2013, 8169, 2017,
2811 1073749994, 1981, 8171, 1985, // NOLINT
2812 8172, 2021, 1073750008, 1973, 8185, 1977,
2813 1073750010, 1989, 8187, 1993}; // NOLINT
2814 static const uint16_t kEcma262UnCanonicalizeMultiStrings0Size = 507; // NOLINT
2815 static const MultiCharacterSpecialCase<2> kEcma262UnCanonicalizeMultiStrings1[83] = { // NOLINT
2816 {{8498, 8526}}, {{8544, 8560}}, {{8559, 8575}}, {{8579, 8580}}, // NOLINT
2817 {{9398, 9424}}, {{9423, 9449}}, {{11264, 11312}}, {{11310, 11358}}, // NOLINT
2818 {{11360, 11361}}, {{619, 11362}}, {{7549, 11363}}, {{637, 11364}}, // NOLINT
2819 {{570, 11365}}, {{574, 11366}}, {{11367, 11368}}, {{11369, 11370}}, // NOLINT
2820 {{11371, 11372}}, {{593, 11373}}, {{625, 11374}}, {{592, 11375}}, // NOLINT
2821 {{594, 11376}}, {{11378, 11379}}, {{11381, 11382}}, {{575, 11390}}, // NOLINT
2822 {{576, 11391}}, {{11392, 11393}}, {{11394, 11395}}, {{11396, 11397}}, // NOLINT
2823 {{11398, 11399}}, {{11400, 11401}}, {{11402, 11403}}, {{11404, 11405}}, // NOLINT
2824 {{11406, 11407}}, {{11408, 11409}}, {{11410, 11411}}, {{11412, 11413}}, // NOLINT
2825 {{11414, 11415}}, {{11416, 11417}}, {{11418, 11419}}, {{11420, 11421}}, // NOLINT
2826 {{11422, 11423}}, {{11424, 11425}}, {{11426, 11427}}, {{11428, 11429}}, // NOLINT
2827 {{11430, 11431}}, {{11432, 11433}}, {{11434, 11435}}, {{11436, 11437}}, // NOLINT
2828 {{11438, 11439}}, {{11440, 11441}}, {{11442, 11443}}, {{11444, 11445}}, // NOLINT
2829 {{11446, 11447}}, {{11448, 11449}}, {{11450, 11451}}, {{11452, 11453}}, // NOLINT
2830 {{11454, 11455}}, {{11456, 11457}}, {{11458, 11459}}, {{11460, 11461}}, // NOLINT
2831 {{11462, 11463}}, {{11464, 11465}}, {{11466, 11467}}, {{11468, 11469}}, // NOLINT
2832 {{11470, 11471}}, {{11472, 11473}}, {{11474, 11475}}, {{11476, 11477}}, // NOLINT
2833 {{11478, 11479}}, {{11480, 11481}}, {{11482, 11483}}, {{11484, 11485}}, // NOLINT
2834 {{11486, 11487}}, {{11488, 11489}}, {{11490, 11491}}, {{11499, 11500}}, // NOLINT
2835 {{11501, 11502}}, {{11506, 11507}}, {{4256, 11520}}, {{4293, 11557}}, // NOLINT
2836 {{4295, 11559}}, {{4301, 11565}}, {{kSentinel}} }; // NOLINT
2837 static const uint16_t kEcma262UnCanonicalizeTable1Size = 149; // NOLINT
2838 static const int32_t kEcma262UnCanonicalizeTable1[298] = {
2839 306, 1, 334, 1, 1073742176, 5, 367, 9, 1073742192, 5, 383, 9, 387, 13, 388, 13, // NOLINT
2840 1073743030, 17, 1231, 21, 1073743056, 17, 1257, 21, 1073744896, 25, 3118, 29, 1073744944, 25, 3166, 29, // NOLINT
2841 3168, 33, 3169, 33, 3170, 37, 3171, 41, 3172, 45, 3173, 49, 3174, 53, 3175, 57, // NOLINT
2842 3176, 57, 3177, 61, 3178, 61, 3179, 65, 3180, 65, 3181, 69, 3182, 73, 3183, 77, // NOLINT
2843 3184, 81, 3186, 85, 3187, 85, 3189, 89, 3190, 89, 1073745022, 93, 3199, 97, 3200, 101, // NOLINT
2844 3201, 101, 3202, 105, 3203, 105, 3204, 109, 3205, 109, 3206, 113, 3207, 113, 3208, 117, // NOLINT
2845 3209, 117, 3210, 121, 3211, 121, 3212, 125, 3213, 125, 3214, 129, 3215, 129, 3216, 133, // NOLINT
2846 3217, 133, 3218, 137, 3219, 137, 3220, 141, 3221, 141, 3222, 145, 3223, 145, 3224, 149, // NOLINT
2847 3225, 149, 3226, 153, 3227, 153, 3228, 157, 3229, 157, 3230, 161, 3231, 161, 3232, 165, // NOLINT
2848 3233, 165, 3234, 169, 3235, 169, 3236, 173, 3237, 173, 3238, 177, 3239, 177, 3240, 181, // NOLINT
2849 3241, 181, 3242, 185, 3243, 185, 3244, 189, 3245, 189, 3246, 193, 3247, 193, 3248, 197, // NOLINT
2850 3249, 197, 3250, 201, 3251, 201, 3252, 205, 3253, 205, 3254, 209, 3255, 209, 3256, 213, // NOLINT
2851 3257, 213, 3258, 217, 3259, 217, 3260, 221, 3261, 221, 3262, 225, 3263, 225, 3264, 229, // NOLINT
2852 3265, 229, 3266, 233, 3267, 233, 3268, 237, 3269, 237, 3270, 241, 3271, 241, 3272, 245, // NOLINT
2853 3273, 245, 3274, 249, 3275, 249, 3276, 253, 3277, 253, 3278, 257, 3279, 257, 3280, 261, // NOLINT
2854 3281, 261, 3282, 265, 3283, 265, 3284, 269, 3285, 269, 3286, 273, 3287, 273, 3288, 277, // NOLINT
2855 3289, 277, 3290, 281, 3291, 281, 3292, 285, 3293, 285, 3294, 289, 3295, 289, 3296, 293, // NOLINT
2856 3297, 293, 3298, 297, 3299, 297, 3307, 301, 3308, 301, 3309, 305, 3310, 305, 3314, 309, // NOLINT
2857 3315, 309, 1073745152, 313, 3365, 317, 3367, 321, 3373, 325 }; // NOLINT
2858 static const uint16_t kEcma262UnCanonicalizeMultiStrings1Size = 83; // NOLINT
2859 static const MultiCharacterSpecialCase<2>
2860 kEcma262UnCanonicalizeMultiStrings5[104] = { // NOLINT
2861 {{42560, 42561}},
2862 {{42562, 42563}},
2863 {{42564, 42565}},
2864 {{42566, 42567}}, // NOLINT
2865 {{42568, 42569}},
2866 {{42570, 42571}},
2867 {{42572, 42573}},
2868 {{42574, 42575}}, // NOLINT
2869 {{42576, 42577}},
2870 {{42578, 42579}},
2871 {{42580, 42581}},
2872 {{42582, 42583}}, // NOLINT
2873 {{42584, 42585}},
2874 {{42586, 42587}},
2875 {{42588, 42589}},
2876 {{42590, 42591}}, // NOLINT
2877 {{42592, 42593}},
2878 {{42594, 42595}},
2879 {{42596, 42597}},
2880 {{42598, 42599}}, // NOLINT
2881 {{42600, 42601}},
2882 {{42602, 42603}},
2883 {{42604, 42605}},
2884 {{42624, 42625}}, // NOLINT
2885 {{42626, 42627}},
2886 {{42628, 42629}},
2887 {{42630, 42631}},
2888 {{42632, 42633}}, // NOLINT
2889 {{42634, 42635}},
2890 {{42636, 42637}},
2891 {{42638, 42639}},
2892 {{42640, 42641}}, // NOLINT
2893 {{42642, 42643}},
2894 {{42644, 42645}},
2895 {{42646, 42647}},
2896 {{42648, 42649}}, // NOLINT
2897 {{42650, 42651}},
2898 {{42786, 42787}},
2899 {{42788, 42789}},
2900 {{42790, 42791}}, // NOLINT
2901 {{42792, 42793}},
2902 {{42794, 42795}},
2903 {{42796, 42797}},
2904 {{42798, 42799}}, // NOLINT
2905 {{42802, 42803}},
2906 {{42804, 42805}},
2907 {{42806, 42807}},
2908 {{42808, 42809}}, // NOLINT
2909 {{42810, 42811}},
2910 {{42812, 42813}},
2911 {{42814, 42815}},
2912 {{42816, 42817}}, // NOLINT
2913 {{42818, 42819}},
2914 {{42820, 42821}},
2915 {{42822, 42823}},
2916 {{42824, 42825}}, // NOLINT
2917 {{42826, 42827}},
2918 {{42828, 42829}},
2919 {{42830, 42831}},
2920 {{42832, 42833}}, // NOLINT
2921 {{42834, 42835}},
2922 {{42836, 42837}},
2923 {{42838, 42839}},
2924 {{42840, 42841}}, // NOLINT
2925 {{42842, 42843}},
2926 {{42844, 42845}},
2927 {{42846, 42847}},
2928 {{42848, 42849}}, // NOLINT
2929 {{42850, 42851}},
2930 {{42852, 42853}},
2931 {{42854, 42855}},
2932 {{42856, 42857}}, // NOLINT
2933 {{42858, 42859}},
2934 {{42860, 42861}},
2935 {{42862, 42863}},
2936 {{42873, 42874}}, // NOLINT
2937 {{42875, 42876}},
2938 {{7545, 42877}},
2939 {{42878, 42879}},
2940 {{42880, 42881}}, // NOLINT
2941 {{42882, 42883}},
2942 {{42884, 42885}},
2943 {{42886, 42887}},
2944 {{42891, 42892}}, // NOLINT
2945 {{613, 42893}},
2946 {{42896, 42897}},
2947 {{42898, 42899}},
2948 {{42902, 42903}}, // NOLINT
2949 {{42904, 42905}},
2950 {{42906, 42907}},
2951 {{42908, 42909}},
2952 {{42910, 42911}}, // NOLINT
2953 {{42912, 42913}},
2954 {{42914, 42915}},
2955 {{42916, 42917}},
2956 {{42918, 42919}}, // NOLINT
2957 {{42920, 42921}},
2958 {{614, 42922}},
2959 {{604, 42923}},
2960 {{609, 42924}}, // NOLINT
2961 {{620, 42925}},
2962 {{670, 42928}},
2963 {{647, 42929}},
2964 {{kSentinel}}}; // NOLINT
2965 static const uint16_t kEcma262UnCanonicalizeTable5Size = 198; // NOLINT
2966 static const int32_t kEcma262UnCanonicalizeTable5
2967 [396] = {1600, 1, 1601, 1, 1602, 5, 1603, 5,
2968 1604, 9, 1605, 9, 1606, 13, 1607, 13, // NOLINT
2969 1608, 17, 1609, 17, 1610, 21, 1611, 21,
2970 1612, 25, 1613, 25, 1614, 29, 1615, 29, // NOLINT
2971 1616, 33, 1617, 33, 1618, 37, 1619, 37,
2972 1620, 41, 1621, 41, 1622, 45, 1623, 45, // NOLINT
2973 1624, 49, 1625, 49, 1626, 53, 1627, 53,
2974 1628, 57, 1629, 57, 1630, 61, 1631, 61, // NOLINT
2975 1632, 65, 1633, 65, 1634, 69, 1635, 69,
2976 1636, 73, 1637, 73, 1638, 77, 1639, 77, // NOLINT
2977 1640, 81, 1641, 81, 1642, 85, 1643, 85,
2978 1644, 89, 1645, 89, 1664, 93, 1665, 93, // NOLINT
2979 1666, 97, 1667, 97, 1668, 101, 1669, 101,
2980 1670, 105, 1671, 105, 1672, 109, 1673, 109, // NOLINT
2981 1674, 113, 1675, 113, 1676, 117, 1677, 117,
2982 1678, 121, 1679, 121, 1680, 125, 1681, 125, // NOLINT
2983 1682, 129, 1683, 129, 1684, 133, 1685, 133,
2984 1686, 137, 1687, 137, 1688, 141, 1689, 141, // NOLINT
2985 1690, 145, 1691, 145, 1826, 149, 1827, 149,
2986 1828, 153, 1829, 153, 1830, 157, 1831, 157, // NOLINT
2987 1832, 161, 1833, 161, 1834, 165, 1835, 165,
2988 1836, 169, 1837, 169, 1838, 173, 1839, 173, // NOLINT
2989 1842, 177, 1843, 177, 1844, 181, 1845, 181,
2990 1846, 185, 1847, 185, 1848, 189, 1849, 189, // NOLINT
2991 1850, 193, 1851, 193, 1852, 197, 1853, 197,
2992 1854, 201, 1855, 201, 1856, 205, 1857, 205, // NOLINT
2993 1858, 209, 1859, 209, 1860, 213, 1861, 213,
2994 1862, 217, 1863, 217, 1864, 221, 1865, 221, // NOLINT
2995 1866, 225, 1867, 225, 1868, 229, 1869, 229,
2996 1870, 233, 1871, 233, 1872, 237, 1873, 237, // NOLINT
2997 1874, 241, 1875, 241, 1876, 245, 1877, 245,
2998 1878, 249, 1879, 249, 1880, 253, 1881, 253, // NOLINT
2999 1882, 257, 1883, 257, 1884, 261, 1885, 261,
3000 1886, 265, 1887, 265, 1888, 269, 1889, 269, // NOLINT
3001 1890, 273, 1891, 273, 1892, 277, 1893, 277,
3002 1894, 281, 1895, 281, 1896, 285, 1897, 285, // NOLINT
3003 1898, 289, 1899, 289, 1900, 293, 1901, 293,
3004 1902, 297, 1903, 297, 1913, 301, 1914, 301, // NOLINT
3005 1915, 305, 1916, 305, 1917, 309, 1918, 313,
3006 1919, 313, 1920, 317, 1921, 317, 1922, 321, // NOLINT
3007 1923, 321, 1924, 325, 1925, 325, 1926, 329,
3008 1927, 329, 1931, 333, 1932, 333, 1933, 337, // NOLINT
3009 1936, 341, 1937, 341, 1938, 345, 1939, 345,
3010 1942, 349, 1943, 349, 1944, 353, 1945, 353, // NOLINT
3011 1946, 357, 1947, 357, 1948, 361, 1949, 361,
3012 1950, 365, 1951, 365, 1952, 369, 1953, 369, // NOLINT
3013 1954, 373, 1955, 373, 1956, 377, 1957, 377,
3014 1958, 381, 1959, 381, 1960, 385, 1961, 385, // NOLINT
3015 1962, 389, 1963, 393, 1964, 397, 1965, 401,
3016 1968, 405, 1969, 409}; // NOLINT
3017 static const uint16_t kEcma262UnCanonicalizeMultiStrings5Size = 104; // NOLINT
3018 static const MultiCharacterSpecialCase<2> kEcma262UnCanonicalizeMultiStrings7[3] = { // NOLINT
3019 {{65313, 65345}}, {{65338, 65370}}, {{kSentinel}} }; // NOLINT
3020 static const uint16_t kEcma262UnCanonicalizeTable7Size = 4; // NOLINT
3021 static const int32_t kEcma262UnCanonicalizeTable7[8] = {
3022 1073749793, 1, 7994, 5, 1073749825, 1, 8026, 5 }; // NOLINT
3023 static const uint16_t kEcma262UnCanonicalizeMultiStrings7Size = 3; // NOLINT
Convert(uchar c,uchar n,uchar * result,bool * allow_caching_ptr)3024 int Ecma262UnCanonicalize::Convert(uchar c,
3025 uchar n,
3026 uchar* result,
3027 bool* allow_caching_ptr) {
3028 int chunk_index = c >> 13;
3029 switch (chunk_index) {
3030 case 0: return LookupMapping<true>(kEcma262UnCanonicalizeTable0,
3031 kEcma262UnCanonicalizeTable0Size,
3032 kEcma262UnCanonicalizeMultiStrings0,
3033 c,
3034 n,
3035 result,
3036 allow_caching_ptr);
3037 case 1: return LookupMapping<true>(kEcma262UnCanonicalizeTable1,
3038 kEcma262UnCanonicalizeTable1Size,
3039 kEcma262UnCanonicalizeMultiStrings1,
3040 c,
3041 n,
3042 result,
3043 allow_caching_ptr);
3044 case 5: return LookupMapping<true>(kEcma262UnCanonicalizeTable5,
3045 kEcma262UnCanonicalizeTable5Size,
3046 kEcma262UnCanonicalizeMultiStrings5,
3047 c,
3048 n,
3049 result,
3050 allow_caching_ptr);
3051 case 7: return LookupMapping<true>(kEcma262UnCanonicalizeTable7,
3052 kEcma262UnCanonicalizeTable7Size,
3053 kEcma262UnCanonicalizeMultiStrings7,
3054 c,
3055 n,
3056 result,
3057 allow_caching_ptr);
3058 default: return 0;
3059 }
3060 }
3061
3062 static const MultiCharacterSpecialCase<1> kCanonicalizationRangeMultiStrings0[1] = { // NOLINT
3063 {{kSentinel}} }; // NOLINT
3064 static const uint16_t kCanonicalizationRangeTable0Size = 70; // NOLINT
3065 static const int32_t kCanonicalizationRangeTable0[140] = {
3066 1073741889, 100, 90, 0, 1073741921, 100, 122, 0, 1073742016, 88, 214, 0, 1073742040, 24, 222, 0, // NOLINT
3067 1073742048, 88, 246, 0, 1073742072, 24, 254, 0, 1073742715, 8, 893, 0, 1073742728, 8, 906, 0, // NOLINT
3068 1073742749, 8, 927, 0, 1073742759, 16, 939, 0, 1073742765, 8, 943, 0, 1073742781, 8, 959, 0, // NOLINT
3069 1073742791, 16, 971, 0, 1073742845, 8, 1023, 0, 1073742848, 60, 1039, 0, 1073742864, 124, 1071, 0, // NOLINT
3070 1073742896, 124, 1103, 0, 1073742928, 60, 1119, 0, 1073743153, 148, 1366, 0, 1073743201, 148, 1414, 0, // NOLINT
3071 1073746080, 148, 4293, 0, 1073749760, 28, 7943, 0, 1073749768, 28, 7951, 0, 1073749776, 20, 7957, 0, // NOLINT
3072 1073749784, 20, 7965, 0, 1073749792, 28, 7975, 0, 1073749800, 28, 7983, 0, 1073749808, 28, 7991, 0, // NOLINT
3073 1073749816, 28, 7999, 0, 1073749824, 20, 8005, 0, 1073749832, 20, 8013, 0, 1073749856, 28, 8039, 0, // NOLINT
3074 1073749864, 28, 8047, 0, 1073749874, 12, 8053, 0, 1073749960, 12, 8139, 0 }; // NOLINT
3075 static const uint16_t kCanonicalizationRangeMultiStrings0Size = 1; // NOLINT
3076 static const MultiCharacterSpecialCase<1> kCanonicalizationRangeMultiStrings1[1] = { // NOLINT
3077 {{kSentinel}} }; // NOLINT
3078 static const uint16_t kCanonicalizationRangeTable1Size = 14; // NOLINT
3079 static const int32_t kCanonicalizationRangeTable1[28] = {
3080 1073742176, 60, 367, 0, 1073742192, 60, 383, 0, 1073743030, 100, 1231, 0, 1073743056, 100, 1257, 0, // NOLINT
3081 1073744896, 184, 3118, 0, 1073744944, 184, 3166, 0, 1073745152, 148, 3365, 0 }; // NOLINT
3082 static const uint16_t kCanonicalizationRangeMultiStrings1Size = 1; // NOLINT
3083 static const MultiCharacterSpecialCase<1> kCanonicalizationRangeMultiStrings7[1] = { // NOLINT
3084 {{kSentinel}} }; // NOLINT
3085 static const uint16_t kCanonicalizationRangeTable7Size = 4; // NOLINT
3086 static const int32_t kCanonicalizationRangeTable7[8] = {
3087 1073749793, 100, 7994, 0, 1073749825, 100, 8026, 0 }; // NOLINT
3088 static const uint16_t kCanonicalizationRangeMultiStrings7Size = 1; // NOLINT
Convert(uchar c,uchar n,uchar * result,bool * allow_caching_ptr)3089 int CanonicalizationRange::Convert(uchar c,
3090 uchar n,
3091 uchar* result,
3092 bool* allow_caching_ptr) {
3093 int chunk_index = c >> 13;
3094 switch (chunk_index) {
3095 case 0: return LookupMapping<false>(kCanonicalizationRangeTable0,
3096 kCanonicalizationRangeTable0Size,
3097 kCanonicalizationRangeMultiStrings0,
3098 c,
3099 n,
3100 result,
3101 allow_caching_ptr);
3102 case 1: return LookupMapping<false>(kCanonicalizationRangeTable1,
3103 kCanonicalizationRangeTable1Size,
3104 kCanonicalizationRangeMultiStrings1,
3105 c,
3106 n,
3107 result,
3108 allow_caching_ptr);
3109 case 7: return LookupMapping<false>(kCanonicalizationRangeTable7,
3110 kCanonicalizationRangeTable7Size,
3111 kCanonicalizationRangeMultiStrings7,
3112 c,
3113 n,
3114 result,
3115 allow_caching_ptr);
3116 default: return 0;
3117 }
3118 }
3119
3120
3121 const uchar UnicodeData::kMaxCodePoint = 0xFFFD;
3122
GetByteCount()3123 int UnicodeData::GetByteCount() {
3124 #ifndef V8_INTL_SUPPORT // NOLINT
3125 return kUppercaseTable0Size * sizeof(int32_t) // NOLINT
3126 + kUppercaseTable1Size * sizeof(int32_t) // NOLINT
3127 + kUppercaseTable5Size * sizeof(int32_t) // NOLINT
3128 + kUppercaseTable7Size * sizeof(int32_t) // NOLINT
3129 + kLetterTable0Size * sizeof(int32_t) // NOLINT
3130 + kLetterTable1Size * sizeof(int32_t) // NOLINT
3131 + kLetterTable2Size * sizeof(int32_t) // NOLINT
3132 + kLetterTable3Size * sizeof(int32_t) // NOLINT
3133 + kLetterTable4Size * sizeof(int32_t) // NOLINT
3134 + kLetterTable5Size * sizeof(int32_t) // NOLINT
3135 + kLetterTable6Size * sizeof(int32_t) // NOLINT
3136 + kLetterTable7Size * sizeof(int32_t) // NOLINT
3137 + kID_StartTable0Size * sizeof(int32_t) // NOLINT
3138 + kID_StartTable1Size * sizeof(int32_t) // NOLINT
3139 + kID_StartTable2Size * sizeof(int32_t) // NOLINT
3140 + kID_StartTable3Size * sizeof(int32_t) // NOLINT
3141 + kID_StartTable4Size * sizeof(int32_t) // NOLINT
3142 + kID_StartTable5Size * sizeof(int32_t) // NOLINT
3143 + kID_StartTable6Size * sizeof(int32_t) // NOLINT
3144 + kID_StartTable7Size * sizeof(int32_t) // NOLINT
3145 + kID_ContinueTable0Size * sizeof(int32_t) // NOLINT
3146 + kID_ContinueTable1Size * sizeof(int32_t) // NOLINT
3147 + kID_ContinueTable5Size * sizeof(int32_t) // NOLINT
3148 + kID_ContinueTable7Size * sizeof(int32_t) // NOLINT
3149 + kWhiteSpaceTable0Size * sizeof(int32_t) // NOLINT
3150 + kWhiteSpaceTable1Size * sizeof(int32_t) // NOLINT
3151 + kWhiteSpaceTable7Size * sizeof(int32_t) // NOLINT
3152 +
3153 kToLowercaseMultiStrings0Size *
3154 sizeof(MultiCharacterSpecialCase<2>) // NOLINT
3155 +
3156 kToLowercaseMultiStrings1Size *
3157 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3158 +
3159 kToLowercaseMultiStrings5Size *
3160 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3161 +
3162 kToLowercaseMultiStrings7Size *
3163 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3164 +
3165 kToUppercaseMultiStrings0Size *
3166 sizeof(MultiCharacterSpecialCase<3>) // NOLINT
3167 +
3168 kToUppercaseMultiStrings1Size *
3169 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3170 +
3171 kToUppercaseMultiStrings5Size *
3172 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3173 +
3174 kToUppercaseMultiStrings7Size *
3175 sizeof(MultiCharacterSpecialCase<3>) // NOLINT
3176 #else
3177 return
3178 #endif // !V8_INTL_SUPPORT
3179 +
3180 kEcma262CanonicalizeMultiStrings0Size *
3181 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3182 +
3183 kEcma262CanonicalizeMultiStrings1Size *
3184 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3185 +
3186 kEcma262CanonicalizeMultiStrings5Size *
3187 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3188 +
3189 kEcma262CanonicalizeMultiStrings7Size *
3190 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3191 +
3192 kEcma262UnCanonicalizeMultiStrings0Size *
3193 sizeof(MultiCharacterSpecialCase<4>) // NOLINT
3194 +
3195 kEcma262UnCanonicalizeMultiStrings1Size *
3196 sizeof(MultiCharacterSpecialCase<2>) // NOLINT
3197 +
3198 kEcma262UnCanonicalizeMultiStrings5Size *
3199 sizeof(MultiCharacterSpecialCase<2>) // NOLINT
3200 +
3201 kEcma262UnCanonicalizeMultiStrings7Size *
3202 sizeof(MultiCharacterSpecialCase<2>) // NOLINT
3203 +
3204 kCanonicalizationRangeMultiStrings0Size *
3205 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3206 +
3207 kCanonicalizationRangeMultiStrings1Size *
3208 sizeof(MultiCharacterSpecialCase<1>) // NOLINT
3209 +
3210 kCanonicalizationRangeMultiStrings7Size *
3211 sizeof(MultiCharacterSpecialCase<1>); // NOLINT
3212 }
3213
3214 } // namespace unibrow
3215