• Home
  • Raw
  • Download

Lines Matching full:thread

29     JSThread *thread = argv->GetThread();  in ArrayListConstructor()  local
30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ArrayListConstructor()
31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ArrayListConstructor()
35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in ArrayListConstructor()
37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ArrayListConstructor()
41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ArrayListConstructor()
43 obj->SetElements(thread, newTaggedArray); in ArrayListConstructor()
51 JSThread *thread = argv->GetThread(); in Add() local
52 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add()
56 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Add()
57 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Add()
59 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Add()
61 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Add()
66 … return GetTaggedBoolean(JSAPIArrayList::Add(thread, JSHandle<JSAPIArrayList>::Cast(self), value)); in Add()
73 JSThread *thread = argv->GetThread(); in Insert() local
74 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Insert()
78 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Insert()
79 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Insert()
81 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Insert()
83 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Insert()
92 … index = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(index->GetDouble())); in Insert()
95 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, index); in Insert()
96 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Insert()
98 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in Insert()
99 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Insert()
100 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Insert()
102 …JSAPIArrayList::Insert(thread, JSHandle<JSAPIArrayList>::Cast(self), value, JSTaggedValue::ToUint3… in Insert()
103 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Insert()
112 JSThread *thread = argv->GetThread(); in Clear() local
113 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clear()
117 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Clear()
118 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Clear()
120 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Clear()
122 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Clear()
126 JSAPIArrayList::Clear(thread, JSHandle<JSAPIArrayList>::Cast(self)); in Clear()
135 JSThread *thread = argv->GetThread(); in Clone() local
136 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clone()
140 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Clone()
141 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Clone()
143 JSTaggedValue error = ContainerError::BusinessError(thread, BIND_ERROR, in Clone()
145 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Clone()
149 …JSHandle<JSAPIArrayList> newArrayList = JSAPIArrayList::Clone(thread, JSHandle<JSAPIArrayList>::Ca… in Clone()
158 JSThread *thread = argv->GetThread(); in Has() local
159 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Has()
163 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Has()
164 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Has()
166 JSTaggedValue error = ContainerError::BusinessError(thread, BIND_ERROR, in Has()
168 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Has()
173 bool isHas = JSHandle<JSAPIArrayList>::Cast(self)->Has(thread, value.GetTaggedValue()); in Has()
183 JSThread *thread = argv->GetThread(); in GetCapacity() local
187 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in GetCapacity()
188 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetCapacity()
190 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetCapacity()
192 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetCapacity()
196 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, JSHandle<JSAPIArrayList>::Cast(self)); in GetCapacity()
205 JSThread *thread = argv->GetThread(); in IncreaseCapacityTo() local
206 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IncreaseCapacityTo()
210 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in IncreaseCapacityTo()
211 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in IncreaseCapacityTo()
213 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in IncreaseCapacityTo()
215 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in IncreaseCapacityTo()
221 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, newCapacity); in IncreaseCapacityTo()
222 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in IncreaseCapacityTo()
224 …he type of \"newCapacity\" must be number. Received value is: " + ConvertToString(thread, *result); in IncreaseCapacityTo()
225 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in IncreaseCapacityTo()
226 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in IncreaseCapacityTo()
229 JSAPIArrayList::IncreaseCapacityTo(thread, JSHandle<JSAPIArrayList>::Cast(self), in IncreaseCapacityTo()
230 JSTaggedValue::ToUint32(thread, newCapacity)); in IncreaseCapacityTo()
239 JSThread *thread = argv->GetThread(); in TrimToCurrentLength() local
240 [[maybe_unused]] EcmaHandleScope handleScope(thread); in TrimToCurrentLength()
244 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in TrimToCurrentLength()
245 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in TrimToCurrentLength()
247 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in TrimToCurrentLength()
249 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in TrimToCurrentLength()
253 JSAPIArrayList::TrimToCurrentLength(thread, JSHandle<JSAPIArrayList>::Cast(self)); in TrimToCurrentLength()
262 JSThread *thread = argv->GetThread(); in Get() local
263 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Get()
267 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Get()
268 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Get()
270 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Get()
272 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Get()
278 …alue element = JSHandle<JSAPIArrayList>::Cast(self)->Get(thread, JSTaggedValue::ToUint32(thread, v… in Get()
287 JSThread *thread = argv->GetThread(); in GetIndexOf() local
288 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIndexOf()
292 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in GetIndexOf()
293 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetIndexOf()
295 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetIndexOf()
297 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetIndexOf()
303 …return JSTaggedValue(JSAPIArrayList::GetIndexOf(thread, JSHandle<JSAPIArrayList>::Cast(self), valu… in GetIndexOf()
310 JSThread *thread = argv->GetThread(); in IsEmpty() local
311 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsEmpty()
315 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in IsEmpty()
316 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in IsEmpty()
318 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in IsEmpty()
320 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in IsEmpty()
324 return JSTaggedValue(JSAPIArrayList::IsEmpty(thread, JSHandle<JSAPIArrayList>::Cast(self))); in IsEmpty()
331 JSThread *thread = argv->GetThread(); in GetLastIndexOf() local
332 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLastIndexOf()
336 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in GetLastIndexOf()
337 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetLastIndexOf()
339 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetLastIndexOf()
341 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetLastIndexOf()
347 …return JSTaggedValue(JSAPIArrayList::GetLastIndexOf(thread, JSHandle<JSAPIArrayList>::Cast(self), … in GetLastIndexOf()
354 JSThread *thread = argv->GetThread(); in RemoveByIndex() local
355 [[maybe_unused]] EcmaHandleScope handleScope(thread); in RemoveByIndex()
359 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in RemoveByIndex()
360 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in RemoveByIndex()
362 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in RemoveByIndex()
364 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByIndex()
370 … value = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(value->GetDouble())); in RemoveByIndex()
373 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, value.GetTaggedValue()); in RemoveByIndex()
374 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByIndex()
376 …e type of \"index\" must be small integer. Received value is: " + ConvertToString(thread, *result); in RemoveByIndex()
377 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in RemoveByIndex()
378 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByIndex()
382 JSAPIArrayList::RemoveByIndex(thread, in RemoveByIndex()
383 … JSHandle<JSAPIArrayList>::Cast(self), JSTaggedValue::ToUint32(thread, value)); in RemoveByIndex()
385 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByIndex()
393 JSThread *thread = argv->GetThread(); in Remove() local
394 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Remove()
398 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Remove()
399 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Remove()
401 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Remove()
403 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Remove()
409 bool isRemove = JSAPIArrayList::Remove(thread, JSHandle<JSAPIArrayList>::Cast(self), value); in Remove()
410 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Remove()
419 JSThread *thread = argv->GetThread(); in RemoveByRange() local
420 [[maybe_unused]] EcmaHandleScope handleScope(thread); in RemoveByRange()
424 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in RemoveByRange()
425 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in RemoveByRange()
427 JSTaggedValue error = ContainerError::BusinessError(thread, BIND_ERROR, in RemoveByRange()
429 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByRange()
437 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, startIndex); in RemoveByRange()
438 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByRange()
440 …"The type of \"fromIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in RemoveByRange()
441 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in RemoveByRange()
442 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByRange()
446 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, endIndex); in RemoveByRange()
447 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByRange()
449 … "The type of \"toIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in RemoveByRange()
450 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in RemoveByRange()
451 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in RemoveByRange()
454 … JSAPIArrayList::RemoveByRange(thread, JSHandle<JSAPIArrayList>::Cast(self), startIndex, endIndex); in RemoveByRange()
456 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByRange()
464 JSThread *thread = argv->GetThread(); in ReplaceAllElements() local
465 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ReplaceAllElements()
469 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in ReplaceAllElements()
470 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in ReplaceAllElements()
472 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ReplaceAllElements()
474 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ReplaceAllElements()
480 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle); in ReplaceAllElements()
481 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ReplaceAllElements()
483 …e type of \"callbackfn\" must be callable. Received value is: " + ConvertToString(thread, *result); in ReplaceAllElements()
484 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in ReplaceAllElements()
485 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ReplaceAllElements()
489 return JSAPIArrayList::ReplaceAllElements(thread, self, callbackFnHandle, thisArgHandle); in ReplaceAllElements()
496 JSThread *thread = argv->GetThread(); in Set() local
497 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Set()
501 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Set()
502 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Set()
504 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Set()
506 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Set()
512 …JSHandle<JSAPIArrayList>::Cast(self)->Set(thread, JSTaggedValue::ToUint32(thread, index), value.Ge… in Set()
514 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Set()
522 JSThread *thread = argv->GetThread(); in SubArrayList() local
523 [[maybe_unused]] EcmaHandleScope handleScope(thread); in SubArrayList()
527 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in SubArrayList()
528 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in SubArrayList()
530 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in SubArrayList()
532 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in SubArrayList()
539 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, value1); in SubArrayList()
540 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SubArrayList()
542 …"The type of \"fromIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in SubArrayList()
543 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in SubArrayList()
544 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in SubArrayList()
548 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, value2); in SubArrayList()
549 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SubArrayList()
551 … "The type of \"toIndex\" must be number. Received value is: " + ConvertToString(thread, *result); in SubArrayList()
552 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in SubArrayList()
553 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in SubArrayList()
556 JSAPIArrayList::SubArrayList(thread, JSHandle<JSAPIArrayList>::Cast(self), value1, value2); in SubArrayList()
558 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SubArrayList()
566 JSThread *thread = argv->GetThread(); in Sort() local
567 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Sort()
570 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in Sort()
571 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Sort()
573 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Sort()
575 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Sort()
580 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle); in Sort()
581 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Sort()
583 …e type of \"comparator\" must be callable. Received value is: " + ConvertToString(thread, *result); in Sort()
584 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in Sort()
585 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Sort()
587 … JSHandle<TaggedArray> elements(thread, JSHandle<JSAPIArrayList>::Cast(self)->GetElements(thread)); in Sort()
588 JSMutableHandle<JSTaggedValue> presentValue(thread, JSTaggedValue::Undefined()); in Sort()
589 JSMutableHandle<JSTaggedValue> middleValue(thread, JSTaggedValue::Undefined()); in Sort()
590 JSMutableHandle<JSTaggedValue> previousValue(thread, JSTaggedValue::Undefined()); in Sort()
591 uint32_t length = JSHandle<JSAPIArrayList>::Cast(self)->GetLength(thread).GetArrayLength(); in Sort()
595 presentValue.Update(elements->Get(thread, i)); in Sort()
598 middleValue.Update(elements->Get(thread, middleIndex)); in Sort()
599 double compareResult = base::ArrayHelper::SortCompare(thread, callbackFnHandle, in Sort()
601 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Sort()
610 previousValue.Update(elements->Get(thread, j - 1)); in Sort()
611 elements->Set(thread, j, previousValue.GetTaggedValue()); in Sort()
613 elements->Set(thread, endIndex, presentValue.GetTaggedValue()); in Sort()
623 JSThread *thread = argv->GetThread(); in GetSize() local
624 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetSize()
628 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in GetSize()
629 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetSize()
631 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetSize()
633 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetSize()
637 return JSTaggedValue(JSHandle<JSAPIArrayList>::Cast(self)->GetSize(thread)); in GetSize()
644 JSThread *thread = argv->GetThread(); in ConvertToArray() local
645 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ConvertToArray()
649 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in ConvertToArray()
650 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in ConvertToArray()
652 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ConvertToArray()
654 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ConvertToArray()
659 auto factory = thread->GetEcmaVM()->GetFactory(); in ConvertToArray()
662 uint32_t length = arrayList->GetLength(thread).GetArrayLength(); in ConvertToArray()
663 array->SetArrayLength(thread, length); in ConvertToArray()
665 JSHandle<TaggedArray> srcElements(thread, arrayList->GetElements(thread)); in ConvertToArray()
667 array->SetElements(thread, dstElements); in ConvertToArray()
675 JSThread *thread = argv->GetThread(); in ForEach() local
676 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ForEach()
680 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in ForEach()
681 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in ForEach()
683 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ForEach()
685 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
691 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle); in ForEach()
692 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ForEach()
694 …e type of \"callbackfn\" must be callable. Received value is: " + ConvertToString(thread, *result); in ForEach()
695 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in ForEach()
696 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
701 return JSAPIArrayList::ForEach(thread, self, callbackFnHandle, thisArgHandle); in ForEach()
708 JSThread *thread = argv->GetThread(); in GetIteratorObj() local
709 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIteratorObj()
714 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIArrayList()) { in GetIteratorObj()
715 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetIteratorObj()
717 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetIteratorObj()
719 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetIteratorObj()
723 …JSTaggedValue values = JSAPIArrayList::GetIteratorObj(thread, JSHandle<JSAPIArrayList>::Cast(self)… in GetIteratorObj()