Home
last modified time | relevance | path

Searched refs:JSArray (Results 1 – 25 of 143) sorted by relevance

123456

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_array_test.cpp61 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
64 EXPECT_EQ(JSArray::GetProperty(thread, obj, lengthKeyHandle).GetValue()->GetInt(), 0); in HWTEST_F_L0()
66 JSArray *arr2 = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0()
69 EXPECT_EQ(JSArray::GetProperty(thread, obj2, lengthKeyHandle).GetValue()->GetInt(), 10); in HWTEST_F_L0()
75 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
78 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandle).GetValue()->… in HWTEST_F_L0()
80JSArray *arr2 = JSArray::Cast(JSArray::ArraySpeciesCreate(thread, obj, JSTaggedNumber(10)).GetTagg… in HWTEST_F_L0()
83 EXPECT_EQ(JSArray::GetProperty(thread, obj2, lengthKeyHandle).GetValue()->GetInt(), 10); in HWTEST_F_L0()
91 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
94 EXPECT_EQ(JSArray::GetProperty(thread, obj, lengthKeyHandle).GetValue()->GetInt(), 0); in HWTEST_F_L0()
[all …]
Djs_array_iterator_test.cpp76 …JSHandle<JSObject> handleJSObjectTaggedArrayFrom1(JSArray::CreateArrayFromList(thread, handleTagge… in HWTEST_F_L0()
77 …JSHandle<JSObject> handleJSObjectTaggedArrayFrom2(JSArray::CreateArrayFromList(thread, handleTagge… in HWTEST_F_L0()
83 …JSHandle<JSArray> handleJSArrayTo1(thread, JSArray::Cast(handleJSArrayIter->GetIteratedArray().Get… in HWTEST_F_L0()
86 …EXPECT_EQ(JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo1), i)->G… in HWTEST_F_L0()
93 …JSHandle<JSArray> handleJSArrayTo2(thread, JSArray::Cast(handleJSArrayIter->GetIteratedArray().Get… in HWTEST_F_L0()
96 …EXPECT_EQ(JSArray::FastGetPropertyByValue(thread, JSHandle<JSTaggedValue>(handleJSArrayTo2), i)->G… in HWTEST_F_L0()
120 …JSHandle<JSObject> handleJSObjectTaggedArray(JSArray::CreateArrayFromList(thread, handleTaggedArra… in HWTEST_F_L0()
154 …JSHandle<JSObject> handleJSObjectTaggedArray(JSArray::CreateArrayFromList(thread, handleTaggedArra… in HWTEST_F_L0()
Djs_stable_array_test.cpp74 … JSHandle<JSTaggedValue> handleTagValArr = JSArray::ArrayCreate(thread, JSTaggedNumber(lengthArr)); in HWTEST_F_L0()
75 JSHandle<JSArray> handleArr(handleTagValArr); in HWTEST_F_L0()
112 JSHandle<JSArray> handleArr(JSArray::CreateArrayFromList(thread, handleTagArr)); in HWTEST_F_L0()
154 JSHandle<JSArray> handleArr(JSArray::CreateArrayFromList(thread, handleTagArr)); in HWTEST_F_L0()
168 JSTaggedValue newArray = JSArray::ArraySpeciesCreate(thread, thisObjHandle, in HWTEST_F_L0()
171 …JSStableArray::Splice(JSHandle<JSArray>::Cast(thisObjHandle), ecmaRuntimeCallInfo, offsetStartInse… in HWTEST_F_L0()
174 JSHandle<JSArray> handleArrCombinedOfDeletedElements(handleTagValArrCombinedOfDeletedElements); in HWTEST_F_L0()
215 JSHandle<JSArray> handleArr(JSArray::CreateArrayFromList(thread, handleTagArr)); in HWTEST_F_L0()
252 JSHandle<JSArray> handleArr(JSArray::CreateArrayFromList(thread, handleTagArr)); in HWTEST_F_L0()
283 JSHandle<JSArray> handleArr(JSArray::CreateArrayFromList(thread, handleTagArr)); in HWTEST_F_L0()
[all …]
Dtemplate_string_test.cpp76 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(arrayLength)).GetObject<JSArray>(); in HWTEST_F_L0()
82 JSArray::DefineOwnProperty(thread, JSHandle<JSObject>(jsArrayObj), arrayObjKey, propertyDesc); in HWTEST_F_L0()
87 JSArray::DefineOwnProperty(thread, JSHandle<JSObject>(jsArrayObj), arrayObjKey1, propertyDesc1); in HWTEST_F_L0()
92 JSArray::DefineOwnProperty(thread, JSHandle<JSObject>(jsArrayObj), arrayObjKey2, propertyDesc2); in HWTEST_F_L0()
96 JSHandle<JSTaggedValue> templateLiteral(JSArray::CreateArrayFromList(thread, elements)); in HWTEST_F_L0()
Djs_iterator_test.cpp67 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
81 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
94 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
112 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
125 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
Djs_list_format_test.cpp208 JSHandle<JSArray> valueArr = JSHandle<JSArray>::Cast(valueObj); in HWTEST_F_L0()
239 JSHandle<JSArray> valueArr = JSHandle<JSArray>::Cast(valueObj); in HWTEST_F_L0()
269 JSHandle<JSArray> valueArr = JSHandle<JSArray>::Cast(valueObj); in HWTEST_F_L0()
309 JSHandle<JSArray> valueArr = JSHandle<JSArray>::Cast(valueObj); in HWTEST_F_L0()
315 JSHandle<JSArray> parts = JSListFormat::FormatListToParts(thread, jsFormatter, valueArr); in HWTEST_F_L0()
344 JSHandle<JSTaggedValue> array(JSArray::CreateArrayFromList(thread, data)); in HWTEST_F_L0()
348 JSHandle<JSArray> strValue = JSHandle<JSArray>::Cast(arrayString); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_array_test.cpp95 JSArray *jsArray = JSArray::Cast(GetThis(argv)->GetTaggedObject()); in TestForEachFunc()
126 JSArray *arr = in TestFlatMapFunc()
127JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in TestFlatMapFunc()
130 … auto property = JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandle); in TestFlatMapFunc()
136 JSArray::DefineOwnProperty(thread, obj, key, desc); in TestFlatMapFunc()
266JSArray *arr = JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0))->GetTaggedObject()); in HWTEST_F_L0()
269 …EXPECT_EQ(JSArray::GetProperty(thread, JSHandle<JSTaggedValue>(obj), lengthKeyHandle).GetValue()->… in HWTEST_F_L0()
273 JSArray::DefineOwnProperty(thread, obj, key0, desc0); in HWTEST_F_L0()
276 JSArray::DefineOwnProperty(thread, obj, key1, desc1); in HWTEST_F_L0()
279 JSArray::DefineOwnProperty(thread, obj, key2, desc2); in HWTEST_F_L0()
[all …]
Dbuiltins_list_format_test.cpp146 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
151 JSArray::DefineOwnProperty(thread, value, key0, desc0); in HWTEST_F_L0()
154 JSArray::DefineOwnProperty(thread, value, key1, desc1); in HWTEST_F_L0()
157 JSArray::DefineOwnProperty(thread, value, key2, desc2); in HWTEST_F_L0()
184 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
189 JSArray::DefineOwnProperty(thread, value, key0, desc0); in HWTEST_F_L0()
192 JSArray::DefineOwnProperty(thread, value, key1, desc1); in HWTEST_F_L0()
195 JSArray::DefineOwnProperty(thread, value, key2, desc2); in HWTEST_F_L0()
220 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
225 JSArray::DefineOwnProperty(thread, value, key0, desc0); in HWTEST_F_L0()
[all …]
Dbuiltins_intl_test.cpp72 JSHandle<JSArray> resultHandle(thread, resultObj); in HWTEST_F_L0()
88 JSHandle<JSArray> resultHandle(thread, resultObj); in HWTEST_F_L0()
100 JSArray *arr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
106 JSArray::DefineOwnProperty(thread, JSHandle<JSObject>(obj), key, desc); in HWTEST_F_L0()
115 JSHandle<JSArray> resultHandle(thread, resultObj); in HWTEST_F_L0()
Dbuiltins_collator_test.cpp174 JSArray *jsArray = in HWTEST_F_L0()
175JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in HWTEST_F_L0()
181 JSArray::DefineOwnProperty(thread, jsObject, key0, desc0); in HWTEST_F_L0()
185 JSArray::DefineOwnProperty(thread, jsObject, key1, desc1); in HWTEST_F_L0()
189 JSArray::DefineOwnProperty(thread, jsObject, key2, desc2); in HWTEST_F_L0()
202 …EXPECT_EQ(JSTaggedValue::SameValue(JSArray::GetProperty(thread, resultArr, key0).GetValue(), value… in HWTEST_F_L0()
203 …EXPECT_EQ(JSTaggedValue::SameValue(JSArray::GetProperty(thread, resultArr, key1).GetValue(), value… in HWTEST_F_L0()
204 …EXPECT_EQ(JSTaggedValue::SameValue(JSArray::GetProperty(thread, resultArr, key2).GetValue(), value… in HWTEST_F_L0()
223 JSArray *jsArray = in HWTEST_F_L0()
224JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Djs_array.cpp27 JSTaggedValue JSArray::LengthGetter([[maybe_unused]] JSThread *thread, const JSHandle<JSObject> &se… in LengthGetter()
29 return JSTaggedValue(JSArray::Cast(*self)->GetLength()); in LengthGetter()
32 bool JSArray::LengthSetter(JSThread *thread, const JSHandle<JSObject> &self, const JSHandle<JSTagge… in LengthSetter()
47 uint32_t oldLen = JSArray::Cast(*self)->GetArrayLength(); in LengthSetter()
48 JSArray::SetCapacity(thread, self, oldLen, newLen); in LengthSetter()
52 JSHandle<JSTaggedValue> JSArray::ArrayCreate(JSThread *thread, JSTaggedNumber length, ArrayMode mod… in ArrayCreate()
56 return JSArray::ArrayCreate(thread, length, arrayFunction, mode); in ArrayCreate()
60 JSHandle<JSTaggedValue> JSArray::ArrayCreate(JSThread *thread, JSTaggedNumber length, in ArrayCreate()
85 JSArray::Cast(*obj)->SetArrayLength(thread, normalArrayLength); in ArrayCreate()
87 JSArray::SetCapacity(thread, obj, 0, normalArrayLength); in ArrayCreate()
[all …]
Djs_stable_array.h28 static JSTaggedValue Push(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv);
29 static JSTaggedValue Pop(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv);
30 … static JSTaggedValue Splice(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv, uint32_t start,
32 static JSTaggedValue Shift(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv);
33 static JSTaggedValue Join(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv);
59 static JSTaggedValue At(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv);
60 static JSTaggedValue With(JSThread *thread, JSHandle<JSArray> receiver,
62 static JSTaggedValue ToSpliced(JSHandle<JSArray> receiver, EcmaRuntimeCallInfo *argv,
64 …static JSTaggedValue ToReversed(JSThread *thread, JSHandle<JSArray> receiver, int64_t insertCoun…
Dtemplate_string.cpp38 JSHandle<JSArray> cookedStrings(cookedStringsTag); in GetTemplateObject()
41 JSHandle<JSTaggedValue> templateArr = JSArray::ArrayCreate(thread, countNum); in GetTemplateObject()
43 JSHandle<JSTaggedValue> rawArr = JSArray::ArrayCreate(thread, countNum); in GetTemplateObject()
50 JSArray::DefineOwnProperty(thread, templateObj, i, descCooked); in GetTemplateObject()
53 JSArray::DefineOwnProperty(thread, rawObj, i, descRaw); in GetTemplateObject()
59 JSArray::DefineOwnProperty(thread, templateObj, raw, desc); in GetTemplateObject()
Djs_list_format.cpp218 …JSHandle<JSArray> array = JSHandle<JSArray>::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0))); in StringListFromIterable()
255 JSArray::FastSetPropertyByValue(thread, arrayList, k, nextValue); in StringListFromIterable()
264 …std::vector<icu::UnicodeString> ToUnicodeStringArray(JSThread *thread, const JSHandle<JSArray> &ar… in ToUnicodeStringArray()
270 JSHandle<JSTaggedValue> kValue = JSArray::FastGetPropertyByValue(thread, listArray, k); in ToUnicodeStringArray()
282 const JSHandle<JSArray> &listArray) in GetIcuFormatted()
294 …stToArray(JSThread *thread, const icu::FormattedList &formatted, const JSHandle<JSArray> &receiver, in FormatListToArray()
367 const JSHandle<JSArray> &listArray) in FormatList()
386 JSHandle<JSArray> JSListFormat::FormatListToParts(JSThread *thread, const JSHandle<JSListFormat> &l… in FormatListToParts()
387 const JSHandle<JSArray> &listArray) in FormatListToParts()
398 …JSHandle<JSArray> array = JSHandle<JSArray>::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0))); in FormatListToParts()
[all …]
Djs_list_format.h78 const JSHandle<JSArray> &listArray);
81 …static JSHandle<JSArray> FormatListToParts(JSThread *thread, const JSHandle<JSListFormat> &listFor…
82 const JSHandle<JSArray> &listArray);
Djs_array.h27 class JSArray : public JSObject {
31 CAST_CHECK(JSArray, IsJSArray);
48 …static JSHandle<JSArray> CreateArrayFromList(JSThread *thread, const JSHandle<TaggedArray> &elemen…
97 static void CheckAndCopyArray(const JSThread *thread, JSHandle<JSArray> obj);
Djs_array_iterator.cpp60 length = JSHandle<JSArray>(array)->GetArrayLength(); in Next()
83 JSHandle<JSTaggedValue> value = JSArray::FastGetPropertyByValue(thread, array, index); in Next()
95 JSHandle<JSTaggedValue> keyAndValue(JSArray::CreateArrayFromList(thread, resultArray)); in Next()
Dtemplate_map.h33 JSArray *array = JSArray::Cast(obj.GetTaggedObject()); in Hash()
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_list_format.cpp76 …JSHandle<JSArray> result = JSLocale::SupportedLocales(thread, availableLocales, requestedLocales, … in SupportedLocalesOf()
103 JSHandle<JSArray> array = JSHandle<JSArray>::Cast(listArray); in Format()
130 JSHandle<JSArray> array = JSHandle<JSArray>::Cast(listArray); in FormatToParts()
132 JSHandle<JSArray> result = JSListFormat::FormatListToParts(thread, listFormat, array); in FormatToParts()
Dbuiltins_intl.cpp37 JSHandle<JSArray> result = JSArray::CreateArrayFromList(thread, elements); in GetCanonicalLocales()
Dbuiltins_array.cpp69 return JSArray::ArrayCreate(thread, JSTaggedNumber(0), newTarget).GetTaggedValue(); in ArrayConstructor()
76 …JSHandle<JSObject> newArrayHandle(JSArray::ArrayCreate(thread, JSTaggedNumber(newLen), newTarget)); in ArrayConstructor()
99 JSArray::SetCapacity(thread, newArrayHandle, 0, newLen); in ArrayConstructor()
106 …JSTaggedValue newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc), newTarget).GetTaggedVa… in ArrayConstructor()
129 JSArray::Cast(*newArrayHandle)->SetArrayLength(thread, argc); in ArrayConstructor()
188 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue(); in From()
276 …newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(static_cast<double>(len))).GetTaggedValue(); in From()
295 JSHandle<JSTaggedValue> kValue = JSArray::FastGetPropertyByValue(thread, arrayLike, k); in From()
366 newArray = JSArray::ArrayCreate(thread, JSTaggedNumber(argc)); in Of()
422 …JSTaggedValue newArray = JSArray::ArraySpeciesCreate(thread, thisObjHandle, JSTaggedNumber(arrayLe… in Concat()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/tests/
Djson_stringifier_test.cpp192 JSArray *handleArr = in HWTEST_F_L0()
193JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in HWTEST_F_L0()
252 JSArray *handleArr = in HWTEST_F_L0()
253JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in HWTEST_F_L0()
262 JSArray::DefineOwnProperty(thread, handleObj, handleKey1, handleDesc); in HWTEST_F_L0()
294 JSArray *handleArr = in HWTEST_F_L0()
295JSArray::Cast(JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetTaggedValue().GetTaggedObject()); in HWTEST_F_L0()
300 JSArray::DefineOwnProperty(thread, handleObj, handleKey0, handleDesc0); in HWTEST_F_L0()
304 JSArray::DefineOwnProperty(thread, handleObj, handleKey1, handleDesc1); in HWTEST_F_L0()
Darray_helper_test.cpp124 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(10)).GetObject<JSArray>(); in HWTEST_F_L0()
158 JSArray *handleArr = JSArray::ArrayCreate(thread, JSTaggedNumber(0)).GetObject<JSArray>(); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/base/
Darray_helper.cpp130 return JSArray::Cast(thisHandle->GetTaggedObject())->GetArrayLength(); in GetLength()
146 return JSArray::Cast(thisHandle->GetTaggedObject())->GetArrayLength(); in GetArrayLength()
208 element.Update(JSArray::FastGetPropertyByValue(thread, thisObjVal, p).GetTaggedValue()); in FlattenIntoArray()
290 JSHandle<JSTaggedValue> kValue = JSArray::FastGetPropertyByValue(thread, thisObjVal, k); in SortIndexedProperties()
296 JSHandle<JSArray> array(JSArray::CreateArrayFromList(thread, items)); in SortIndexedProperties()
301 JSArray::Sort(thread, arrayObj, callbackFnHandle); in SortIndexedProperties()
/arkcompiler/ets_runtime/ecmascript/module/
Djs_module_namespace.cpp46 JSHandle<JSArray> exportsArray = JSArray::CreateArrayFromList(thread, exports); in ModuleNamespaceCreate()
49 JSArray::Sort(thread, sortedExports, fn); in ModuleNamespaceCreate()
83 if (!JSArray::IncludeInSortedValue(thread, exports, key)) { in GetProperty()
119 JSHandle<TaggedArray> exportsArray = JSArray::ToTaggedArray(thread, exports); in OwnPropertyKeys()
138 JSHandle<TaggedArray> exportsArray = JSArray::ToTaggedArray(thread, exports); in OwnEnumPropertyKeys()
217 if (JSArray::IncludeInSortedValue(thread, exports, key)) { in HasProperty()
247 if (!JSArray::IncludeInSortedValue(thread, exports, key)) { in GetOwnProperty()
288 if (JSArray::IncludeInSortedValue(thread, exports, key)) { in DeleteProperty()

123456