Home
last modified time | relevance | path

Searched refs:newCapacity (Results 1 – 14 of 14) sorted by relevance

/ark/js_runtime/ecmascript/
Dweak_vector.cpp42 …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()
Dtagged_queue.h59 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()
Djs_object-inl.h264 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()
Djs_stable_array.cpp126 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()
Djs_api_arraylist.h87 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()
Dlinked_hash_table.cpp135 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()
Dlinked_hash_table-inl.h257 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()
Dtagged_tree.cpp408 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()
Dweak_vector.h33 …le<WeakVector> Grow(const JSThread *thread, const JSHandle<WeakVector> &old, uint32_t newCapacity);
Djs_serializer.cpp179 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()
Djs_api_arraylist.cpp337 uint32_t newCapacity = ComputeCapacity(capacity); in GrowCapacity() local
339 thread->GetEcmaVM()->GetFactory()->CopyArray(oldElements, oldCapacity, newCapacity); in GrowCapacity()
Djs_object.cpp72 uint32_t newCapacity = ComputeElementCapacity(capacity); in GrowElementsCapacity() local
76 JSHandle<TaggedArray> newElements = factory->CopyArray(oldElements, oldLength, newCapacity); in GrowElementsCapacity()
/ark/js_runtime/ecmascript/mem/
Dlinear_space.cpp180 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/
Dcontainers_arraylist.cpp169 JSHandle<JSTaggedValue> newCapacity = GetCallArg(argv, 0); in IncreaseCapacityTo() local
170 if (!newCapacity->IsNumber()) { in IncreaseCapacityTo()
175 JSTaggedValue::ToUint32(thread, newCapacity)); in IncreaseCapacityTo()