/third_party/jerryscript/jerry-core/lit/ |
D | lit-char-helpers.c | 210 lit_code_point_is_identifier_start (lit_code_point_t code_point) /**< code point */ in lit_code_point_is_identifier_start() argument 213 if (code_point <= LIT_UTF8_1_BYTE_CODE_POINT_MAX) in lit_code_point_is_identifier_start() 215 return ((LEXER_TO_ASCII_LOWERCASE (code_point) >= LIT_CHAR_LOWERCASE_A in lit_code_point_is_identifier_start() 216 && LEXER_TO_ASCII_LOWERCASE (code_point) <= LIT_CHAR_LOWERCASE_Z) in lit_code_point_is_identifier_start() 217 || code_point == LIT_CHAR_DOLLAR_SIGN in lit_code_point_is_identifier_start() 218 || code_point == LIT_CHAR_UNDERSCORE); in lit_code_point_is_identifier_start() 222 if (code_point >= LIT_UTF8_4_BYTE_CODE_POINT_MIN) in lit_code_point_is_identifier_start() 225 return (code_point >= 0x10C80 && code_point <= 0x10CF2); in lit_code_point_is_identifier_start() 228 JERRY_ASSERT (code_point <= LIT_UTF8_4_BYTE_CODE_POINT_MIN); in lit_code_point_is_identifier_start() 231 return lit_char_is_unicode_letter ((ecma_char_t) code_point); in lit_code_point_is_identifier_start() [all …]
|
D | lit-strings.c | 46 lit_code_point_t code_point = 0; in lit_is_valid_utf8_string() local 53 code_point = ((uint32_t) (c & LIT_UTF8_LAST_5_BITS_MASK)); in lit_is_valid_utf8_string() 59 code_point = ((uint32_t) (c & LIT_UTF8_LAST_4_BITS_MASK)); in lit_is_valid_utf8_string() 65 code_point = ((uint32_t) (c & LIT_UTF8_LAST_3_BITS_MASK)); in lit_is_valid_utf8_string() 87 code_point <<= LIT_UTF8_BITS_IN_EXTRA_BYTES; in lit_is_valid_utf8_string() 88 code_point |= (c & LIT_UTF8_LAST_6_BITS_MASK); in lit_is_valid_utf8_string() 91 if (code_point < min_code_point in lit_is_valid_utf8_string() 92 || code_point > LIT_UNICODE_CODE_POINT_MAX) in lit_is_valid_utf8_string() 98 if (code_point >= LIT_UTF16_HIGH_SURROGATE_MIN in lit_is_valid_utf8_string() 99 && code_point <= LIT_UTF16_HIGH_SURROGATE_MAX) in lit_is_valid_utf8_string() [all …]
|
D | lit-strings.h | 91 bool lit_is_code_point_utf16_low_surrogate (lit_code_point_t code_point); 92 bool lit_is_code_point_utf16_high_surrogate (lit_code_point_t code_point); 114 lit_utf8_size_t lit_code_point_to_utf8 (lit_code_point_t code_point, lit_utf8_byte_t *buf); 115 lit_utf8_size_t lit_code_point_to_cesu8 (lit_code_point_t code_point, lit_utf8_byte_t *buf); 129 lit_code_point_t *code_point); 132 ecma_char_t *code_point); 135 ecma_char_t *code_point);
|
D | lit-char-helpers.h | 76 bool lit_code_point_is_identifier_start (lit_code_point_t code_point); 77 bool lit_code_point_is_identifier_part (lit_code_point_t code_point); 217 size_t lit_code_point_to_cesu8_bytes (uint8_t *dst_p, lit_code_point_t code_point); 218 size_t lit_code_point_get_cesu8_length (lit_code_point_t code_point);
|
/third_party/gn/src/base/strings/ |
D | utf_string_conversion_utils.h | 18 inline bool IsValidCodepoint(uint32_t code_point) { in IsValidCodepoint() argument 22 return code_point < 0xD800u || in IsValidCodepoint() 23 (code_point >= 0xE000u && code_point <= 0x10FFFFu); in IsValidCodepoint() 26 inline bool IsValidCharacter(uint32_t code_point) { in IsValidCharacter() argument 29 return code_point < 0xD800u || in IsValidCharacter() 30 (code_point >= 0xE000u && code_point < 0xFDD0u) || in IsValidCharacter() 31 (code_point > 0xFDEFu && code_point <= 0x10FFFFu && in IsValidCharacter() 32 (code_point & 0xFFFEu) != 0xFFFEu); in IsValidCharacter() 53 uint32_t* code_point); 59 size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output); [all …]
|
D | utf_string_conversion_utils.cc | 21 int32_t code_point; in ReadUnicodeCharacter() local 22 CBU8_NEXT(src, *char_index, src_len, code_point); in ReadUnicodeCharacter() 23 *code_point_out = static_cast<uint32_t>(code_point); in ReadUnicodeCharacter() 30 return IsValidCodepoint(code_point); in ReadUnicodeCharacter() 36 uint32_t* code_point) { in ReadUnicodeCharacter() argument 45 *code_point = in ReadUnicodeCharacter() 50 *code_point = src[*char_index]; in ReadUnicodeCharacter() 53 return IsValidCodepoint(*code_point); in ReadUnicodeCharacter() 58 size_t WriteUnicodeCharacter(uint32_t code_point, std::string* output) { in WriteUnicodeCharacter() argument 59 if (code_point <= 0x7f) { in WriteUnicodeCharacter() [all …]
|
D | utf_string_conversions.cc | 49 void UnicodeAppendUnsafe(char* out, int32_t* size, uint32_t code_point) { in UnicodeAppendUnsafe() argument 50 CBU8_APPEND_UNSAFE(out, *size, code_point); in UnicodeAppendUnsafe() 53 void UnicodeAppendUnsafe(char16_t* out, int32_t* size, uint32_t code_point) { in UnicodeAppendUnsafe() argument 54 CBU16_APPEND_UNSAFE(out, *size, code_point); in UnicodeAppendUnsafe() 69 int32_t code_point; in DoUTFConversion() local 70 CBU8_NEXT(src, i, src_len, code_point); in DoUTFConversion() 72 if (!IsValidCodepoint(code_point)) { in DoUTFConversion() 74 code_point = kErrorCodePoint; in DoUTFConversion() 77 UnicodeAppendUnsafe(dest, dest_len, code_point); in DoUTFConversion() 103 int32_t code_point; in DoUTFConversion() local [all …]
|
D | utf_offset_string_conversions.cc | 197 uint32_t code_point; in ConvertUnicode() local 200 if (ReadUnicodeCharacter(src, src_len32, &i, &code_point)) { in ConvertUnicode() 201 chars_written = WriteUnicodeCharacter(code_point, output); in ConvertUnicode()
|
D | string_util.cc | 310 base_icu::UChar32 code_point = 0; in TruncateUTF8ToByteSize() local 311 CBU8_NEXT(data, char_index, truncation_length, code_point); in TruncateUTF8ToByteSize() 312 if (!IsValidCharacter(code_point) || !IsValidCodepoint(code_point)) { in TruncateUTF8ToByteSize() 454 int32_t code_point; in IsStringUTF8() local 455 CBU8_NEXT(src, char_index, src_len, code_point); in IsStringUTF8() 456 if (!IsValidCharacter(code_point)) in IsStringUTF8()
|
/third_party/rust/crates/os_str_bytes/src/windows/wtf8/ |
D | code_points.rs | 40 fn consume_next(&mut self, code_point: &mut u32) -> Result<()> { in consume_next() 49 *code_point = in consume_next() 50 (*code_point << BYTE_SHIFT) | u32::from(byte & CONT_MASK); in consume_next() 76 let mut code_point: u32 = byte.into(); in next() localVariable 80 if let Err(error) = self.consume_next(&mut code_point) { in next() 95 code_point &= 0x1F; in next() 97 code_point &= 0x0F; in next() 101 if code_point.wrapping_sub(0x10) >= 0x100 { in next() 107 } else if code_point & 0xFE0 == 0x360 { in next() 109 if code_point & 0x10 == 0 { in next() [all …]
|
D | convert.rs | 30 code_point: u32, field 44 code_point: 0, in new() 51 (self.code_point >> (self.shifts * BYTE_SHIFT)) as u8 in get_raw_byte() 67 self.code_point = self in next() 80 if self.code_point < $upper_bound { in next() 146 self.iter.next().map(|code_point| { in next() 147 code_point.map(|code_point| { in next() 148 code_point in next() 162 .unwrap_or(code_point as u16) in next()
|
/third_party/gn/src/base/json/ |
D | string_escape.cc | 35 bool EscapeSpecialCodePoint(uint32_t code_point, std::string* dest) { in EscapeSpecialCodePoint() argument 39 switch (code_point) { in EscapeSpecialCodePoint() 93 uint32_t code_point; in EscapeJSONStringImpl() local 94 if (!ReadUnicodeCharacter(str.data(), length, &i, &code_point) || in EscapeJSONStringImpl() 95 code_point == static_cast<decltype(code_point)>(CBU_SENTINEL) || in EscapeJSONStringImpl() 96 !IsValidCharacter(code_point)) { in EscapeJSONStringImpl() 97 code_point = kReplacementCodePoint; in EscapeJSONStringImpl() 101 if (EscapeSpecialCodePoint(code_point, dest)) in EscapeJSONStringImpl() 105 if (code_point < 32) in EscapeJSONStringImpl() 106 base::StringAppendF(dest, kU16EscapeFormat, code_point); in EscapeJSONStringImpl() [all …]
|
D | json_parser.cc | 512 uint32_t code_point; in ConsumeStringRaw() local 513 if (!DecodeUTF16(&code_point)) { in ConsumeStringRaw() 517 string.Append(code_point); in ConsumeStringRaw() 594 uint32_t code_point = in DecodeUTF16() local 596 if (!IsValidCharacter(code_point)) in DecodeUTF16() 599 *out_code_point = code_point; in DecodeUTF16()
|
/third_party/protobuf/src/google/protobuf/io/ |
D | tokenizer.cc | 930 static void AppendUTF8(uint32 code_point, std::string* output) { in AppendUTF8() argument 933 if (code_point <= 0x7f) { in AppendUTF8() 934 tmp = code_point; in AppendUTF8() 936 } else if (code_point <= 0x07ff) { in AppendUTF8() 937 tmp = 0x0000c080 | ((code_point & 0x07c0) << 2) | (code_point & 0x003f); in AppendUTF8() 939 } else if (code_point <= 0xffff) { in AppendUTF8() 940 tmp = 0x00e08080 | ((code_point & 0xf000) << 4) | in AppendUTF8() 941 ((code_point & 0x0fc0) << 2) | (code_point & 0x003f); in AppendUTF8() 943 } else if (code_point <= 0x1fffff) { in AppendUTF8() 944 tmp = 0xf0808080 | ((code_point & 0x1c0000) << 6) | in AppendUTF8() [all …]
|
/third_party/node/deps/v8/src/strings/ |
D | unicode-inl.h | 16 bool Predicate<T, s>::get(uchar code_point) { in get() argument 17 CacheEntry entry = entries_[code_point & kMask]; in get() 18 if (entry.code_point() == code_point) return entry.value(); in get() 19 return CalculateValue(code_point); in get() 23 bool Predicate<T, s>::CalculateValue(uchar code_point) { in CalculateValue() argument 24 bool result = T::Is(code_point); in CalculateValue() 25 entries_[code_point & kMask] = CacheEntry(code_point, result); in CalculateValue()
|
D | unicode.h | 42 inline CacheEntry(uchar code_point, bool value) in CacheEntry() argument 44 CodePointField::encode(CodePointField::kMask & code_point) | in CacheEntry() 46 DCHECK_IMPLIES((CodePointField::kMask & code_point) != code_point, in CacheEntry() 47 code_point == static_cast<uchar>(-1)); in CacheEntry() 50 uchar code_point() const { return CodePointField::decode(bit_field_); } in code_point() function 79 inline CacheEntry(uchar code_point, signed offset) in CacheEntry() 80 : code_point_(code_point), offset_(offset) {} in CacheEntry()
|
/third_party/jerryscript/jerry-core/parser/js/ |
D | js-lexer.c | 634 lit_code_point_t code_point = UINT32_MAX; in lexer_parse_identifier() local 649 … code_point = lexer_hex_in_braces_to_code_point (source_p + 3, source_end_p, &escape_length); in lexer_parse_identifier() 653 code_point = lexer_hex_to_code_point (source_p + 2, 4); in lexer_parse_identifier() 659 code_point = lexer_hex_to_code_point (source_p + 2, 4); in lexer_parse_identifier() 663 if (code_point == UINT32_MAX) in lexer_parse_identifier() 672 if (!lit_code_point_is_identifier_start (code_point)) in lexer_parse_identifier() 679 if (!lit_code_point_is_identifier_part (code_point)) in lexer_parse_identifier() 685 length += lit_code_point_get_cesu8_length (code_point); in lexer_parse_identifier() 691 lit_code_point_t code_point = *source_p; in lexer_parse_identifier() local 694 if (JERRY_UNLIKELY (code_point >= LIT_UTF8_2_BYTE_MARKER)) in lexer_parse_identifier() [all …]
|
/third_party/libphonenumber/cpp/test/phonenumbers/utf/ |
D | unicodetext_test.cc | 27 char32 code_point; in TEST() member 41 EXPECT_EQ(values[i].code_point, *it); in TEST()
|
/third_party/rust/crates/os_str_bytes/src/windows/ |
D | raw.rs | 24 let code_point = expect_encoded!(code_points in decode_code_point() localVariable 28 code_point in decode_code_point()
|
D | mod.rs | 39 Self::CodePoint(code_point) => { in position() 40 Cow::Owned(format!("code point U+{:04X}", code_point)) in position()
|
/third_party/protobuf/src/google/protobuf/stubs/ |
D | strutil.cc | 2250 int EncodeAsUTF8Char(uint32 code_point, char* output) { in EncodeAsUTF8Char() argument 2253 if (code_point <= 0x7f) { in EncodeAsUTF8Char() 2254 tmp = code_point; in EncodeAsUTF8Char() 2256 } else if (code_point <= 0x07ff) { in EncodeAsUTF8Char() 2258 ((code_point & 0x07c0) << 2) | in EncodeAsUTF8Char() 2259 (code_point & 0x003f); in EncodeAsUTF8Char() 2261 } else if (code_point <= 0xffff) { in EncodeAsUTF8Char() 2263 ((code_point & 0xf000) << 4) | in EncodeAsUTF8Char() 2264 ((code_point & 0x0fc0) << 2) | in EncodeAsUTF8Char() 2265 (code_point & 0x003f); in EncodeAsUTF8Char() [all …]
|
D | strutil.h | 864 inline bool IsValidCodePoint(uint32 code_point) { in IsValidCodePoint() argument 865 return code_point < 0xD800 || in IsValidCodePoint() 866 (code_point >= 0xE000 && code_point <= 0x10FFFF); in IsValidCodePoint() 876 PROTOBUF_EXPORT int EncodeAsUTF8Char(uint32 code_point, char* output);
|
/third_party/jerryscript/jerry-core/ecma/builtin-objects/ |
D | ecma-builtin-string.c | 320 lit_code_point_t code_point = (uint32_t) to_int_num; in ecma_builtin_string_object_from_code_point() local 323 uint8_t encoded_size = lit_utf16_encode_code_point (code_point, converted_cp); in ecma_builtin_string_object_from_code_point()
|
/third_party/mesa3d/src/gtest/src/ |
D | gtest.cc | 1764 std::string CodePointToUtf8(UInt32 code_point) { in CodePointToUtf8() argument 1765 if (code_point > kMaxCodePoint4) { in CodePointToUtf8() 1766 return "(Invalid Unicode 0x" + String::FormatHexUInt32(code_point) + ")"; in CodePointToUtf8() 1770 if (code_point <= kMaxCodePoint1) { in CodePointToUtf8() 1772 str[0] = static_cast<char>(code_point); // 0xxxxxxx in CodePointToUtf8() 1773 } else if (code_point <= kMaxCodePoint2) { in CodePointToUtf8() 1775 str[1] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() 1776 str[0] = static_cast<char>(0xC0 | code_point); // 110xxxxx in CodePointToUtf8() 1777 } else if (code_point <= kMaxCodePoint3) { in CodePointToUtf8() 1779 str[2] = static_cast<char>(0x80 | ChopLowBits(&code_point, 6)); // 10xxxxxx in CodePointToUtf8() [all …]
|
/third_party/node/deps/simdutf/ |
D | simdutf.cpp | 10011 uint32_t code_point = 0; in validate() local 10038 code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); in validate() 10039 if ((code_point < 0x80) || (0x7ff < code_point)) { return false; } in validate() 10046 code_point = (byte & 0b00001111) << 12 | in validate() 10049 if ((code_point < 0x800) || (0xffff < code_point) || in validate() 10050 (0xd7ff < code_point && code_point < 0xe000)) { in validate() 10060 code_point = in validate() 10063 if (code_point <= 0xffff || 0x10ffff < code_point) { return false; } in validate() 10077 uint32_t code_point = 0; in validate_with_errors() local 10104 code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); in validate_with_errors() [all …]
|