• Home
  • Raw
  • Download

Lines Matching refs:length

124 inline EcmaString *EcmaString::CreateLineString(const EcmaVM *vm, size_t length, bool compressed)  in CreateLineString()  argument
126 …size = compressed ? LineEcmaString::ComputeSizeUtf8(length) : LineEcmaString::ComputeSizeUtf16(len… in CreateLineString()
128 string->SetLength(length, compressed); in CreateLineString()
134 inline EcmaString *EcmaString::CreateLineStringNoGC(const EcmaVM *vm, size_t length, bool compresse… in CreateLineStringNoGC() argument
136 …size = compressed ? LineEcmaString::ComputeSizeUtf8(length) : LineEcmaString::ComputeSizeUtf16(len… in CreateLineStringNoGC()
142 string->SetLength(length, compressed); in CreateLineStringNoGC()
148 inline EcmaString *EcmaString::CreateLineStringWithSpaceType(const EcmaVM *vm, size_t length, bool … in CreateLineStringWithSpaceType() argument
151 …size = compressed ? LineEcmaString::ComputeSizeUtf8(length) : LineEcmaString::ComputeSizeUtf16(len… in CreateLineStringWithSpaceType()
167 string->SetLength(length, compressed); in CreateLineStringWithSpaceType()
180 size_t length, bool compressed, MemSpaceType type, uint32_t idOffset) in CreateConstantString() argument
184 string->SetLength(length, compressed); in CreateConstantString()
194 …const JSHandle<EcmaString> &left, const JSHandle<EcmaString> &right, uint32_t length, bool compres… in CreateTreeString() argument
196 ECMA_STRING_CHECK_LENGTH_AND_TRHOW(vm, length); in CreateTreeString()
199 string->SetLength(length, compressed); in CreateTreeString()
208 uint32_t length) in FastSubUtf8String() argument
210 JSHandle<EcmaString> string(vm->GetJSThread(), CreateLineString(vm, length, true)); in FastSubUtf8String()
213 Span<uint8_t> dst(string->GetDataUtf8Writable(), length); in FastSubUtf8String()
214 Span<const uint8_t> source(srcFlat.GetDataUtf8() + start, length); in FastSubUtf8String()
215 EcmaString::MemCopyChars(dst, length, source, length); in FastSubUtf8String()
223 uint32_t length) in FastSubUtf16String() argument
226 bool canBeCompressed = CanBeCompressed(srcFlat.GetDataUtf16() + start, length); in FastSubUtf16String()
227 JSHandle<EcmaString> string(vm->GetJSThread(), CreateLineString(vm, length, canBeCompressed)); in FastSubUtf16String()
232 CopyChars(string->GetDataUtf8Writable(), srcFlat.GetDataUtf16() + start, length); in FastSubUtf16String()
234 uint32_t len = length * (sizeof(uint16_t) / sizeof(uint8_t)); in FastSubUtf16String()
236 Span<uint16_t> dst(string->GetDataUtf16Writable(), length); in FastSubUtf16String()
237 Span<const uint16_t> source(srcFlat.GetDataUtf16() + start, length); in FastSubUtf16String()
293 int32_t length = static_cast<int32_t>(GetLength()); in At() local
295 if ((index < 0) || (index >= length)) { in At()
341 uint32_t length = src->GetLength(); in WriteToFlat() local
342 if (length == 0) { in WriteToFlat()
346 ASSERT(length <= maxLength && length > 0); in WriteToFlat()
347 ASSERT(length <= src->GetLength()); in WriteToFlat()
351 CopyChars(buf, src->GetDataUtf8(), length); in WriteToFlat()
353 CopyChars(buf, src->GetDataUtf16(), length); in WriteToFlat()
359 CopyChars(buf, src->GetDataUtf8(), length); in WriteToFlat()
378 length -= firstLength; in WriteToFlat()
392 length -= secondLength; in WriteToFlat()
399 … CopyChars(buf, parent->GetDataUtf8() + SlicedString::Cast(src)->GetStartIndex(), length); in WriteToFlat()
401 … CopyChars(buf, parent->GetDataUtf16() + SlicedString::Cast(src)->GetStartIndex(), length); in WriteToFlat()
443 uint32_t start, uint32_t destSize, uint32_t length) in ReadData() argument
445 dst->WriteData(src, start, destSize, length); in ReadData()