Home
last modified time | relevance | path

Searched refs:newLength (Results 1 – 16 of 16) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/
Dtagged_array.h81 static inline bool ShouldTrim(uint32_t oldLength, uint32_t newLength) in ShouldTrim() argument
83 return (oldLength - newLength > MAX_END_UNUSED); in ShouldTrim()
85 inline void Trim(const JSThread *thread, uint32_t newLength);
Dtagged_array-inl.h242 void TaggedArray::Trim(const JSThread *thread, uint32_t newLength) in Trim() argument
246 ASSERT(oldLength > newLength); in Trim()
247 size_t trimBytes = (oldLength - newLength) * JSTaggedValue::TaggedTypeSize(); in Trim()
248 size_t size = TaggedArray::ComputeSize(JSTaggedValue::TaggedTypeSize(), newLength); in Trim()
250 SetLength(newLength); in Trim()
Dvtable.cpp68 void VTable::Trim(const JSThread *thread, uint32_t newLength) in Trim() argument
70 TaggedArray::Trim(thread, newLength * VTable::TUPLE_SIZE); in Trim()
Dweak_vector.cpp124 uint32_t newLength = VectorToArrayIndex(capacity); in Copy() local
126 …SHandle<TaggedArray> newVec = factory->CopyArray(JSHandle<TaggedArray>(vec), oldLength, newLength); in Copy()
Dvtable.h84 void Trim(const JSThread *thread, uint32_t newLength);
Decma_string.cpp32 uint32_t newLength = leftLength + rightLength; in Concat() local
33 if (newLength == 0) { in Concat()
57 if (newLength < TreeEcmaString::MIN_TREE_ECMASTRING_LENGTH) { in Concat()
60 auto newString = CreateLineStringWithSpaceType(vm, newLength, compressed, type); in Concat()
66 Span<uint8_t> sp(newString->GetDataUtf8Writable(), newLength); in Concat()
68 EcmaString::MemCopyChars(sp, newLength, srcLeft, leftLength); in Concat()
75 Span<uint16_t> sp(newString->GetDataUtf16Writable(), newLength); in Concat()
80 EcmaString::MemCopyChars(sp, newLength << 1U, srcLeft, leftLength << 1U); in Concat()
94 return CreateTreeString(vm, left, right, newLength, compressed); in Concat()
Dobject_factory.cpp413 uint32_t newLength = old->GetLength(); in CloneProperties() local
414 if (newLength == 0) { in CloneProperties()
419 size_t size = TaggedArray::ComputeSize(JSTaggedValue::TaggedTypeSize(), newLength); in CloneProperties()
422 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength()); in CloneProperties()
423 for (uint32_t i = 0; i < newLength; i++) { in CloneProperties()
515 uint32_t newLength = old->GetLength(); in CloneProperties() local
516 if (newLength == 0) { in CloneProperties()
521 size_t size = TaggedArray::ComputeSize(JSTaggedValue::TaggedTypeSize(), newLength); in CloneProperties()
524 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength()); in CloneProperties()
526 for (uint32_t i = 0; i < newLength; i++) { in CloneProperties()
[all …]
Djs_stable_array.cpp39 uint32_t newLength = argc + oldLength; in Push() local
42 if (newLength > elements->GetLength()) { in Push()
43 … elements = *JSObject::GrowElementsCapacity(thread, JSHandle<JSObject>::Cast(receiver), newLength); in Push()
50 receiver->SetArrayLength(thread, newLength); in Push()
52 return JSTaggedValue(newLength); in Push()
Dobject_factory.h342 …JSHandle<TaggedArray> NewAndCopyTaggedArray(JSHandle<TaggedArray> &srcElements, uint32_t newLength,
365 …le<TaggedArray> CopyArray(const JSHandle<TaggedArray> &old, uint32_t oldLength, uint32_t newLength,
560 JSHandle<TaggedArray> CopyQueue(const JSHandle<TaggedArray> &old, uint32_t newLength,
563 …JSHandle<TaggedArray> CopyDeque(const JSHandle<TaggedArray> &old, uint32_t newLength, uint32_t old…
Djs_bigint.cpp374 uint32_t newLength = bigintLength; in BitwiseAddOne() local
376 newLength += 1; in BitwiseAddOne()
378 JSHandle<BigInt> newBigint = BigInt::CreateBigint(thread, newLength); in BitwiseAddOne()
/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_arraylist.cpp245 int32_t newLength = length - (endIndex - startIndex); in RemoveByRange() local
246 arrayList->SetLength(thread, JSTaggedValue(newLength)); in RemoveByRange()
247 elements->SetLength(newLength); in RemoveByRange()
316 int newLength = toIndex == length ? length - fromIndex : endIndex - fromIndex; in SubArrayList() local
317 …dle<JSAPIArrayList> subArrayList = thread->GetEcmaVM()->GetFactory()->NewJSAPIArrayList(newLength); in SubArrayList()
318 if (newLength == 0) { in SubArrayList()
323 subArrayList->SetLength(thread, JSTaggedValue(newLength)); in SubArrayList()
325 for (int i = 0; i < newLength; i++) { in SubArrayList()
Djs_api_vector.cpp227 int32_t newLength = length - (endIndex - fromIndex); in RemoveByRange() local
228 elements->SetLength(newLength); in RemoveByRange()
229 vector->SetLength(newLength); in RemoveByRange()
247 uint32_t newLength = static_cast<uint32_t>(toIndex - fromIndex); in SubVector() local
248 JSHandle<JSAPIVector> subVector = thread->GetEcmaVM()->GetFactory()->NewJSAPIVector(newLength); in SubVector()
251 subVector->SetLength(newLength); in SubVector()
252 for (uint32_t i = 0; i < newLength; i++) { in SubVector()
/arkcompiler/ets_runtime/ecmascript/base/
Dtyped_array_helper.cpp327 uint64_t newLength = 0; in CreateFromArrayBuffer() local
331 newLength = static_cast<uint64_t>(index.GetNumber()); in CreateFromArrayBuffer()
358 newByteLength = newLength * elementSize; in CreateFromArrayBuffer()
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_api_arraylist_test.cpp537 int newLength = static_cast<int>(newSubArrayList->GetLength().GetArrayLength()); in HWTEST_F_L0() local
538 EXPECT_EQ(newLength, 1); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_typedarray.cpp1504 uint32_t newLength = endIndex > beginIndex ? (endIndex - beginIndex) : 0; in Subarray() local
1524 JSTaggedValue(newLength).GetRawData() in Subarray()
/arkcompiler/ets_frontend/legacy_bin/api8/src/
Dindex.js2newLength:t}}function l(t){return!!$(t)&&e.every(t.elements,u)}function u(t){return!!e.isOmittedEx…