| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | js_api_arraylist_test.cpp | 62 JSHandle<JSTaggedValue> arrayList = GetCallArg(argv, 2); // 2 means the secode arg in TestForEachAndReplaceAllFunc() local 63 if (!arrayList->IsUndefined()) { in TestForEachAndReplaceAllFunc() 65 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachAndReplaceAllFunc() 96 JSHandle<JSAPIArrayList> arrayList( in CreateArrayList() local 99 arrayList->SetElements(thread, taggedArray); in CreateArrayList() 100 return *arrayList; in CreateArrayList() 106 JSAPIArrayList *arrayList = CreateArrayList(); in HWTEST_F_L0() local 107 EXPECT_TRUE(arrayList != nullptr); in HWTEST_F_L0() 119 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0() local 122 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0() [all …]
|
| D | js_api_arraylist_iterator_test.cpp | 77 JSHandle<JSAPIArrayList> arrayList( in CreateArrayList() local 80 arrayList->SetElements(thread, taggedArray); in CreateArrayList() 81 return *arrayList; in CreateArrayList() 93 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0() local 97 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0() 99 …APIArrayListIterator> arrayListIterator(thread, JSAPIArrayList::GetIteratorObj(thread, arrayList)); in HWTEST_F_L0() 101 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, arrayList); in HWTEST_F_L0()
|
| D | js_set_iterator_test.cpp | 200 …JSHandle<JSArray> arrayList(thread, JSIterator::IteratorValue(thread, resultObj).GetTaggedValue()); in HWTEST_F_L0() local 202 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(arrayList), index0).GetValue()->Get… in HWTEST_F_L0() 203 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(arrayList), index1).GetValue()->Get… in HWTEST_F_L0()
|
| /arkcompiler/ets_runtime/ecmascript/js_api/ |
| D | js_api_arraylist.cpp | 31 bool JSAPIArrayList::Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Add() argument 34 uint32_t length = arrayList->GetLength().GetArrayLength(); in Add() 35 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Add() 39 arrayList->SetLength(thread, JSTaggedValue(++length)); in Add() 43 void JSAPIArrayList::Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Insert() argument 46 int length = arrayList->GetLength().GetInt(); in Insert() 54 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Insert() 60 arrayList->SetLength(thread, JSTaggedValue(++length)); in Insert() 63 void JSAPIArrayList::Clear(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList) in Clear() argument 65 if (!arrayList.IsEmpty()) { in Clear() [all …]
|
| D | js_api_arraylist.h | 36 …static bool Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, const JSHandle<JSTagg… 37 static void Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 42 static void IncreaseCapacityTo(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 44 static void TrimToCurrentLength(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList); 45 static bool IsEmpty(const JSHandle<JSAPIArrayList> &arrayList); 46 static int GetIndexOf(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 48 static int GetLastIndexOf(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 50 …static JSTaggedValue RemoveByIndex(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in… 51 static bool Remove(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 53 static JSTaggedValue RemoveByRange(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, [all …]
|
| D | js_api_arraylist_iterator.cpp | 44 JSHandle<JSTaggedValue> arrayList(thread, iter->GetIteratedArrayList()); in Next() local 47 if (arrayList->IsUndefined()) { in Next() 54 if (arrayList->IsJSAPIArrayList()) { in Next() 55 length = JSHandle<JSAPIArrayList>(arrayList)->GetLength().GetArrayLength(); in Next() 65 …JSHandle<JSTaggedValue> value(thread, JSHandle<JSAPIArrayList>::Cast(arrayList)->Get(thread, index… in Next()
|
| /arkcompiler/ets_runtime/ecmascript/containers/tests/ |
| D | containers_arraylist_test.cpp | 65 JSHandle<JSTaggedValue> arrayList = GetCallArg(argv, 1); in TestForEachFunc() local 66 if (!arrayList->IsUndefined()) { in TestForEachFunc() 68 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachFunc() 115 JSTaggedValue ArrayListAdd(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue value) in ArrayListAdd() argument 120 callInfo->SetThis(arrayList.GetTaggedValue()); in ArrayListAdd() 129 … JSTaggedValue ArrayListRemoveByRange(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue startIndex, in ArrayListRemoveByRange() argument 135 callInfo->SetThis(arrayList.GetTaggedValue()); in ArrayListRemoveByRange() 145 … JSTaggedValue ArrayListSubArrayList(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue startIndex, in ArrayListSubArrayList() argument 151 callInfo->SetThis(arrayList.GetTaggedValue()); in ArrayListSubArrayList() 177 JSHandle<JSAPIArrayList> arrayList(thread, result); in HWTEST_F_L0() local [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/arraylist_fuzzer/ |
| D | arraylist_fuzzer.cpp | 78 JSHandle<JSAPIArrayList> arrayList(thread, result); in CreateJSAPIArrayList() local 79 return arrayList; in CreateJSAPIArrayList() 82 void ArrayListAdd(JSThread* thread, JSHandle<JSAPIArrayList> arrayList, JSTaggedValue value) in ArrayListAdd() argument 86 callInfo->SetThis(arrayList.GetTaggedValue()); in ArrayListAdd() 96 JSHandle<JSTaggedValue> arrayList = argv->GetCallArg(2); // 2 means the secode arg in TestForEachFunc() local 97 if (!arrayList->IsUndefined()) { in TestForEachFunc() 99 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachFunc() 112 JSHandle<JSTaggedValue> arrayList = argv->GetCallArg(2); // 2 means the secode arg in TestReplaceAllElementsFunc() local 113 if (!arrayList->IsUndefined()) { in TestReplaceAllElementsFunc() 116 …JSHandle<JSAPIArrayList>::Cast(arrayList)->Set(thread, index->GetNumber(), newValue.GetTaggedValue… in TestReplaceAllElementsFunc() [all …]
|
| /arkcompiler/toolchain/tooling/test/testcases/js/ |
| D | container.js | 19 let arrayList = new ArrayList(); 20 arrayList.add(5); 21 arrayList.insert(4, 0); 22 arrayList.add(8); 23 arrayList.insert(18, 2); 24 arrayList.add(15); 25 arrayList.add(3); 26 arrayList.add(10); 27 arrayList.add(288); 28 arrayList.add(188); [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/container/ |
| D | container_arraylist.js | 22 var arrayList = undefined; variable 24 arrayList = ArkPrivate.Load(ArkPrivate.ArrayList); 25 let arr = new arrayList(); 47 let arr1 = new arrayList(); 183 let arr2 = new arrayList(); 234 let de = new arrayList(); 242 let test1 = new arrayList();
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | js_list_format.cpp | 221 JSHandle<JSTaggedValue> arrayList = JSHandle<JSTaggedValue>::Cast(array); in StringListFromIterable() local 225 return arrayList; in StringListFromIterable() 256 JSArray::FastSetPropertyByValue(thread, arrayList, k, nextValue); in StringListFromIterable() 261 return arrayList; in StringListFromIterable()
|
| D | object_factory.h | 615 …andle<JSAPIArrayListIterator> NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList);
|
| D | dump.cpp | 2117 JSAPIArrayList *arrayList = JSAPIArrayList::Cast(GetIteratedArrayList().GetTaggedObject()); in Dump() local 2118 os << " - length: " << std::dec << arrayList->GetSize() << "\n"; in Dump()
|
| D | object_factory.cpp | 4050 …ayListIterator> ObjectFactory::NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList) in NewJSAPIArrayListIterator() argument 4059 iter->SetIteratedArrayList(thread_, arrayList); in NewJSAPIArrayListIterator()
|
| /arkcompiler/ets_runtime/ecmascript/containers/ |
| D | containers_arraylist.cpp | 655 JSHandle<JSAPIArrayList> arrayList = JSHandle<JSAPIArrayList>::Cast(self); in ConvertToArray() local 659 uint32_t length = arrayList->GetLength().GetArrayLength(); in ConvertToArray() 662 JSHandle<TaggedArray> srcElements(thread, arrayList->GetElements()); in ConvertToArray()
|
| /arkcompiler/ets_runtime/ecmascript/debugger/ |
| D | debugger_api.cpp | 950 JSHandle<JSAPIArrayList> arrayList(JSNApiHelper::ToJSHandle(value)); in GetArrayListValue() local 951 uint32_t size = static_cast<uint32_t>(arrayList->GetSize()); in GetArrayListValue() 957 currentValue.Update(arrayList->Get(thread, index)); in GetArrayListValue()
|