/arkcompiler/ets_runtime/ecmascript/js_api/ |
H A D | js_api_list.cpp | 209 const int fromIndex, const int toIndex) in GetSubList() 217 int32_t size = nodeLength > toIndex ? toIndex : nodeLength; in GetSubList() 225 if (toIndex < 0 || toIndex <= fromIndex || toIndex > nodeLength) { in GetSubList() 227 oss << "The value of \"toIndex\" is out of range. It must be >= 0 && <= " in GetSubList() 228 << nodeLength << ". Received value is: " << toIndex; in GetSubList() local 232 uint32_t len = TaggedSingleList::ELEMENTS_START_INDEX + (toIndex - fromIndex + 1) * TaggedSingleList::ENTRY_SIZE; in GetSubList() 236 TaggedSingleList::GetSubList(thread, singleList, fromIndex, toIndex, subSingleLis in GetSubList() 208 GetSubList(JSThread *thread, const JSHandle<JSAPIList> &list, const int fromIndex, const int toIndex) GetSubList() argument [all...] |
H A D | js_api_plain_array.h | 61 int32_t BinarySearch(TaggedArray *array, int32_t fromIndex, int32_t toIndex, int32_t key); 63 void AdjustArray(JSThread *thread, TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex, 65 void AdjustPrimitiveArray(TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex);
|
H A D | js_api_arraylist.cpp | 238 oss << "The value of \"toIndex\" is out of range. It must be >= 0 && <= " << length in RemoveByRange() 244 int32_t toIndex = endIndex >= length ? length : endIndex; in RemoveByRange() local 248 int32_t numMoved = length - toIndex; in RemoveByRange() 311 int toIndex = JSTaggedValue::ToInt32(thread, value2); in SubArrayList() local 312 int32_t size = length > toIndex ? toIndex : length; in SubArrayList() 324 if (toIndex <= fromIndex || toIndex < 0 || toIndex > length) { in SubArrayList() 326 oss << "The value of \"toIndex\" i in SubArrayList() 327 << ". Received value is: " << toIndex; SubArrayList() local [all...] |
H A D | js_api_vector.cpp | 205 int32_t fromIndex, int32_t toIndex) in RemoveByRange() 208 if (toIndex <= fromIndex) { in RemoveByRange() 209 THROW_RANGE_ERROR_AND_RETURN(thread, "the fromIndex cannot be less than or equal to toIndex", in RemoveByRange() 213 THROW_RANGE_ERROR_AND_RETURN(thread, "the fromIndex or the toIndex is out-of-bounds", in RemoveByRange() 217 int32_t endIndex = toIndex >= length ? length : toIndex; in RemoveByRange() 232 int32_t fromIndex, int32_t toIndex) in SubVector() 235 if (fromIndex < 0 || toIndex < 0 || in SubVector() 236 fromIndex >= length || toIndex >= length) { in SubVector() 237 THROW_RANGE_ERROR_AND_RETURN(thread, "the fromIndex or the toIndex i in SubVector() 204 RemoveByRange(JSThread *thread, const JSHandle<JSAPIVector> &vector, int32_t fromIndex, int32_t toIndex) RemoveByRange() argument 231 SubVector(JSThread *thread, const JSHandle<JSAPIVector> &vector, int32_t fromIndex, int32_t toIndex) SubVector() argument [all...] |
H A D | js_api_plain_array.cpp | 79 void JSAPIPlainArray::AdjustPrimitiveArray(TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex) in AdjustPrimitiveArray() argument 85 ToUintPtr(srcArray->GetData()) + toIndex * JSTaggedValue::TaggedTypeSize()); in AdjustPrimitiveArray() 92 for (uint32_t count = fromIndex - toIndex; count > 0; --count) { in AdjustPrimitiveArray() 99 int32_t toIndex, bool direction) in AdjustArray() 105 while (fromIndex < toIndex) { in AdjustArray() 113 AdjustPrimitiveArray(srcArray, fromIndex, toIndex); in AdjustArray() 117 uint32_t dstIndex = toIndex; in AdjustArray() 123 for (uint32_t count = fromIndex - toIndex; count > 0; --count) { in AdjustArray() 131 int32_t JSAPIPlainArray::BinarySearch(TaggedArray *array, int32_t fromIndex, int32_t toIndex, int32_t key) in BinarySearch() argument 134 int32_t high = toIndex in BinarySearch() 98 AdjustArray(JSThread *thread, TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex, bool direction) AdjustArray() argument [all...] |
H A D | js_api_vector.h | 64 int32_t fromIndex, int32_t toIndex); 67 int32_t fromIndex, int32_t toIndex);
|
H A D | js_api_lightweightset.cpp | 384 uint32_t toIndex, bool direction) 389 while (fromIndex < toIndex) { 400 srcArray->Set(thread, toIndex + i, value); 402 srcArray->Set(thread, toIndex + i, JSTaggedValue::Hole());
|
H A D | js_api_lightweightset.h | 48 void AdjustArray(JSThread *thread, JSHandle<TaggedArray> srcArray, uint32_t fromIndex, uint32_t toIndex,
|
H A D | js_api_list.h | 69 const int fromIndex, const int toIndex);
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_api_arraylist_test.cpp | 372 uint32_t toIndex = 100; in HWTEST_F_L0() local 374 JSHandle<JSTaggedValue> toIndexValue(thread, JSTaggedValue(toIndex)); in HWTEST_F_L0() 380 for (uint32_t i = 0; i < length - (toIndex - formIndex); i++) { in HWTEST_F_L0() 454 uint32_t toIndex = 100; in HWTEST_F_L0() local 456 JSHandle<JSTaggedValue> toIndexValue(thread, JSTaggedValue(toIndex)); in HWTEST_F_L0() 482 // toIndex <= fromIndex in HWTEST_F_L0() 486 // toIndex < 0 in HWTEST_F_L0() 490 // toIndex > length in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/containers/ |
H A D | containers_list.cpp | 575 JSHandle<JSTaggedValue> toIndex = GetCallArg(argv, 1); in GetSubList() local 578 if (toIndex->IsDouble()) { in GetSubList() 579 toIndex = JSHandle<JSTaggedValue>(thread, JSTaggedValue::TryCastDoubleToInt32(toIndex->GetDouble())); in GetSubList() 582 if (!toIndex->IsInt()) { in GetSubList() 583 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, toIndex.GetTaggedValue()); in GetSubList() 586 "The type of \"toIndex\" must be number. Received value is: " + ConvertToString(*result); in GetSubList() 592 JSTaggedValue newList = JSAPIList::GetSubList(thread, jsAPIList, fromIndex->GetInt(), toIndex->GetInt()); in GetSubList()
|
H A D | containers_vector.cpp | 399 JSHandle<JSTaggedValue> toIndex = GetCallArg(argv, 1); in RemoveByRange() local 400 if (!fromIndex->IsNumber() || !toIndex->IsNumber()) { in RemoveByRange() 406 JSTaggedValue::ToInt32(thread, toIndex)); in RemoveByRange() 459 JSHandle<JSTaggedValue> toIndex = GetCallArg(argv, 1); in SubVector() local 460 if (!fromIndex->IsNumber() || !toIndex->IsNumber()) { in SubVector() 465 JSTaggedValue::ToInt32(thread, toIndex)); in SubVector()
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | tagged_list.h | 147 const int fromIndex, const int toIndex, const JSHandle<TaggedSingleList> &subList);
|
H A D | js_stable_array.h | 63 EcmaRuntimeCallInfo *argv, uint32_t &k, uint32_t &toIndex);
|
H A D | tagged_list.cpp | 486 const int fromIndex, const int toIndex, in GetSubList() 499 if (nodeSum == toIndex) { in GetSubList() 519 subList->SetNumberOfNodes(thread, toIndex - fromIndex); in GetSubList() 485 GetSubList(JSThread *thread, const JSHandle<TaggedSingleList> &taggedList, const int fromIndex, const int toIndex, const JSHandle<TaggedSingleList> &subList) GetSubList() argument
|
H A D | js_stable_array.cpp | 1032 EcmaRuntimeCallInfo *argv, uint32_t &k, uint32_t &toIndex) 1066 toIndexHandle.Update(JSTaggedValue(toIndex)); 1069 toIndex++;
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_array.h | 235 JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex,
|
H A D | builtins_shared_array.h | 181 JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex,
|
H A D | builtins_shared_array.cpp | 820 JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex, JSHandle<JSObject> newArrayHandle, in FilterUnStableJSArray() 842 toIndexHandle.Update(JSTaggedValue(toIndex)); in FilterUnStableJSArray() 845 toIndex++; in FilterUnStableJSArray() 910 uint32_t toIndex = 0; in Filter() local 915 JSStableArray::Filter(newArrayHandle, thisObjHandle, argv, k, toIndex); in Filter() 919 FilterUnStableJSArray(thread, thisArgHandle, thisObjVal, k, len, toIndex, newArrayHandle, callbackFnHandle); in Filter() 819 FilterUnStableJSArray(JSThread *thread, JSHandle<JSTaggedValue> &thisArgHandle, JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex, JSHandle<JSObject> newArrayHandle, JSHandle<JSTaggedValue> &callbackFnHandle) FilterUnStableJSArray() argument
|
H A D | builtins_array.cpp | 896 JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex, JSHandle<JSObject> newArrayHandle, in FilterUnStableJSArray() 918 toIndexHandle.Update(JSTaggedValue(toIndex)); in FilterUnStableJSArray() 921 toIndex++; in FilterUnStableJSArray() 982 uint32_t toIndex = 0; in Filter() local 987 JSStableArray::Filter(newArrayHandle, thisObjHandle, argv, k, toIndex); in Filter() 990 return FilterUnStableJSArray(thread, thisArgHandle, thisObjVal, k, len, toIndex, newArrayHandle, callbackFnHandle); in Filter() 895 FilterUnStableJSArray(JSThread *thread, JSHandle<JSTaggedValue> &thisArgHandle, JSHandle<JSTaggedValue> &thisObjVal, int64_t k, int64_t len, uint32_t toIndex, JSHandle<JSObject> newArrayHandle, JSHandle<JSTaggedValue> &callbackFnHandle) FilterUnStableJSArray() argument
|
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
H A D | builtins_array_stub_builder.cpp | 579 DEFVARIABLE(toIndex, VariableType::INT64(), Int64(0)); in Filter() 644 SetValueWithElementsKind(glue, newArray, *kValue, *toIndex, Boolean(true), in Filter() 646 toIndex = Int64Add(*toIndex, Int64(1)); in Filter() 677 CallNGCRuntime(glue, RTSTUB_ID(ArrayTrim), {glue, newArrayEles, *toIndex}); in Filter() 678 Store(VariableType::INT32(), glue, newArray, lengthOffset, TruncInt64ToInt32(*toIndex)); in Filter() 680 IntToTaggedInt(*i), IntToTaggedInt(len), IntToTaggedInt(*toIndex), newArray, callbackFnHandle }); in Filter() 688 BRANCH(Int64LessThan(*toIndex, len), &needTrim, exit); in Filter() 690 CallNGCRuntime(glue, RTSTUB_ID(ArrayTrim), {glue, newArrayEles, *toIndex}); in Filter() 691 Store(VariableType::INT32(), glue, newArray, lengthOffset, TruncInt64ToInt32(*toIndex)); in Filter() 2023 GateRef toIndex = Int32Sub(endIndex, *index); DoReverse() local 2036 SetValueToTaggedArray(VariableType::JS_ANY(), glue, toElements, toIndex, Undefined(), DoReverse() local 2042 SetValueToTaggedArray(VariableType::JS_ANY(), glue, toElements, toIndex, value, mAttr); DoReverse() local [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | typed_native_inline_lowering.cpp | 3343 DEFVALUE(toIndex, (&builder_), VariableType::INT64(), builder_.Int64(0)); in LowerArrayFilter() 3385 *toIndex, in LowerArrayFilter() 3388 toIndex = builder_.Int64Add(*toIndex, builder_.Int64(1)); in LowerArrayFilter() 3405 BRANCH_CIR(builder_.Int64LessThan(*toIndex, length), &needTrim, &quit); in LowerArrayFilter() 3409 glue, RTSTUB_ID(ArrayTrim), Gate::InvalidGateRef, {glue, newArrayEles, *toIndex}, Circuit::NullGate()); in LowerArrayFilter() 3411 builder_.Store(VariableType::INT32(), glue, newArray, lengthOffset, builder_.TruncInt64ToInt32(*toIndex)); in LowerArrayFilter() 3442 DEFVALUE(toIndex, (&builder_), VariableType::INT64(), builder_.Int64(0)); in LowerArrayMap() 3480 *toIndex, in LowerArrayMap() 3483 toIndex in LowerArrayMap() [all...] |
H A D | stub_builder.cpp | 3146 GateRef toIndex = PtrMul(ZExtInt32ToPtr(index), IntPtr(JSTaggedValue::TaggedTypeSize())); in StoreWithTransition() local 3147 SetValueWithRep(glue, base, toIndex, value, rep, &repChange); in StoreWithTransition()
|
/arkcompiler/ets_runtime/ecmascript/stubs/ |
H A D | runtime_stubs.cpp | 509 int32_t toIndex = JSTaggedNumber(JSTaggedValue(toIndexValue)).GetNumber(); in DEF_RUNTIME_STUBS() local 515 toIndex, newArrayHandle, callbackFnHandle); in DEF_RUNTIME_STUBS()
|