/ark/js_runtime/ecmascript/ |
D | weak_vector.cpp | 42 …or> WeakVector::Grow(const JSThread *thread, const JSHandle<WeakVector> &old, uint32_t newCapacity) in Grow() argument 45 ASSERT(newCapacity > oldCapacity); in Grow() 50 if (newCapacity > MAX_VECTOR_INDEX) { in Grow() 51 newCapacity = MAX_VECTOR_INDEX; in Grow() 56 VectorToArrayIndex(newCapacity)); in Grow()
|
D | tagged_queue.h | 59 uint32_t newCapacity = capacity + (capacity >> 1U); in Push() local 60 newCapacity = newCapacity < capacity ? MAX_QUEUE_INDEX : newCapacity; in Push() 61 JSHandle<TaggedQueue> newQueue = factory->NewTaggedQueue(newCapacity); in Push() 68 newQueue->SetCapacity(thread, JSTaggedValue(newCapacity)); in Push()
|
D | js_object-inl.h | 264 uint32_t newCapacity = oldCapacity + (oldCapacity >> 1U); in ComputeElementCapacity() local 265 return newCapacity > MIN_ELEMENTS_LENGTH ? newCapacity : MIN_ELEMENTS_LENGTH; in ComputeElementCapacity() 270 uint32_t newCapacity = oldCapacity + PROPERTIES_GROW_SIZE; in ComputePropertyCapacity() local 271 … return newCapacity > JSHClass::MAX_CAPACITY_OF_OUT_OBJECTS ? JSHClass::MAX_CAPACITY_OF_OUT_OBJECTS in ComputePropertyCapacity() 272 : newCapacity; in ComputePropertyCapacity()
|
D | js_stable_array.cpp | 126 uint32_t newCapacity = len - actualDeleteCount + insertCount; in Splice() local 134 if (TaggedArray::ShouldTrim(thread, oldCapacity, newCapacity)) { in Splice() 135 srcElementsHandle->Trim(thread, newCapacity); in Splice() 137 for (uint32_t idx = newCapacity; idx < len; idx++) { in Splice() 142 if (newCapacity > oldCapacity) { in Splice() 143 srcElementsHandle = JSObject::GrowElementsCapacity(thread, thisObjHandle, newCapacity); in Splice() 156 JSHandle<JSTaggedValue> newLenHandle(thread, JSTaggedValue(newCapacity)); in Splice()
|
D | js_api_arraylist.h | 87 uint32_t newCapacity = oldCapacity + (oldCapacity >> 1U); in DECL_VISIT_OBJECT_FOR_JS_OBJECT() local 88 return newCapacity > DEFAULT_CAPACITY_LENGTH ? newCapacity : DEFAULT_CAPACITY_LENGTH; in DECL_VISIT_OBJECT_FOR_JS_OBJECT()
|
D | linked_hash_table.cpp | 135 int newCapacity = ComputeCapacity(table->NumberOfElements() + numberOfAddedElements); in GrowCapacity() local 136 JSHandle<Derived> newTable = Create(thread, newCapacity); in GrowCapacity() 158 …int newCapacity = ComputeCapacityWithShrink(table->Capacity(), table->NumberOfElements() + additio… in Shrink() local 159 if (newCapacity == table->Capacity()) { in Shrink() 163 JSHandle<Derived> newTable = Create(thread, newCapacity); in Shrink()
|
D | linked_hash_table-inl.h | 257 int newCapacity = ComputeCapacity(atLeastSpaceFor); in ComputeCapacityWithShrink() local 258 ASSERT_PRINT(newCapacity > atLeastSpaceFor, "new capacity must greater than atLeastSpaceFor"); in ComputeCapacityWithShrink() 260 if (newCapacity < Derived::MIN_SHRINK_CAPACITY) { in ComputeCapacityWithShrink() 263 return newCapacity; in ComputeCapacityWithShrink()
|
D | tagged_tree.cpp | 408 int newCapacity = ComputeCapacity(oldCapacity); in GrowCapacity() local 409 int length = ELEMENTS_START_INDEX + newCapacity * (Derived::ENTRY_SIZE); in GrowCapacity() 411 newTree->SetCapacity(thread, newCapacity); in GrowCapacity() 468 int newCapacity = (oldCapacity - 1) >> 1; in Shrink() local 469 if (newCapacity < Derived::MIN_SHRINK_CAPACITY) { in Shrink() 473 int length = ELEMENTS_START_INDEX + newCapacity * (Derived::ENTRY_SIZE); in Shrink() 475 newTree->SetCapacity(thread, newCapacity); in Shrink()
|
D | weak_vector.h | 33 …le<WeakVector> Grow(const JSThread *thread, const JSHandle<WeakVector> &old, uint32_t newCapacity);
|
D | js_serializer.cpp | 179 size_t newCapacity = bufferCapacity_ * CAPACITY_INCREASE_RATE; in ExpandBuffer() local 180 newCapacity = std::max(newCapacity, requestedSize); in ExpandBuffer() 181 if (newCapacity > sizeLimit_) { in ExpandBuffer() 184 uint8_t *newBuffer = reinterpret_cast<uint8_t *>(malloc(newCapacity)); in ExpandBuffer() 188 if (memcpy_s(newBuffer, newCapacity, buffer_, bufferSize_) != EOK) { in ExpandBuffer() 195 bufferCapacity_ = newCapacity; in ExpandBuffer()
|
D | js_api_arraylist.cpp | 337 uint32_t newCapacity = ComputeCapacity(capacity); in GrowCapacity() local 339 thread->GetEcmaVM()->GetFactory()->CopyArray(oldElements, oldCapacity, newCapacity); in GrowCapacity()
|
D | js_object.cpp | 72 uint32_t newCapacity = ComputeElementCapacity(capacity); in GrowElementsCapacity() local 76 JSHandle<TaggedArray> newElements = factory->CopyArray(oldElements, oldLength, newCapacity); in GrowElementsCapacity()
|
/ark/js_runtime/ecmascript/mem/ |
D | linear_space.cpp | 180 size_t newCapacity = GetMaximumCapacity() * growingFactor; in AdjustCapacity() local 181 SetMaximumCapacity(std::min(newCapacity, maxCapacity)); in AdjustCapacity() 187 size_t newCapacity = GetMaximumCapacity() / growingFactor; in AdjustCapacity() local 188 SetMaximumCapacity(std::max(newCapacity, initialCapacity_)); in AdjustCapacity()
|
/ark/js_runtime/ecmascript/containers/ |
D | containers_arraylist.cpp | 169 JSHandle<JSTaggedValue> newCapacity = GetCallArg(argv, 0); in IncreaseCapacityTo() local 170 if (!newCapacity->IsNumber()) { in IncreaseCapacityTo() 175 JSTaggedValue::ToUint32(thread, newCapacity)); in IncreaseCapacityTo()
|