| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | barrier_test.cpp | 30 JSHandle<TaggedArray> srcArray = factory->NewTaggedArray(arrayLength); in HWTEST_F_L0() local 34 srcArray->Set(thread, i, newFun); in HWTEST_F_L0() 47 JSTaggedValue* from = reinterpret_cast<JSTaggedValue*>(ToUintPtr(srcArray->GetData())); in HWTEST_F_L0() 58 EXPECT_EQ(dstArray->Get(thread, i), srcArray->Get(thread, i)); in HWTEST_F_L0() 66 JSHandle<TaggedArray> srcArray = factory->NewTaggedArray(arrayLength); in HWTEST_F_L0() local 68 srcArray->Set(thread, i, JSTaggedValue(i)); in HWTEST_F_L0() 81 JSTaggedValue* from = reinterpret_cast<JSTaggedValue*>(ToUintPtr(srcArray->GetData())); in HWTEST_F_L0() 91 EXPECT_EQ(dstArray->Get(thread, i), srcArray->Get(thread, i)); in HWTEST_F_L0() 96 JSTaggedValue* from2 = reinterpret_cast<JSTaggedValue*>(ToUintPtr(srcArray->GetData())); in HWTEST_F_L0() 101 EXPECT_EQ(dstArray2->Get(thread, i), srcArray->Get(thread, i)); in HWTEST_F_L0() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/ |
| D | escompat_TypedArrays.cpp | 111 static void EtsEscompatTypedArraySetValuesImpl(T *thisArray, T *srcArray, EtsInt pos) in EtsEscompatTypedArraySetValuesImpl() argument 117 auto *srcData = GetNativeData(srcArray); in EtsEscompatTypedArraySetValuesImpl() 123 if (UNLIKELY(pos < 0 || pos + srcArray->GetLengthInt() > thisArray->GetLengthInt())) { in EtsEscompatTypedArraySetValuesImpl() 129 auto *src = ToVoidPtr(ToUintPtr(srcData) + srcArray->GetByteOffset()); in EtsEscompatTypedArraySetValuesImpl() 131 srcArray->GetLengthInt() * sizeof(ElementType)); in EtsEscompatTypedArraySetValuesImpl() 136 ark::ets::EtsEscompatInt8Array *srcArray) in EtsEscompatInt8ArraySetValues() argument 138 EtsEscompatTypedArraySetValuesImpl(thisArray, srcArray, 0); in EtsEscompatInt8ArraySetValues() 142 … ark::ets::EtsEscompatInt8Array *srcArray, EtsDouble pos) in EtsEscompatInt8ArraySetValuesWithOffset() argument 144 EtsEscompatTypedArraySetValuesImpl(thisArray, srcArray, static_cast<EtsInt>(pos)); in EtsEscompatInt8ArraySetValuesWithOffset() 189 ark::ets::EtsEscompatInt16Array *srcArray) in EtsEscompatInt16ArraySetValues() argument [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | tagged_array.cpp | 150 void TaggedArray::RemoveElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, in RemoveElementByIndex() argument 158 auto *addr = reinterpret_cast<JSTaggedType *>(ToUintPtr(srcArray->GetData()) + offset); in RemoveElementByIndex() 166 srcArray->Set(thread, index, srcArray->Get(thread, index + 1)); in RemoveElementByIndex() 170 srcArray->Set(thread, effectiveLength - 1, JSTaggedValue::Hole()); in RemoveElementByIndex() 173 void TaggedArray::InsertElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, in InsertElementByIndex() argument 177 ASSERT(effectiveLength < srcArray->GetLength()); in InsertElementByIndex() 179 JSTaggedValue oldValue = srcArray->Get(thread, effectiveLength - 1); in InsertElementByIndex() 180 srcArray->Set(thread, effectiveLength, oldValue); in InsertElementByIndex() 183 srcArray->Set(thread, index, value.GetTaggedValue()); in InsertElementByIndex()
|
| D | tagged_array-inl.h | 60 const TaggedArray* srcArray, uint32_t count) in Copy() argument 64 …ASSERT((srcStart + count <= srcArray->GetLength()) && "TaggedArray::Copy src count is out of range… in Copy() 67 …JSTaggedValue* from = reinterpret_cast<JSTaggedValue*>(ToUintPtr(srcArray->GetData()) + taggedType… in Copy()
|
| D | tagged_array.h | 68 const TaggedArray *srcArray, uint32_t count); 109 static void RemoveElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, 111 static void InsertElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray,
|
| /arkcompiler/ets_runtime/ecmascript/js_api/ |
| D | js_api_plain_array.cpp | 79 void JSAPIPlainArray::AdjustPrimitiveArray(TaggedArray *srcArray, int32_t fromIndex, int32_t toInde… in AdjustPrimitiveArray() argument 83 … ToUintPtr(srcArray->GetData()) + fromIndex * JSTaggedValue::TaggedTypeSize()); in AdjustPrimitiveArray() 85 … ToUintPtr(srcArray->GetData()) + toIndex * JSTaggedValue::TaggedTypeSize()); in AdjustPrimitiveArray() 98 void JSAPIPlainArray::AdjustArray(JSThread *thread, TaggedArray *srcArray, int32_t fromIndex, in AdjustArray() argument 106 JSTaggedValue value = srcArray->Get(thread, idx); in AdjustArray() 107 srcArray->Set(thread, idx + 1, value); in AdjustArray() 112 if (srcArray->IsYoungAndNotMarking(thread)) { in AdjustArray() 113 AdjustPrimitiveArray(srcArray, fromIndex, toIndex); in AdjustArray() 116 … ToUintPtr(srcArray->GetData()) + fromIndex * JSTaggedValue::TaggedTypeSize()); in AdjustArray() 119 srcArray->Set(thread, dstIndex, JSTaggedValue(*srcPtr)); in AdjustArray() [all …]
|
| D | js_api_plain_array.h | 63 void AdjustArray(JSThread *thread, TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex, 65 void AdjustPrimitiveArray(TaggedArray *srcArray, int32_t fromIndex, int32_t toIndex);
|
| D | js_api_lightweightset.cpp | 384 void JSAPILightWeightSet::AdjustArray(JSThread *thread, JSHandle<TaggedArray> srcArray, uint32_t fr… in AdjustArray() argument 391 JSTaggedValue value = srcArray->Get(thread, idx); in AdjustArray() 392 srcArray->Set(thread, idx + 1, value); in AdjustArray() 400 JSTaggedValue value = srcArray->Get(thread, fromIndex + i); in AdjustArray() 401 srcArray->Set(thread, toIndex + i, value); in AdjustArray() 403 srcArray->Set(thread, toIndex + i, JSTaggedValue::Hole()); in AdjustArray()
|
| D | js_api_lightweightset.h | 48 …void AdjustArray(JSThread *thread, JSHandle<TaggedArray> srcArray, uint32_t fromIndex, uint32_t to…
|
| D | js_api_buffer.cpp | 920 auto srcArray = GetUInt8ArrayFromBufferObject(thread, srcObj); in WriteBufferObjectLoop() local 921 uint32_t length = srcArray->GetByteLength(); in WriteBufferObjectLoop()
|
| /arkcompiler/ets_runtime/ecmascript/base/ |
| D | typed_array_helper.cpp | 439 JSHandle<JSTaggedValue> srcArray = BuiltinsBase::GetCallArg(argv, 0); in CreateFromTypedArray() local 440 JSHandle<JSTypedArray> srcObj(srcArray); in CreateFromTypedArray() 491 ContentType srcArrayContentType = JSHandle<JSTypedArray>::Cast(srcArray)->GetContentType(); in CreateFromTypedArray() 555 JSHandle<JSTaggedValue> srcArray) in CheckBufferAndType() argument 568 ContentType srcArrayContentType = JSHandle<JSTypedArray>::Cast(srcArray)->GetContentType(); in CheckBufferAndType() 622 JSHandle<JSTaggedValue> srcArray = BuiltinsBase::GetCallArg(argv, 0); in CreateSharedFromTypedArray() local 623 JSHandle<JSTypedArray> srcObj(srcArray); in CreateSharedFromTypedArray() 624 JSTaggedValue buffer = GetTypedArrayBuffer(argv, srcObj, srcArray->IsSharedTypedArray()); in CreateSharedFromTypedArray() 653 if (arrayType == srcType && srcArray->IsSharedTypedArray()) { in CreateSharedFromTypedArray() 661 … JSTaggedValue checkResult = CheckBufferAndType(srcData.GetTaggedValue(), thread, obj, srcArray); in CreateSharedFromTypedArray()
|
| /arkcompiler/runtime_core/static_core/plugins/ets/runtime/types/ |
| D | ets_string_builder.cpp | 140 coretypes::Array *srcArray = coretypes::Array::Cast(obj->GetCoreType()); in ReconstructStringAsMUtf8() local 141 uint32_t n = srcArray->GetLength(); in ReconstructStringAsMUtf8() 144 dstData[j] = srcArray->GetPrimitive<uint16_t>(sizeof(uint16_t) * j); in ReconstructStringAsMUtf8() 166 coretypes::Array *srcArray = coretypes::Array::Cast(obj->GetCoreType()); in ReconstructStringAsUtf16() local 167 auto *srcData = reinterpret_cast<EtsChar *>(srcArray->GetData()); in ReconstructStringAsUtf16() 168 uint32_t n = srcArray->GetLength(); in ReconstructStringAsUtf16()
|
| /arkcompiler/ets_runtime/ecmascript/containers/ |
| D | containers_lightweightset.cpp | 531 JSHandle<TaggedArray> srcArray(thread, lightweightset->GetValues(thread)); in ToArray() local 533 if (srcArray.GetTaggedValue().IsCOWArray()) { in ToArray() 534 array->SetElements(thread, srcArray.GetTaggedValue()); in ToArray() 538 auto newElements = factory->CopyArray(srcArray, srcArray->GetLength(), srcArray->GetLength(), in ToArray()
|
| /arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
| D | builtins_typedarray_stub_builder.cpp | 2198 GateRef srcArray = GetCallArg0(numArgs); in Set() local 2199 BRANCH(IsEcmaObject(glue, srcArray), &srcArrayIsEcmaObj, slowPath); in Set() 2201 BRANCH(IsTypedArray(glue, srcArray), &srcArrayIsTypedArray, slowPath); in Set() 2204 GateRef srcType = GetObjectType(LoadHClass(glue, srcArray)); in Set() 2210 GateRef srcBuffer = GetViewedArrayBuffer(glue, srcArray); in Set() 2214 GateRef srcLen = ZExtInt32ToInt64(GetArrayLength(srcArray)); in Set() 2225 … { glue, srcArray, thisValue, Int32(0), TruncInt64ToInt32(*realOffset), in Set() 2241 … GateRef srcValue = FastGetPropertyByIndex(glue, srcArray, TruncInt64ToInt32(*startIndex), in Set() 2242 GetObjectType(LoadHClass(glue, srcArray))); in Set()
|
| /arkcompiler/ets_runtime/ecmascript/stubs/ |
| D | runtime_stubs.h | 164 …static void CopyTypedArrayBuffer(uintptr_t argGlue, JSTypedArray *srcArray, JSTypedArray *targetAr…
|
| D | runtime_stubs.cpp | 279 void RuntimeStubs::CopyTypedArrayBuffer(uintptr_t argGlue, JSTypedArray *srcArray, JSTypedArray *ta… in CopyTypedArrayBuffer() argument 287 JSType srcType = srcArray->GetClass()->GetObjectType(); in CopyTypedArrayBuffer() 295 JSTaggedValue srcBuffer = srcArray->GetViewedArrayBufferOrByteArray(thread); in CopyTypedArrayBuffer() 297 uint32_t srcByteIndex = uSrcStartPos * srcElementSize + srcArray->GetByteOffset(); in CopyTypedArrayBuffer() 310 …aggedValue curElement = JSTypedArray::FastGetPropertyByIndex(thread, JSTaggedValue::Cast(srcArray), in CopyTypedArrayBuffer()
|