/arkcompiler/ets_runtime/ecmascript/ |
D | ecma_string-inl.h | 58 auto utf16Len = base::utf_helper::Utf8ToUtf16Size(utf8Data, utf8Len); in CreateFromUtf8() local 59 string = CreateLineStringWithSpaceType(vm, utf16Len, false, type); in CreateFromUtf8() 63 …f_helper::ConvertRegionUtf8ToUtf16(utf8Data, string->GetDataUtf16Writable(), utf8Len, utf16Len, 0); in CreateFromUtf8() 64 ASSERT(len == utf16Len); in CreateFromUtf8() 71 …EcmaString::CreateUtf16StringFromUtf8(const EcmaVM *vm, const uint8_t *utf8Data, uint32_t utf16Len, in CreateUtf16StringFromUtf8() argument 74 if (utf16Len == 0) { in CreateUtf16StringFromUtf8() 77 auto string = CreateLineStringWithSpaceType(vm, utf16Len, false, type); in CreateUtf16StringFromUtf8() 80 utf8Data, string->GetDataUtf16Writable(), utf::Mutf8Size(utf8Data), utf16Len, 0); in CreateUtf16StringFromUtf8() 81 if (len < utf16Len) { in CreateUtf16StringFromUtf8() 100 …String *EcmaString::CreateFromUtf16(const EcmaVM *vm, const uint16_t *utf16Data, uint32_t utf16Len, in CreateFromUtf16() argument [all …]
|
D | ecma_string_table.h | 41 EcmaString *GetOrInternString(const uint16_t *utf16Data, uint32_t utf16Len, bool canBeCompress); 45 EcmaString *GetOrInternStringWithSpaceType(const uint8_t *utf8Data, uint32_t utf16Len, 60 std::pair<EcmaString *, uint32_t> GetString(const uint16_t *utf16Data, uint32_t utf16Len) const;
|
D | ecma_string_table.cpp | 61 …aString *, uint32_t> EcmaStringTable::GetString(const uint16_t *utf16Data, uint32_t utf16Len) const in GetString() 63 …t hashCode = EcmaStringAccessor::ComputeHashcodeUtf16(const_cast<uint16_t *>(utf16Data), utf16Len); in GetString() 67 if (EcmaStringAccessor::StringsAreEqualUtf16(foundString, utf16Data, utf16Len)) { in GetString() 153 EcmaString *EcmaStringTable::GetOrInternString(const uint16_t *utf16Data, uint32_t utf16Len, bool c… in GetOrInternString() argument 155 std::pair<EcmaString *, uint32_t> result = GetString(utf16Data, utf16Len); in GetOrInternString() 161 …EcmaStringAccessor::CreateFromUtf16(vm_, utf16Data, utf16Len, canBeCompress, MemSpaceType::OLD_SPA… in GetOrInternString() 237 …String *EcmaStringTable::GetOrInternStringWithSpaceType(const uint8_t *utf8Data, uint32_t utf16Len, in GetOrInternStringWithSpaceType() argument 241 EcmaString *str = EcmaStringAccessor::CreateUtf16StringFromUtf8(vm_, utf8Data, utf16Len, type); in GetOrInternStringWithSpaceType()
|
D | ecma_string.cpp | 474 bool EcmaString::CanBeCompressed(const uint16_t *utf16Data, uint32_t utf16Len) in CanBeCompressed() argument 477 Span<const uint16_t> data(utf16Data, utf16Len); in CanBeCompressed() 478 for (uint32_t i = 0; i < utf16Len; i++) { in CanBeCompressed() 648 …aString::StringsAreEqualUtf16(const EcmaString *str1, const uint16_t *utf16Data, uint32_t utf16Len) in StringsAreEqualUtf16() argument 651 if (length != utf16Len) { in StringsAreEqualUtf16() 657 return IsUtf8EqualsUtf16(data, length, utf16Data, utf16Len); in StringsAreEqualUtf16() 661 Span<const uint16_t> data2(utf16Data, utf16Len); in StringsAreEqualUtf16() 762 auto utf16Len = base::utf_helper::Utf8ToUtf16Size(utf8Data, utf8Len); in ComputeHashcodeUtf8() local 763 CVector<uint16_t> tmpBuffer(utf16Len); in ComputeHashcodeUtf8() 765 utf16Len, 0); in ComputeHashcodeUtf8() [all …]
|
D | ecma_string.h | 117 … static EcmaString *CreateFromUtf16(const EcmaVM *vm, const uint16_t *utf16Data, uint32_t utf16Len, 353 uint32_t utf16Len); 371 …ic bool StringsAreEqualUtf16(const EcmaString *str1, const uint16_t *utf16Data, uint32_t utf16Len); 619 static bool CanBeCompressed(const uint16_t *utf16Data, uint32_t utf16Len); 775 static size_t ComputeSizeUtf16(uint32_t utf16Len) in ComputeSizeUtf16() argument 777 return DATA_OFFSET + utf16Len * sizeof(uint16_t); in ComputeSizeUtf16() 1088 … static EcmaString *CreateFromUtf16(const EcmaVM *vm, const uint16_t *utf16Data, uint32_t utf16Len, 1091 return EcmaString::CreateFromUtf16(vm, utf16Data, utf16Len, canBeCompress, type); 1356 …tic bool StringsAreEqualUtf16(const EcmaString *str1, const uint16_t *utf16Data, uint32_t utf16Len) in StringsAreEqualUtf16() argument 1358 return EcmaString::StringsAreEqualUtf16(str1, utf16Data, utf16Len); in StringsAreEqualUtf16() [all …]
|
D | object_factory.h | 565 JSHandle<EcmaString> NewFromUtf16(const uint16_t *utf16Data, uint32_t utf16Len); 566 JSHandle<EcmaString> NewFromUtf16Compress(const uint16_t *utf16Data, uint32_t utf16Len); 567 JSHandle<EcmaString> NewFromUtf16NotCompress(const uint16_t *utf16Data, uint32_t utf16Len); 573 JSHandle<EcmaString> NewFromUtf16Literal(const uint16_t *utf16Data, uint32_t utf16Len); 574 JSHandle<EcmaString> NewFromUtf16LiteralCompress(const uint16_t *utf16Data, uint32_t utf16Len); 575 … JSHandle<EcmaString> NewFromUtf16LiteralNotCompress(const uint16_t *utf16Data, uint32_t utf16Len); 746 JSHandle<EcmaString> GetStringFromStringTable(const uint16_t *utf16Data, uint32_t utf16Len,
|
D | object_factory.cpp | 3002 …e<EcmaString> ObjectFactory::GetStringFromStringTable(const uint16_t *utf16Data, uint32_t utf16Len, in GetStringFromStringTable() argument 3006 if (utf16Len == 0) { in GetStringFromStringTable() 3010 …return JSHandle<EcmaString>(thread_, stringTable->GetOrInternString(utf16Data, utf16Len, canBeComp… in GetStringFromStringTable() 3028 uint32_t utf16Len = sd.utf16_length; in GetRawStringFromStringTable() local 3029 if (UNLIKELY(utf16Len == 0)) { in GetRawStringFromStringTable() 3037 … return vm_->GetEcmaStringTable()->GetOrInternStringWithSpaceType(mutf8Data, utf16Len, true, type, in GetRawStringFromStringTable() 3040 return vm_->GetEcmaStringTable()->GetOrInternStringWithSpaceType(mutf8Data, utf16Len, type); in GetRawStringFromStringTable() 3959 JSHandle<EcmaString> ObjectFactory::NewFromUtf16(const uint16_t *utf16Data, uint32_t utf16Len) in NewFromUtf16() argument 3961 bool canBeCompress = EcmaStringAccessor::CanBeCompressed(utf16Data, utf16Len); in NewFromUtf16() 3962 return GetStringFromStringTable(utf16Data, utf16Len, canBeCompress); in NewFromUtf16() [all …]
|
/arkcompiler/ets_runtime/ecmascript/base/ |
D | utf_helper.h | 89 size_t ConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len, size_t … 92 size_t DebuggerConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len,… 101 …onvertRegionUtf8ToUtf16(const uint8_t *utf8In, uint16_t *utf16Out, size_t utf8Len, size_t utf16Len, 104 size_t ConvertRegionUtf16ToLatin1(const uint16_t *utf16In, uint8_t *latin1Out, size_t utf16Len, siz…
|
D | utf_helper.cpp | 250 size_t ConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len, size_t … in ConvertRegionUtf16ToUtf8() argument 257 size_t end = start + utf16Len; in ConvertRegionUtf16ToUtf8() 277 size_t DebuggerConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len,… in DebuggerConvertRegionUtf16ToUtf8() argument 284 size_t end = start + utf16Len; in DebuggerConvertRegionUtf16ToUtf8() 345 …onvertRegionUtf8ToUtf16(const uint8_t *utf8In, uint16_t *utf16Out, size_t utf8Len, size_t utf16Len, in ConvertRegionUtf8ToUtf16() argument 348 return utf::ConvertRegionMUtf8ToUtf16(utf8In, utf16Out, utf8Len, utf16Len, start); in ConvertRegionUtf8ToUtf16() 351 size_t ConvertRegionUtf16ToLatin1(const uint16_t *utf16In, uint8_t *latin1Out, size_t utf16Len, siz… in ConvertRegionUtf16ToLatin1() argument 357 size_t end = utf16Len; in ConvertRegionUtf16ToLatin1()
|
/arkcompiler/runtime_core/static_core/libpandabase/utils/ |
D | utf.cpp | 112 size_t ConvertRegionUtf16ToMUtf8(const uint16_t *utf16In, uint8_t *mutf8Out, size_t utf16Len, size_… in ConvertRegionUtf16ToMUtf8() argument 115 return ConvertRegionUtf16ToUtf8(utf16In, mutf8Out, utf16Len, mutf8Len, start, true); in ConvertRegionUtf16ToMUtf8() 135 …ertRegionMUtf8ToUtf16(const uint8_t *mutf8In, uint16_t *utf16Out, size_t mutf8Len, size_t utf16Len, in ConvertRegionMUtf8ToUtf16() argument 152 if (outPos++ >= utf16Len - 1) { // check for place for two uint16 in ConvertRegionMUtf8ToUtf16() 158 if (outPos++ >= utf16Len) { in ConvertRegionMUtf8ToUtf16() 505 size_t ConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len, size_t … in ConvertRegionUtf16ToUtf8() argument 512 size_t end = start + utf16Len; in ConvertRegionUtf16ToUtf8() 574 …onvertRegionUtf8ToUtf16(const uint8_t *utf8In, uint16_t *utf16Out, size_t utf8Len, size_t utf16Len, in ConvertRegionUtf8ToUtf16() argument 577 return ConvertRegionMUtf8ToUtf16(utf8In, utf16Out, utf8Len, utf16Len, start); in ConvertRegionUtf8ToUtf16()
|
D | utf.h | 104 size_t utf16Len, size_t start); 106 …C_API size_t ConvertRegionUtf16ToMUtf8(const uint16_t *utf16In, uint8_t *mutf8Out, size_t utf16Len, 136 …LIC_API size_t ConvertRegionUtf16ToUtf8(const uint16_t *utf16In, uint8_t *utf8Out, size_t utf16Len, 144 size_t utf16Len, size_t start);
|
/arkcompiler/ets_runtime/ecmascript/base/tests/ |
D | utf_helper_test.cpp | 523 size_t utf16Len = 8; in HWTEST_F_L0() local 537 …size_t utf8Pos = ConvertRegionUtf16ToUtf8(utf16ValuePtr, utf8Out, utf16Len, utf8Len, start, modify… in HWTEST_F_L0() 542 utf8Pos = ConvertRegionUtf16ToUtf8(utf16ValuePtr, utf8Out, utf16Len, utf8Len, start, modify); in HWTEST_F_L0() 549 size_t utf16Len = 8; in HWTEST_F_L0() local 563 …size_t utf8Pos = DebuggerConvertRegionUtf16ToUtf8(utf16ValuePtr, utf8Out, utf16Len, utf8Len, start… in HWTEST_F_L0() 568 …utf8Pos = DebuggerConvertRegionUtf16ToUtf8(utf16ValuePtr, utf8Out, utf16Len, utf8Len, start, modif… in HWTEST_F_L0() 582 size_t utf16Len = 100; in HWTEST_F_L0() local 590 uint16_t *utf16Out = (uint16_t*)malloc(utf16Len); in HWTEST_F_L0() 591 …size_t outPos = ConvertRegionUtf8ToUtf16(utf8ValuePtr, utf16Out, sizeof(utf8Value), utf16Len, star… in HWTEST_F_L0() 596 outPos = ConvertRegionUtf8ToUtf16(utf8ValuePtr, utf16Out, sizeof(utf8Value), utf16Len, start); in HWTEST_F_L0() [all …]
|
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
D | builtins_string_stub_builder.h | 76 GateRef CanBeCompressed(GateRef utf16Data, GateRef utf16Len, bool isUtf16);
|