Lines Matching full:thread
27 JSThread *thread = argv->GetThread(); in VectorConstructor() local
28 BUILTINS_API_TRACE(thread, Vector, Constructor); in VectorConstructor()
29 [[maybe_unused]] EcmaHandleScope handleScope(thread); in VectorConstructor()
31 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in VectorConstructor()
34 … THROW_TYPE_ERROR_AND_RETURN(thread, "new target can't be undefined", JSTaggedValue::Exception()); in VectorConstructor()
39 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in VectorConstructor()
41 obj->SetElements(thread, newTaggedArray); in VectorConstructor()
49 JSThread *thread = argv->GetThread(); in Add() local
50 BUILTINS_API_TRACE(thread, Vector, Add); in Add()
51 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Add()
56 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Add()
58 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Add()
62 JSAPIVector::Add(thread, JSHandle<JSAPIVector>::Cast(self), value); in Add()
63 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Add()
71 JSThread *thread = argv->GetThread(); in Insert() local
72 BUILTINS_API_TRACE(thread, Vector, Insert); in Insert()
73 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Insert()
78 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Insert()
80 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Insert()
86 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in Insert()
88 int32_t indexInt = JSTaggedValue::ToInt32(thread, index); in Insert()
89 JSAPIVector::Insert(thread, JSHandle<JSAPIVector>::Cast(self), value, indexInt); in Insert()
90 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Insert()
98 JSThread *thread = argv->GetThread(); in SetLength() local
99 BUILTINS_API_TRACE(thread, Vector, SetLength); in SetLength()
100 [[maybe_unused]] EcmaHandleScope handleScope(thread); in SetLength()
105 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in SetLength()
107 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in SetLength()
112 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in parameter needs to be number", JSTaggedValue::E… in SetLength()
115 … THROW_RANGE_ERROR_AND_RETURN(thread, "An incorrect size was set", JSTaggedValue::Exception()); in SetLength()
117 …JSAPIVector::SetLength(thread, JSHandle<JSAPIVector>::Cast(self), JSTaggedValue::ToUint32(thread, … in SetLength()
118 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SetLength()
125 JSThread *thread = argv->GetThread(); in GetCapacity() local
126 BUILTINS_API_TRACE(thread, Vector, GetCapacity); in GetCapacity()
127 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetCapacity()
132 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetCapacity()
134 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetCapacity()
138 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetCapacity()
146 JSThread *thread = argv->GetThread(); in IncreaseCapacityTo() local
147 BUILTINS_API_TRACE(thread, Vector, IncreaseCapacityTo); in IncreaseCapacityTo()
148 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IncreaseCapacityTo()
153 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in IncreaseCapacityTo()
155 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in IncreaseCapacityTo()
160 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in parameter needs to be number", JSTaggedValue::E… in IncreaseCapacityTo()
162 JSAPIVector::IncreaseCapacityTo(thread, in IncreaseCapacityTo()
164 JSTaggedValue::ToInt32(thread, newCapacity)); in IncreaseCapacityTo()
165 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in IncreaseCapacityTo()
173 JSThread *thread = argv->GetThread(); in Get() local
174 BUILTINS_API_TRACE(thread, Vector, Get); in Get()
175 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Get()
180 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Get()
182 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Get()
187 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in Get()
189 int32_t indexInt = JSTaggedValue::ToInt32(thread, index); in Get()
190 JSTaggedValue value = JSAPIVector::Get(thread, JSHandle<JSAPIVector>::Cast(self), indexInt); in Get()
191 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Get()
199 JSThread *thread = argv->GetThread(); in GetIndexOf() local
200 BUILTINS_API_TRACE(thread, Vector, GetIndexOf); in GetIndexOf()
201 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIndexOf()
206 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetIndexOf()
208 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetIndexOf()
212 int index = JSAPIVector::GetIndexOf(thread, JSHandle<JSAPIVector>::Cast(self), element); in GetIndexOf()
213 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetIndexOf()
221 JSThread *thread = argv->GetThread(); in GetIndexFrom() local
222 BUILTINS_API_TRACE(thread, Vector, GetIndexFrom); in GetIndexFrom()
223 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIndexFrom()
228 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetIndexFrom()
230 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetIndexFrom()
236 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in GetIndexFrom()
238 int32_t indexInt = JSTaggedValue::ToInt32(thread, index); in GetIndexFrom()
239 int indexOut = JSAPIVector::GetIndexFrom(thread, JSHandle<JSAPIVector>::Cast(self), in GetIndexFrom()
241 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetIndexFrom()
249 JSThread *thread = argv->GetThread(); in IsEmpty() local
250 BUILTINS_API_TRACE(thread, Vector, IsEmpty); in IsEmpty()
251 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsEmpty()
256 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in IsEmpty()
258 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in IsEmpty()
269 JSThread *thread = argv->GetThread(); in GetLastElement() local
270 BUILTINS_API_TRACE(thread, Vector, GetLastElement); in GetLastElement()
271 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLastElement()
276 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetLastElement()
278 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetLastElement()
289 JSThread *thread = argv->GetThread(); in GetLastIndexOf() local
290 BUILTINS_API_TRACE(thread, Vector, GetLastIndexOf); in GetLastIndexOf()
291 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLastIndexOf()
296 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetLastIndexOf()
298 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetLastIndexOf()
302 int index = JSAPIVector::GetLastIndexOf(thread, JSHandle<JSAPIVector>::Cast(self), element); in GetLastIndexOf()
303 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetLastIndexOf()
311 JSThread *thread = argv->GetThread(); in GetLastIndexFrom() local
312 BUILTINS_API_TRACE(thread, Vector, GetLastIndexFrom); in GetLastIndexFrom()
313 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLastIndexFrom()
318 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetLastIndexFrom()
320 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetLastIndexFrom()
326 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in GetLastIndexFrom()
328 int32_t indexInt = JSTaggedValue::ToInt32(thread, index); in GetLastIndexFrom()
329 int indexOut = JSAPIVector::GetLastIndexFrom(thread, JSHandle<JSAPIVector>::Cast(self), in GetLastIndexFrom()
331 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetLastIndexFrom()
338 JSThread *thread = argv->GetThread(); in Remove() local
339 BUILTINS_API_TRACE(thread, Vector, Remove); in Remove()
340 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Remove()
346 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Remove()
348 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Remove()
353 bool ret = JSAPIVector::Remove(thread, JSHandle<JSAPIVector>::Cast(self), element); in Remove()
354 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Remove()
361 JSThread *thread = argv->GetThread(); in RemoveByIndex() local
362 BUILTINS_API_TRACE(thread, Vector, RemoveByIndex); in RemoveByIndex()
363 [[maybe_unused]] EcmaHandleScope handleScope(thread); in RemoveByIndex()
368 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in RemoveByIndex()
370 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in RemoveByIndex()
375 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in RemoveByIndex()
378 …JSAPIVector::RemoveByIndex(thread, JSHandle<JSAPIVector>::Cast(self), JSTaggedValue::ToInt32(threa… in RemoveByIndex()
379 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByIndex()
386 JSThread *thread = argv->GetThread(); in RemoveByRange() local
387 BUILTINS_API_TRACE(thread, Vector, RemoveByRange); in RemoveByRange()
388 [[maybe_unused]] EcmaHandleScope handleScope(thread); in RemoveByRange()
393 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in RemoveByRange()
395 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in RemoveByRange()
401 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in parameter needs to be number", JSTaggedValue::E… in RemoveByRange()
404 JSAPIVector::RemoveByRange(thread, JSHandle<JSAPIVector>::Cast(self), in RemoveByRange()
405 JSTaggedValue::ToInt32(thread, fromIndex), in RemoveByRange()
406 JSTaggedValue::ToInt32(thread, toIndex)); in RemoveByRange()
407 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in RemoveByRange()
414 JSThread *thread = argv->GetThread(); in Set() local
415 BUILTINS_API_TRACE(thread, Vector, Set); in Set()
416 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Set()
421 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Set()
423 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Set()
429 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in index needs to be number", JSTaggedValue::Excep… in Set()
432 int32_t indexInt = JSTaggedValue::ToInt32(thread, index); in Set()
435 … THROW_RANGE_ERROR_AND_RETURN(thread, "the index is out-of-bounds", JSTaggedValue::Exception()); in Set()
437 JSTaggedValue value = JSHandle<JSAPIVector>::Cast(self)->Set(thread, in Set()
446 JSThread *thread = argv->GetThread(); in SubVector() local
447 BUILTINS_API_TRACE(thread, Vector, SubVector); in SubVector()
448 [[maybe_unused]] EcmaHandleScope handleScope(thread); in SubVector()
453 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in SubVector()
455 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in SubVector()
461 …THROW_TYPE_ERROR_AND_RETURN(thread, "The passed in parameter needs to be number", JSTaggedValue::E… in SubVector()
463 …JSHandle<JSAPIVector> subVector = JSAPIVector::SubVector(thread, JSHandle<JSAPIVector>::Cast(self), in SubVector()
464 … JSTaggedValue::ToInt32(thread, fromIndex), in SubVector()
465 … JSTaggedValue::ToInt32(thread, toIndex)); in SubVector()
466 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SubVector()
473 JSThread *thread = argv->GetThread(); in ToString() local
474 BUILTINS_API_TRACE(thread, Vector, ToString); in ToString()
475 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ToString()
480 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in ToString()
482 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in ToString()
486 JSTaggedValue value = JSAPIVector::ToString(thread, JSHandle<JSAPIVector>::Cast(self)); in ToString()
487 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToString()
494 JSThread *thread = argv->GetThread(); in GetSize() local
495 BUILTINS_API_TRACE(thread, Vector, GetSize); in GetSize()
496 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetSize()
501 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetSize()
503 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetSize()
514 JSThread *thread = argv->GetThread(); in ForEach() local
515 BUILTINS_API_TRACE(thread, Vector, ForEach); in ForEach()
516 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ForEach()
522 … thisHandle = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(thisHandle)->GetTarget()); in ForEach()
524 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in ForEach()
530 …THROW_TYPE_ERROR_AND_RETURN(thread, "the callbackfun is not callable.", JSTaggedValue::Exception()… in ForEach()
535 return JSAPIVector::ForEach(thread, thisHandle, callbackFnHandle, thisArgHandle); in ForEach()
541 JSThread *thread = argv->GetThread(); in ReplaceAllElements() local
542 BUILTINS_API_TRACE(thread, Vector, ReplaceAllElements); in ReplaceAllElements()
543 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ReplaceAllElements()
548 … thisHandle = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(thisHandle)->GetTarget()); in ReplaceAllElements()
550 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in ReplaceAllElements()
557 …THROW_TYPE_ERROR_AND_RETURN(thread, "the callbackfun is not callable.", JSTaggedValue::Exception()… in ReplaceAllElements()
561 return JSAPIVector::ReplaceAllElements(thread, thisHandle, callbackFnHandle, thisArgHandle); in ReplaceAllElements()
567 JSThread *thread = argv->GetThread(); in TrimToCurrentLength() local
568 BUILTINS_API_TRACE(thread, Vector, TrimToCurrentLength); in TrimToCurrentLength()
569 [[maybe_unused]] EcmaHandleScope handleScope(thread); in TrimToCurrentLength()
574 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in TrimToCurrentLength()
576 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in TrimToCurrentLength()
580 JSAPIVector::TrimToCurrentLength(thread, JSHandle<JSAPIVector>::Cast(self)); in TrimToCurrentLength()
587 JSThread *thread = argv->GetThread(); in Clear() local
588 BUILTINS_API_TRACE(thread, Vector, Clear); in Clear()
589 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clear()
594 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Clear()
596 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Clear()
600 JSAPIVector::Clear(thread, JSHandle<JSAPIVector>::Cast(self)); in Clear()
608 JSThread *thread = argv->GetThread(); in Clone() local
609 BUILTINS_API_TRACE(thread, Vector, Clone); in Clone()
610 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clone()
615 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Clone()
617 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Clone()
620 JSHandle<JSAPIVector> newVector = JSAPIVector::Clone(thread, JSHandle<JSAPIVector>::Cast(self)); in Clone()
627 JSThread *thread = argv->GetThread(); in Has() local
628 BUILTINS_API_TRACE(thread, Vector, Has); in Has()
629 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Has()
634 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Has()
636 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Has()
648 JSThread *thread = argv->GetThread(); in CopyToArray() local
649 BUILTINS_API_TRACE(thread, Vector, CopyToArray); in CopyToArray()
650 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CopyToArray()
655 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in CopyToArray()
657 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in CopyToArray()
666 JSHandle<TaggedArray> vectorElements(thread, vector->GetElements()); in CopyToArray()
670 JSHandle<TaggedArray> arrayElements(thread, array->GetElements()); in CopyToArray()
673 TaggedArray::CopyTaggedArrayElement(thread, vectorElements, arrayElements, vectorLength); in CopyToArray()
675 arrayElements->Set(thread, i, JSTaggedValue::Undefined()); in CopyToArray()
678 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CopyToArray()
681 array->SetElements(thread, newArrayElement); in CopyToArray()
684 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in CopyToArray()
691 JSThread *thread = argv->GetThread(); in ConvertToArray() local
692 BUILTINS_API_TRACE(thread, Vector, ConvertToArray); in ConvertToArray()
693 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ConvertToArray()
698 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in ConvertToArray()
700 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in ConvertToArray()
705 auto factory = thread->GetEcmaVM()->GetFactory(); in ConvertToArray()
709 array->SetArrayLength(thread, length); in ConvertToArray()
711 JSHandle<TaggedArray> srcElements(thread, vector->GetElements()); in ConvertToArray()
714 array->SetElements(thread, dstElements); in ConvertToArray()
721 JSThread *thread = argv->GetThread(); in GetFirstElement() local
722 BUILTINS_API_TRACE(thread, Vector, GetFirstElement); in GetFirstElement()
723 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetFirstElement()
728 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetFirstElement()
730 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetFirstElement()
741 JSThread *thread = argv->GetThread(); in Sort() local
742 BUILTINS_API_TRACE(thread, Vector, Sort); in Sort()
743 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Sort()
748 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in Sort()
750 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in Sort()
757 JSHandle<TaggedArray> elements = thread->GetEcmaVM()->GetFactory()->NewTaggedArray(length); in Sort()
758 elements->Copy(thread, 0, 0, TaggedArray::Cast(obj->GetElements()), length); in Sort()
759 JSMutableHandle<JSTaggedValue> presentValue(thread, JSTaggedValue::Undefined()); in Sort()
760 JSMutableHandle<JSTaggedValue> middleValue(thread, JSTaggedValue::Undefined()); in Sort()
761 JSMutableHandle<JSTaggedValue> previousValue(thread, JSTaggedValue::Undefined()); in Sort()
769 …double compareResult = base::ArrayHelper::SortCompare(thread, callbackFnHandle, middleValue, prese… in Sort()
770 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Sort()
781 elements->Set(thread, j, previousValue.GetTaggedValue()); in Sort()
783 elements->Set(thread, endIndex, presentValue.GetTaggedValue()); in Sort()
786 obj->SetElements(thread, elements); in Sort()
794 JSThread *thread = argv->GetThread(); in GetIteratorObj() local
795 BUILTINS_API_TRACE(thread, Vector, GetIteratorObj); in GetIteratorObj()
796 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIteratorObj()
802 self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget()); in GetIteratorObj()
804 … THROW_TYPE_ERROR_AND_RETURN(thread, "obj is not JSAPIVector", JSTaggedValue::Exception()); in GetIteratorObj()
808 JSTaggedValue values = JSAPIVector::GetIteratorObj(thread, JSHandle<JSAPIVector>::Cast(self)); in GetIteratorObj()