Lines Matching refs:old

491 JSHandle<TaggedArray> ObjectFactory::CloneProperties(const JSHandle<TaggedArray> &old)
493 uint32_t newLength = old->GetLength();
498 auto klass = old->GetClass();
502 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength());
504 JSTaggedValue value = old->Get(i);
561 // Set the first shared elements into the old object.
584 // Set the first shared properties into the old object.
594 JSHandle<TaggedArray> ObjectFactory::CloneProperties(const JSHandle<TaggedArray> &old,
597 uint32_t newLength = old->GetLength();
602 auto klass = old->GetClass();
606 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength());
609 JSTaggedValue value = old->Get(i);
2919 JSHandle<TaggedArray> ObjectFactory::ExtendArray(const JSHandle<TaggedArray> &old, uint32_t length,
2923 ASSERT(length >= old->GetLength());
2927 // If old element is Mutantarray, need conversion according to kind.
2928 if (old->GetClass()->IsMutantTaggedArray()) {
2936 newArray->SetExtraLength(old->GetExtraLength());
2938 uint32_t oldLength = old->GetLength();
2940 auto isMutantTaggedArray = old->GetClass()->IsMutantTaggedArray();
2943 newArray->Set<false>(thread_, index, old->Get(index));
2945 newArray->Set(thread_, index, old->Get(index));
2961 JSHandle<TaggedArray> ObjectFactory::CopyPartArray(const JSHandle<TaggedArray> &old, uint32_t start,
2965 ASSERT(end <= old->GetLength());
2977 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength());
2980 JSTaggedValue value = old->Get(i + start);
2989 JSHandle<TaggedArray> ObjectFactory::CopyArray(const JSHandle<TaggedArray> &old, uint32_t oldLength, uint32_t newLength,
2996 return ExtendArray(old, newLength, initVal, type, kind);
3004 if (old->GetClass()->IsMutantTaggedArray()) {
3013 if (old->GetClass()->IsMutantTaggedArray()) {
3023 newArray->SetExtraLength(old->GetExtraLength());
3024 if (old->GetClass()->IsMutantTaggedArray()) {
3025 newArray->Copy<false>(thread_, 0, 0, *old, newLength);
3027 newArray->Copy(thread_, 0, 0, *old, newLength);
3033 JSHandle<TaggedArray> ObjectFactory::CopyFromEnumCache(const JSHandle<TaggedArray> &old)
3036 uint32_t oldLength = old->GetLength();
3043 newArray->SetExtraLength(old->GetExtraLength());
3046 JSTaggedValue value = old->Get(i + EnumCache::ENUM_CACHE_HEADER_SIZE);
3062 JSHandle<LayoutInfo> ObjectFactory::ExtendLayoutInfo(const JSHandle<LayoutInfo> &old, int properties)
3064 ASSERT(properties >= old->NumberOfElements());
3066 ASSERT(arrayLength > old->GetLength());
3068 auto oldArray = JSHandle<TaggedArray>(old);
3072 uint32_t oldLength = old->GetLength();
3080 JSHandle<LayoutInfo> ObjectFactory::CopyLayoutInfo(const JSHandle<LayoutInfo> &old)
3082 uint32_t newLength = old->GetLength();
3083 return JSHandle<LayoutInfo>(CopyArray(JSHandle<TaggedArray>::Cast(old), newLength, newLength));
3086 JSHandle<LayoutInfo> ObjectFactory::CopyAndReSort(const JSHandle<LayoutInfo> &old, int end, int capacity)
3090 Span<struct Properties> sp(old->GetProperties(), end);
4396 JSHandle<TaggedArray> ObjectFactory::CopyDeque(const JSHandle<TaggedArray> &old, uint32_t newLength,
4404 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength());
4409 uint32_t oldCapacity = old->GetLength();
4411 JSTaggedValue value = old->Get(curIndex);
4434 JSHandle<TaggedArray> ObjectFactory::CopyQueue(const JSHandle<TaggedArray> &old, uint32_t newLength,
4442 newArray->InitializeWithSpecialValue(JSTaggedValue::Hole(), newLength, old->GetExtraLength());
4447 uint32_t oldCapacity = old->GetLength();
4449 JSTaggedValue value = old->Get(curIndex);