Home
last modified time | relevance | path

Searched refs:JSAPIArrayList (Results 1 – 20 of 20) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_arraylist.h27 class JSAPIArrayList : public JSObject {
30 static JSAPIArrayList *Cast(TaggedObject *object) in Cast()
33 return static_cast<JSAPIArrayList *>(object); in Cast()
36 …static bool Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, const JSHandle<JSTagg…
37 static void Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList,
39 static void Clear(JSThread *thread, const JSHandle<JSAPIArrayList> &obj);
40 static JSHandle<JSAPIArrayList> Clone(JSThread *thread, const JSHandle<JSAPIArrayList> &obj);
41 static uint32_t GetCapacity(JSThread *thread, const JSHandle<JSAPIArrayList> &obj);
42 static void IncreaseCapacityTo(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList,
44 static void TrimToCurrentLength(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList);
[all …]
Djs_api_arraylist.cpp31 bool JSAPIArrayList::Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Add()
43 void JSAPIArrayList::Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in Insert()
63 void JSAPIArrayList::Clear(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList) in Clear()
76 JSHandle<JSAPIArrayList> JSAPIArrayList::Clone(JSThread *thread, const JSHandle<JSAPIArrayList> &ob… in Clone()
83 JSHandle<JSAPIArrayList> newArrayList = factory->NewJSAPIArrayList(0); in Clone()
91 uint32_t JSAPIArrayList::GetCapacity(JSThread *thread, const JSHandle<JSAPIArrayList> &obj) in GetCapacity()
99 void JSAPIArrayList::IncreaseCapacityTo(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, in IncreaseCapacityTo()
114 void JSAPIArrayList::TrimToCurrentLength(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayLis… in TrimToCurrentLength()
117 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, arrayList); in TrimToCurrentLength()
125 JSTaggedValue JSAPIArrayList::Get(JSThread *thread, const uint32_t index) in Get()
[all …]
Djs_api_arraylist_iterator.cpp55 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/tests/
Djs_api_arraylist_test.cpp65 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachAndReplaceAllFunc()
75 JSAPIArrayList *CreateArrayList() in CreateArrayList()
96 JSHandle<JSAPIArrayList> arrayList( in CreateArrayList()
98 …JSHandle<TaggedArray> taggedArray = factory->NewTaggedArray(JSAPIArrayList::DEFAULT_CAPACITY_LENGT… in CreateArrayList()
106 JSAPIArrayList *arrayList = CreateArrayList(); in HWTEST_F_L0()
119 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0()
122 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0()
139 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0()
142 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0()
148 JSAPIArrayList::Insert(thread, arrayList, insertValue, insertStartFrom + i); in HWTEST_F_L0()
[all …]
Djs_api_arraylist_iterator_test.cpp56 JSAPIArrayList *CreateArrayList() in CreateArrayList()
77 JSHandle<JSAPIArrayList> arrayList( in CreateArrayList()
79 …JSHandle<TaggedArray> taggedArray = factory->NewTaggedArray(JSAPIArrayList::DEFAULT_CAPACITY_LENGT… in CreateArrayList()
93 JSHandle<JSAPIArrayList> arrayList(thread, CreateArrayList()); in HWTEST_F_L0()
97 JSAPIArrayList::Add(thread, arrayList, value); in HWTEST_F_L0()
99 …JSHandle<JSAPIArrayListIterator> arrayListIterator(thread, JSAPIArrayList::GetIteratorObj(thread, … in HWTEST_F_L0()
101 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, arrayList); in HWTEST_F_L0()
Ddump_test.cpp290 static JSHandle<JSAPIArrayList> NewJSAPIArrayList(JSThread *thread, ObjectFactory *factory, in NewJSAPIArrayList()
294 factory->NewEcmaHClass(JSAPIArrayList::SIZE, JSType::JS_API_ARRAY_LIST, proto); in NewJSAPIArrayList()
295 …JSHandle<JSAPIArrayList> jsArrayList = JSHandle<JSAPIArrayList>::Cast(factory->NewJSObjectWithInit… in NewJSAPIArrayList()
1106 CHECK_DUMP_FIELDS(JSObject::SIZE, JSAPIArrayList::SIZE, 1U); in HWTEST_F_L0()
1107 JSHandle<JSAPIArrayList> jsArrayList = NewJSAPIArrayList(thread, factory, proto); in HWTEST_F_L0()
1114 JSHandle<JSAPIArrayList> jsArrayList = NewJSAPIArrayList(thread, factory, proto); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/containers/
Dcontainers_arraylist.cpp48 …JSHandle<TaggedArray> newTaggedArray = factory->NewTaggedArray(JSAPIArrayList::DEFAULT_CAPACITY_LE… in ArrayListConstructor()
72 … return GetTaggedBoolean(JSAPIArrayList::Add(thread, JSHandle<JSAPIArrayList>::Cast(self), value)); in Add()
102JSAPIArrayList::Insert(thread, JSHandle<JSAPIArrayList>::Cast(self), value, JSTaggedValue::ToUint3… in Insert()
126 JSAPIArrayList::Clear(thread, JSHandle<JSAPIArrayList>::Cast(self)); in Clear()
149 …JSHandle<JSAPIArrayList> newArrayList = JSAPIArrayList::Clone(thread, JSHandle<JSAPIArrayList>::Ca… in Clone()
173 bool isHas = JSHandle<JSAPIArrayList>::Cast(self)->Has(value.GetTaggedValue()); in Has()
196 uint32_t capacity = JSAPIArrayList::GetCapacity(thread, JSHandle<JSAPIArrayList>::Cast(self)); in GetCapacity()
229 JSAPIArrayList::IncreaseCapacityTo(thread, JSHandle<JSAPIArrayList>::Cast(self), in IncreaseCapacityTo()
253 JSAPIArrayList::TrimToCurrentLength(thread, JSHandle<JSAPIArrayList>::Cast(self)); in TrimToCurrentLength()
278 …JSTaggedValue element = JSHandle<JSAPIArrayList>::Cast(self)->Get(thread, JSTaggedValue::ToUint32(… in Get()
[all …]
Dcontainers_private.cpp282 …factory->NewEcmaHClass(JSAPIArrayList::SIZE, JSType::JS_API_ARRAY_LIST, arrayListFuncPrototypeValu… in InitializeArrayList()
/arkcompiler/ets_runtime/ecmascript/containers/tests/
Dcontainers_arraylist_test.cpp68 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachFunc()
99 JSHandle<JSAPIArrayList> CreateJSAPIArrayList() in CreateJSAPIArrayList()
111 JSHandle<JSAPIArrayList> ArrayList(thread, result); in CreateJSAPIArrayList()
115 JSTaggedValue ArrayListAdd(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue value) in ArrayListAdd()
129 … JSTaggedValue ArrayListRemoveByRange(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue startIndex, in ArrayListRemoveByRange()
145 … JSTaggedValue ArrayListSubArrayList(JSHandle<JSAPIArrayList> arrayList, JSTaggedValue startIndex, in ArrayListSubArrayList()
177 JSHandle<JSAPIArrayList> arrayList(thread, result); in HWTEST_F_L0()
192 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(); in HWTEST_F_L0()
233 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(); in HWTEST_F_L0()
259 …JSHandle<TaggedArray> elements(thread, JSAPIArrayList::Cast(newArrayList.GetTaggedObject())->GetEl… in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/arraylist_fuzzer/
Darraylist_fuzzer.cpp70 JSHandle<JSAPIArrayList> CreateJSAPIArrayList(JSThread *thread) in CreateJSAPIArrayList()
78 JSHandle<JSAPIArrayList> arrayList(thread, result); in CreateJSAPIArrayList()
82 void ArrayListAdd(JSThread* thread, JSHandle<JSAPIArrayList> arrayList, JSTaggedValue value) in ArrayListAdd()
99 … TaggedArray *elements = TaggedArray::Cast(JSAPIArrayList::Cast(arrayList.GetTaggedValue(). in TestForEachFunc()
116 …JSHandle<JSAPIArrayList>::Cast(arrayList)->Set(thread, index->GetNumber(), newValue.GetTaggedValue… in TestReplaceAllElementsFunc()
144 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(thread); in ArrayListForEachFuzzTest()
151 JSHandle<JSAPIArrayList> arrList = CreateJSAPIArrayList(thread); in ArrayListForEachFuzzTest()
169 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(thread); in ArrayListAddFuzzTest()
209 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(thread); in ArrayListClearFuzzTest()
242 JSHandle<JSAPIArrayList> arrayList = CreateJSAPIArrayList(thread); in ArrayListCloneFuzzTest()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/
Dcontainers_arraylist_stub_builder.h32 GateRef len = Load(VariableType::JS_ANY(), obj, IntPtr(JSAPIArrayList::LENGTH_OFFSET)); in GetSize()
/arkcompiler/ets_runtime/ecmascript/
Djs_tagged_value.cpp1151 return JSHandle<JSAPIArrayList>::Cast(obj)->Has(key.GetTaggedValue()); in HasContainerProperty()
1198 return JSAPIArrayList::OwnKeys(thread, JSHandle<JSAPIArrayList>::Cast(obj)); in GetOwnContainerPropertyKeys()
1282 … return JSAPIArrayList::GetOwnProperty(thread, JSHandle<JSAPIArrayList>::Cast(obj), key); in GetContainerProperty()
1368 … return JSAPIArrayList::GetProperty(thread, JSHandle<JSAPIArrayList>::Cast(obj), key); in GetJSAPIProperty()
1410 … return JSAPIArrayList::SetProperty(thread, JSHandle<JSAPIArrayList>::Cast(obj), key, value); in SetJSAPIProperty()
Dobject_factory.h114 class JSAPIArrayList; variable
603 JSHandle<JSAPIArrayList> NewJSAPIArrayList(uint32_t capacity);
615 …JSHandle<JSAPIArrayListIterator> NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayLi…
Dobject_fast_operator-inl.h789 res = JSAPIArrayList::Cast(receiver.GetTaggedObject())->Get(thread, index); in GetContainerProperty()
828 res = JSAPIArrayList::Cast(receiver.GetTaggedObject())->Set(thread, index, value); in SetContainerProperty()
Ddump.cpp1067 JSAPIArrayList::Cast(obj)->Dump(os); in DumpObject()
2109 void JSAPIArrayList::Dump(std::ostream &os) const in Dump()
2117 JSAPIArrayList *arrayList = JSAPIArrayList::Cast(GetIteratedArrayList().GetTaggedObject()); in Dump()
4221 JSAPIArrayList::Cast(obj)->DumpForSnapshot(vec); in DumpObject()
4934 void JSAPIArrayList::DumpForSnapshot(std::vector<Reference> &vec) const in DumpForSnapshot()
4943 JSAPIArrayList *arraylist = JSAPIArrayList::Cast(GetIteratedArrayList().GetTaggedObject()); in DumpForSnapshot()
Dobject_factory.cpp1250 JSAPIArrayList::Cast(*obj)->SetLength(thread_, JSTaggedValue(0)); in InitializeJSObject()
4038 JSHandle<JSAPIArrayList> ObjectFactory::NewJSAPIArrayList(uint32_t capacity) in NewJSAPIArrayList()
4042 JSHandle<JSAPIArrayList> obj = JSHandle<JSAPIArrayList>(NewJSObjectByConstructor(builtinObj)); in NewJSAPIArrayList()
4050 …ayListIterator> ObjectFactory::NewJSAPIArrayListIterator(const JSHandle<JSAPIArrayList> &arrayList) in NewJSAPIArrayListIterator()
/arkcompiler/ets_runtime/ecmascript/mem/
Dobject_xray.h534 JSAPIArrayList::Cast(object)->VisitRangeSlot<visitType>(visitor); in VisitObjectBody()
/arkcompiler/ets_runtime/ecmascript/debugger/
Ddebugger_api.cpp51 using ecmascript::JSAPIArrayList;
950 JSHandle<JSAPIArrayList> arrayList(JSNApiHelper::ToJSHandle(value)); in GetArrayListValue()
/arkcompiler/ets_runtime/ecmascript/napi/test/
Dffi_workload.cpp700 …JSHandle<JSHClass> arrayListClass = factory->NewEcmaHClass(JSAPIArrayList::SIZE, JSType::JS_API_AR… in HWTEST_F_L0()
701 …JSHandle<JSAPIArrayList> jsArrayList = JSHandle<JSAPIArrayList>::Cast(factory->NewJSObjectWithInit… in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/compiler/
Dstub_builder.cpp5965 GateRef lengthOffset = IntPtr(panda::ecmascript::JSAPIArrayList::LENGTH_OFFSET); in JSAPIContainerGet()