| 69 | const uint8_t utf8_byte_size_table[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4}; |
| 70 | |
| 71 | static void InitializeLargeTable() { |
| 72 | for (uint32_t state = 0; state < 9; ++state) { |
| 73 | for (uint32_t byte = 0; byte < 256; ++byte) { |
| 74 | uint32_t byte_class = utf8_small_table[byte]; |
| 75 | uint8_t next_state = utf8_small_table[256 + state * 12 + byte_class] / 12; |
| 76 | DCHECK_LT(next_state, 9); |
| 77 | utf8_large_table[state * 256 + byte] = static_cast<uint16_t>(next_state * 256); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | ARROW_EXPORT void CheckUTF8Initialized() { |
| 83 | DCHECK_EQ(utf8_large_table[0], 0) |
nothing calls this directly
no outgoing calls
no test coverage detected