/arkcompiler/ets_runtime/ecmascript/ |
D | tagged_array.h | 81 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);
|
D | tagged_array-inl.h | 242 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()
|
D | vtable.cpp | 68 void VTable::Trim(const JSThread *thread, uint32_t newLength) in Trim() argument 70 TaggedArray::Trim(thread, newLength * VTable::TUPLE_SIZE); in Trim()
|
D | weak_vector.cpp | 124 uint32_t newLength = VectorToArrayIndex(capacity); in Copy() local 126 …SHandle<TaggedArray> newVec = factory->CopyArray(JSHandle<TaggedArray>(vec), oldLength, newLength); in Copy()
|
D | vtable.h | 84 void Trim(const JSThread *thread, uint32_t newLength);
|
D | ecma_string.cpp | 32 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()
|
D | object_factory.cpp | 413 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 …]
|
D | js_stable_array.cpp | 39 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()
|
D | object_factory.h | 342 …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…
|
D | js_bigint.cpp | 374 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/ |
D | js_api_arraylist.cpp | 245 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()
|
D | js_api_vector.cpp | 227 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/ |
D | typed_array_helper.cpp | 327 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/ |
D | js_api_arraylist_test.cpp | 537 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/ |
D | builtins_typedarray.cpp | 1504 uint32_t newLength = endIndex > beginIndex ? (endIndex - beginIndex) : 0; in Subarray() local 1524 JSTaggedValue(newLength).GetRawData() in Subarray()
|
/arkcompiler/ets_frontend/legacy_bin/api8/src/ |
D | index.js | 2 …newLength:t}}function l(t){return!!$(t)&&e.every(t.elements,u)}function u(t){return!!e.isOmittedEx…
|