Home
last modified time | relevance | path

Searched refs:codePoint (Results 1 – 4 of 4) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/base/tests/
Dutf_helper_test.cpp61 …uint32_t codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10)|(trailSur - 0xDc00U)) + 0x1… in HWTEST_F_L0() local
63 EXPECT_EQ(codePoint, utfHelperCodePoint); in HWTEST_F_L0()
64 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x10000)); in HWTEST_F_L0()
66 codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U))+ 0x10000U; in HWTEST_F_L0()
68 EXPECT_EQ(codePoint, utfHelperCodePoint); in HWTEST_F_L0()
69 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x103FF)); in HWTEST_F_L0()
71codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U)) + 0x10000U; in HWTEST_F_L0()
73 EXPECT_EQ(codePoint, utfHelperCodePoint); in HWTEST_F_L0()
74 EXPECT_EQ(codePoint, static_cast<uint32_t>(0x10FFFF)); in HWTEST_F_L0()
76codePoint = static_cast<uint32_t>(((leadSur - 0xD800U) << 10) | (trailSur - 0xDC00U)) + 0x10000U; in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/
Dutf_helper.h97 uint32_t codePoint = d0 - utf::HI_SURROGATE_MIN; in CombineTwoU16() local
98 codePoint <<= UtfOffset::TEN; in CombineTwoU16()
99 codePoint |= d1 - utf::LO_SURROGATE_MIN; in CombineTwoU16()
100 codePoint += utf::LO_SUPPLEMENTS_MIN; in CombineTwoU16()
101 return codePoint; in CombineTwoU16()
Dutf_helper.cpp170 uint32_t codePoint = CombineTwoU16(d0, d1); in ConvertUtf16ToUtf8() local
172 auto ch0 = static_cast<uint8_t>((codePoint >> UtfOffset::EIGHTEEN) | UTF8_4B_FIRST); in ConvertUtf16ToUtf8()
173 … auto ch1 = static_cast<uint8_t>(((codePoint >> UtfOffset::TWELVE) & utf::MASK_6BIT) | utf::MASK1); in ConvertUtf16ToUtf8()
174 auto ch2 = static_cast<uint8_t>(((codePoint >> UtfOffset::SIX) & utf::MASK_6BIT) | utf::MASK1); in ConvertUtf16ToUtf8()
175 auto ch3 = static_cast<uint8_t>((codePoint & utf::MASK_6BIT) | utf::MASK1); in ConvertUtf16ToUtf8()
263 …uint32_t codePoint = ((d0 & utf::MASK_4BIT) << UtfOffset::EIGHTEEN) | ((d1 & utf::MASK_6BIT) << Ut… in ConvertUtf8ToUtf16Pair() local
268 … uint32_t lead = ((codePoint >> (utf::PAIR_ELEMENT_WIDTH - utf::DATA_WIDTH)) + utf::U16_LEAD); in ConvertUtf8ToUtf16Pair()
269 uint32_t tail = ((codePoint & utf::MASK_10BIT) + utf::U16_TAIL) & utf::MASK_16BIT; in ConvertUtf8ToUtf16Pair()
272 …pair |= ((codePoint >> (utf::PAIR_ELEMENT_WIDTH - utf::DATA_WIDTH)) + utf::U16_LEAD) << utf::PAIR_… in ConvertUtf8ToUtf16Pair()
273 pair |= ((codePoint & utf::MASK_10BIT) + utf::U16_TAIL) & utf::MASK_16BIT; in ConvertUtf8ToUtf16Pair()
/arkcompiler/runtime_core/libpandabase/utils/
Dutf.cpp100 uint32_t codePoint = d0 - HI_SURROGATE_MIN; in CombineTwoU16() local
101 codePoint <<= (PAIR_ELEMENT_WIDTH - DATA_WIDTH); in CombineTwoU16()
102 codePoint |= d1 - LO_SURROGATE_MIN; in CombineTwoU16()
103 codePoint += LO_SUPPLEMENTS_MIN; in CombineTwoU16()
104 return codePoint; in CombineTwoU16()
136 uint32_t codePoint = CombineTwoU16(d0, d1); in ConvertUtf16ToMUtf8() local
138 auto ch0 = static_cast<uint8_t>((codePoint >> (DATA_WIDTH * CONST_3)) | MUTF8_4B_FIRST); in ConvertUtf16ToMUtf8()
139 auto ch1 = static_cast<uint8_t>(((codePoint >> (DATA_WIDTH * CONST_2)) & MASK_6BIT) | MASK1); in ConvertUtf16ToMUtf8()
140 auto ch2 = static_cast<uint8_t>(((codePoint >> DATA_WIDTH) & MASK_6BIT) | MASK1); in ConvertUtf16ToMUtf8()
141 auto ch3 = static_cast<uint8_t>((codePoint & MASK_6BIT) | MASK1); in ConvertUtf16ToMUtf8()