OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file was generated at 2014-10-08 15:25:47.940335 (in v8, copied to dart) | 5 // This file was generated at 2014-10-08 15:25:47.940335 (in v8, copied to dart) |
6 | 6 |
7 #include "vm/unibrow-inl.h" | 7 #include "vm/unibrow-inl.h" |
8 #include "vm/unibrow.h" | 8 #include "vm/unibrow.h" |
9 | 9 |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 return -1; | 182 return -1; |
183 } | 183 } |
184 } else { | 184 } else { |
185 return 0; | 185 return 0; |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 | 189 |
190 // Letter: point.category in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl'] | 190 // Letter: point.category in ['Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Nl'] |
191 | 191 // clang-format off |
192 static const uint16_t kLetterTable0Size = 431; | 192 static const uint16_t kLetterTable0Size = 431; |
193 static const int32_t kLetterTable0[431] = { | 193 static const int32_t kLetterTable0[431] = { |
194 1073741889, 90, 1073741921, 122, | 194 1073741889, 90, 1073741921, 122, |
195 170, 181, 186, 1073742016, // NOLINT | 195 170, 181, 186, 1073742016, // NOLINT |
196 214, 1073742040, 246, 1073742072, | 196 214, 1073742040, 246, 1073742072, |
197 705, 1073742534, 721, 1073742560, // NOLINT | 197 705, 1073742534, 721, 1073742560, // NOLINT |
198 740, 748, 750, 1073742704, | 198 740, 748, 750, 1073742704, |
199 884, 1073742710, 887, 1073742714, // NOLINT | 199 884, 1073742710, 887, 1073742714, // NOLINT |
200 893, 895, 902, 1073742728, | 200 893, 895, 902, 1073742728, |
201 906, 908, 1073742734, 929, // NOLINT | 201 906, 908, 1073742734, 929, // NOLINT |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 {{kSentinel}} }; // NOLINT | 1816 {{kSentinel}} }; // NOLINT |
1817 static const uint16_t kCanonicalizationRangeTable1Size = 14; // NOLINT | 1817 static const uint16_t kCanonicalizationRangeTable1Size = 14; // NOLINT |
1818 static const int32_t kCanonicalizationRangeTable1[28] = { | 1818 static const int32_t kCanonicalizationRangeTable1[28] = { |
1819 1073742176, 60, 367, 0, 1073742192, 60, 383, 0, 1073743030, 100, 1231, 0, 1073
743056, 100, 1257, 0, // NOLINT | 1819 1073742176, 60, 367, 0, 1073742192, 60, 383, 0, 1073743030, 100, 1231, 0, 1073
743056, 100, 1257, 0, // NOLINT |
1820 1073744896, 184, 3118, 0, 1073744944, 184, 3166, 0, 1073745152, 148, 3365, 0 }
; // NOLINT | 1820 1073744896, 184, 3118, 0, 1073744944, 184, 3166, 0, 1073745152, 148, 3365, 0 }
; // NOLINT |
1821 static const MultiCharacterSpecialCase<1> kCanonicalizationRangeMultiStrings7[1]
= { // NOLINT | 1821 static const MultiCharacterSpecialCase<1> kCanonicalizationRangeMultiStrings7[1]
= { // NOLINT |
1822 {{kSentinel}} }; // NOLINT | 1822 {{kSentinel}} }; // NOLINT |
1823 static const uint16_t kCanonicalizationRangeTable7Size = 4; // NOLINT | 1823 static const uint16_t kCanonicalizationRangeTable7Size = 4; // NOLINT |
1824 static const int32_t kCanonicalizationRangeTable7[8] = { | 1824 static const int32_t kCanonicalizationRangeTable7[8] = { |
1825 1073749793, 100, 7994, 0, 1073749825, 100, 8026, 0 }; // NOLINT | 1825 1073749793, 100, 7994, 0, 1073749825, 100, 8026, 0 }; // NOLINT |
| 1826 |
| 1827 // clang-format on |
| 1828 |
1826 intptr_t CanonicalizationRange::Convert(int32_t c, | 1829 intptr_t CanonicalizationRange::Convert(int32_t c, |
1827 int32_t n, | 1830 int32_t n, |
1828 int32_t* result, | 1831 int32_t* result, |
1829 bool* allow_caching_ptr) { | 1832 bool* allow_caching_ptr) { |
1830 intptr_t chunk_index = c >> 13; | 1833 intptr_t chunk_index = c >> 13; |
1831 switch (chunk_index) { | 1834 switch (chunk_index) { |
1832 case 0: return LookupMapping<false>(kCanonicalizationRangeTable0, | 1835 case 0: |
1833 kCanonicalizationRangeTable0Size, | 1836 return LookupMapping<false>( |
1834 kCanonicalizationRangeMultiStrings0, | 1837 kCanonicalizationRangeTable0, kCanonicalizationRangeTable0Size, |
1835 c, | 1838 kCanonicalizationRangeMultiStrings0, c, n, result, allow_caching_ptr); |
1836 n, | 1839 case 1: |
1837 result, | 1840 return LookupMapping<false>( |
1838 allow_caching_ptr); | 1841 kCanonicalizationRangeTable1, kCanonicalizationRangeTable1Size, |
1839 case 1: return LookupMapping<false>(kCanonicalizationRangeTable1, | 1842 kCanonicalizationRangeMultiStrings1, c, n, result, allow_caching_ptr); |
1840 kCanonicalizationRangeTable1Size, | 1843 case 7: |
1841 kCanonicalizationRangeMultiStrings1, | 1844 return LookupMapping<false>( |
1842 c, | 1845 kCanonicalizationRangeTable7, kCanonicalizationRangeTable7Size, |
1843 n, | 1846 kCanonicalizationRangeMultiStrings7, c, n, result, allow_caching_ptr); |
1844 result, | 1847 default: |
1845 allow_caching_ptr); | 1848 return 0; |
1846 case 7: return LookupMapping<false>(kCanonicalizationRangeTable7, | |
1847 kCanonicalizationRangeTable7Size, | |
1848 kCanonicalizationRangeMultiStrings7, | |
1849 c, | |
1850 n, | |
1851 result, | |
1852 allow_caching_ptr); | |
1853 default: return 0; | |
1854 } | 1849 } |
1855 } | 1850 } |
1856 | 1851 |
1857 } // namespace unibrow | 1852 } // namespace unibrow |
OLD | NEW |