Home
last modified time | relevance | path

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

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_api_arraylist_test.cpp38 JSHandle<JSTaggedValue> arrayList = GetCallArg(argv, 2); // 2 means the secode arg in TestForEachAndReplaceAllFunc() local
39 if (!arrayList->IsUndefined()) { in TestForEachAndReplaceAllFunc()
41 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachAndReplaceAllFunc()
51 …Handle<JSTaggedValue> ReplaceOrForEachCommon(JSThread* thread, JSHandle<JSAPIArrayList>& arrayList, in ReplaceOrForEachCommon() argument
61 callInfo->SetThis(arrayList.GetTaggedValue()); in ReplaceOrForEachCommon()
88 JSAPIArrayList *arrayList = CreateArrayList(); in HWTEST_F_L0() local
89 EXPECT_TRUE(arrayList != nullptr); in HWTEST_F_L0()
101 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0() local
104 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0()
106 JSHandle<TaggedArray> elements(thread, arrayList->GetElements()); in HWTEST_F_L0()
[all …]
Djs_api_arraylist_iterator_test.cpp46 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0() local
50 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0()
52 …APIArrayListIterator> arrayListIterator(thread, JSAPIArrayList::GetIteratorObj(thread, arrayList)); in HWTEST_F_L0()
54 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, arrayList); in HWTEST_F_L0()
Djs_set_iterator_test.cpp165 …JSHandle<JSArray> arrayList(thread, JSIterator::IteratorValue(thread, resultObj).GetTaggedValue()); in HWTEST_F_L0() local
167 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(arrayList), index0).GetValue()->Get… in HWTEST_F_L0()
168 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(arrayList), index1).GetValue()->Get… in HWTEST_F_L0()
Decma_container_common.h74 JSHandle<JSAPIArrayList> arrayList( in CreateArrayList()
77 arrayList->SetElements(thread, taggedArray); in CreateArrayList()
78 return *arrayList; in CreateArrayList()
/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_arraylist.cpp26 bool JSAPIArrayList::Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Add() argument
29 uint32_t length = arrayList->GetLength().GetArrayLength(); in Add()
30 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Add()
34 arrayList->SetLength(thread, JSTaggedValue(++length)); in Add()
38 void JSAPIArrayList::Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Insert() argument
41 int length = arrayList->GetLength().GetInt(); in Insert()
49 JSHandle<TaggedArray> elements = GrowCapacity(thread, arrayList, length + 1); in Insert()
55 arrayList->SetLength(thread, JSTaggedValue(++length)); in Insert()
58 void JSAPIArrayList::Clear(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList) in Clear() argument
60 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.cpp39 JSHandle<JSTaggedValue> arrayList(thread, iter->GetIteratedArrayList()); in Next() local
42 if (arrayList->IsUndefined()) { in Next()
49 if (arrayList->IsJSAPIArrayList()) { in Next()
50 length = JSHandle<JSAPIArrayList>(arrayList)->GetLength().GetArrayLength(); in Next()
60 …JSHandle<JSTaggedValue> value(thread, JSHandle<JSAPIArrayList>::Cast(arrayList)->Get(thread, index… in Next()
/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/ets_runtime/test/fuzztest/arraylist_fuzzer/
Darraylist_fuzzer.cpp78 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/ets_runtime/test/moduletest/container/
Dcontainer_arraylist.js24 var arrayList = undefined; variable
26 arrayList = ArkPrivate.Load(ArkPrivate.ArrayList);
27 let arr = new arrayList();
49 let arr1 = new arrayList();
174 let arr2 = new arrayList();
215 let testlist = new arrayList();
239 let myArrayList = new arrayList();
257 let de = new arrayList();
265 let test1 = new arrayList();
278 let myAl = new arrayList();
[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/ecmascript/
Djs_list_format.cpp210 JSHandle<JSTaggedValue> arrayList = JSHandle<JSTaggedValue>::Cast(array); in StringListFromIterable() local
214 return arrayList; in StringListFromIterable()
246 JSArray::FastSetPropertyByValue(thread, arrayList, k, nextValue); in StringListFromIterable()
251 return arrayList; in StringListFromIterable()
Dobject_factory.h653 …andle<JSAPIArrayListIterator> NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList);
Ddump.cpp2231 JSAPIArrayList *arrayList = JSAPIArrayList::Cast(GetIteratedArrayList().GetTaggedObject()); in Dump() local
2232 os << " - length: " << std::dec << arrayList->GetSize() << "\n"; in Dump()
Dobject_factory.cpp4326 …ayListIterator> ObjectFactory::NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList) in NewJSAPIArrayListIterator() argument
4335 iter->SetIteratedArrayList(thread_, arrayList); in NewJSAPIArrayListIterator()
/arkcompiler/ets_runtime/ecmascript/containers/
Dcontainers_arraylist.cpp658 JSHandle<JSAPIArrayList> arrayList = JSHandle<JSAPIArrayList>::Cast(self); in ConvertToArray() local
662 uint32_t length = arrayList->GetLength().GetArrayLength(); in ConvertToArray()
665 JSHandle<TaggedArray> srcElements(thread, arrayList->GetElements()); in ConvertToArray()
/arkcompiler/ets_runtime/ecmascript/debugger/
Ddebugger_api.cpp970 JSHandle<JSAPIArrayList> arrayList(JSNApiHelper::ToJSHandle(value)); in GetArrayListValue() local
971 uint32_t size = static_cast<uint32_t>(arrayList->GetSize()); in GetArrayListValue()
977 currentValue.Update(arrayList->Get(thread, index)); in GetArrayListValue()