| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // This file was generated at 2014-10-08 15:25:47.940335 | 5 // This file was generated at 2014-10-08 15:25:47.940335 |
| 6 | 6 |
| 7 #include "src/unicode-inl.h" | 7 #include "src/unicode-inl.h" |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 return 0; | 183 return 0; |
| 184 } | 184 } |
| 185 return -1; | 185 return -1; |
| 186 } | 186 } |
| 187 } else { | 187 } else { |
| 188 return 0; | 188 return 0; |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 uchar Utf8::CalculateValue(const byte* str, | 193 uchar Utf8::CalculateValue(const byte* str, size_t length, size_t* cursor) { |
| 194 unsigned length, | |
| 195 unsigned* cursor) { | |
| 196 // We only get called for non-ASCII characters. | 194 // We only get called for non-ASCII characters. |
| 197 if (length == 1) { | 195 if (length == 1) { |
| 198 *cursor += 1; | 196 *cursor += 1; |
| 199 return kBadChar; | 197 return kBadChar; |
| 200 } | 198 } |
| 201 byte first = str[0]; | 199 byte first = str[0]; |
| 202 byte second = str[1] ^ 0x80; | 200 byte second = str[1] ^ 0x80; |
| 203 if (second & 0xC0) { | 201 if (second & 0xC0) { |
| 204 *cursor += 1; | 202 *cursor += 1; |
| 205 return kBadChar; | 203 return kBadChar; |
| (...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3387 sizeof(MultiCharacterSpecialCase<1>) // NOLINT | 3385 sizeof(MultiCharacterSpecialCase<1>) // NOLINT |
| 3388 + | 3386 + |
| 3389 kCanonicalizationRangeMultiStrings1Size * | 3387 kCanonicalizationRangeMultiStrings1Size * |
| 3390 sizeof(MultiCharacterSpecialCase<1>) // NOLINT | 3388 sizeof(MultiCharacterSpecialCase<1>) // NOLINT |
| 3391 + | 3389 + |
| 3392 kCanonicalizationRangeMultiStrings7Size * | 3390 kCanonicalizationRangeMultiStrings7Size * |
| 3393 sizeof(MultiCharacterSpecialCase<1>); // NOLINT | 3391 sizeof(MultiCharacterSpecialCase<1>); // NOLINT |
| 3394 } | 3392 } |
| 3395 | 3393 |
| 3396 } // namespace unibrow | 3394 } // namespace unibrow |
| OLD | NEW |