Home
last modified time | relevance | path

Searched refs:arrayList (Results 1 – 16 of 16) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_api_arraylist_test.cpp62 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 …]
Djs_api_arraylist_iterator_test.cpp77 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()
Djs_set_iterator_test.cpp200 …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/
Djs_api_arraylist.cpp31 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 …]
Djs_api_arraylist.h36 …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 …]
Djs_api_arraylist_iterator.cpp44 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/test/fuzztest/arraylist_fuzzer/
Darraylist_fuzzer.cpp77 JSHandle<JSAPIArrayList> arrayList(thread, result); in CreateJSAPIArrayList() local
78 return arrayList; in CreateJSAPIArrayList()
81 void ArrayListAdd(JSThread* thread, JSHandle<JSAPIArrayList> arrayList, JSTaggedValue value) in ArrayListAdd() argument
85 callInfo->SetThis(arrayList.GetTaggedValue()); in ArrayListAdd()
95 JSHandle<JSTaggedValue> arrayList = argv->GetCallArg(2); // 2 means the secode arg in TestForEachFunc() local
96 if (!arrayList->IsUndefined()) { in TestForEachFunc()
98 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachFunc()
111 JSHandle<JSTaggedValue> arrayList = argv->GetCallArg(2); // 2 means the secode arg in TestReplaceAllElementsFunc() local
112 if (!arrayList->IsUndefined()) { in TestReplaceAllElementsFunc()
115 …JSHandle<JSAPIArrayList>::Cast(arrayList)->Set(thread, index->GetNumber(), newValue.GetTaggedValue… in TestReplaceAllElementsFunc()
[all …]
/arkcompiler/ets_runtime/ecmascript/containers/tests/
Dcontainers_arraylist_test.cpp65 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/toolchain/tooling/test/testcases/js/
Dcontainer.js19 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/
Dcontainer_arraylist.js22 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/
Djs_list_format.cpp220 JSHandle<JSTaggedValue> arrayList = JSHandle<JSTaggedValue>::Cast(array); in StringListFromIterable() local
224 return arrayList; in StringListFromIterable()
255 JSArray::FastSetPropertyByValue(thread, arrayList, k, nextValue); in StringListFromIterable()
260 return arrayList; in StringListFromIterable()
Dobject_factory.h566 …andle<JSAPIArrayListIterator> NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList);
Ddump.cpp1993 JSAPIArrayList *arrayList = JSAPIArrayList::Cast(GetIteratedArrayList().GetTaggedObject()); in Dump() local
1994 os << " - length: " << std::dec << arrayList->GetSize() << "\n"; in Dump()
Dobject_factory.cpp3554 …ayListIterator> ObjectFactory::NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList) in NewJSAPIArrayListIterator() argument
3563 iter->SetIteratedArrayList(thread_, arrayList); in NewJSAPIArrayListIterator()
/arkcompiler/ets_runtime/ecmascript/containers/
Dcontainers_arraylist.cpp655 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/
Ddebugger_api.cpp869 JSHandle<JSAPIArrayList> arrayList(JSNApiHelper::ToJSHandle(value)); in GetArrayListValue() local
870 uint32_t size = static_cast<uint32_t>(arrayList->GetSize()); in GetArrayListValue()
876 currentValue.Update(arrayList->Get(thread, index)); in GetArrayListValue()