| /arkcompiler/ets_runtime/ecmascript/ |
| D | tagged_array.cpp | 166 void TaggedArray::RemoveElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, in RemoveElementByIndex() argument 174 auto *addr = reinterpret_cast<JSTaggedType *>(ToUintPtr(srcArray->GetData()) + offset); in RemoveElementByIndex() 182 srcArray->Set(thread, index, srcArray->Get(index + 1)); in RemoveElementByIndex() 186 srcArray->Set(thread, effectiveLength - 1, JSTaggedValue::Hole()); in RemoveElementByIndex() 189 void TaggedArray::InsertElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, in InsertElementByIndex() argument 193 ASSERT(effectiveLength < srcArray->GetLength()); in InsertElementByIndex() 195 JSTaggedValue oldValue = srcArray->Get(effectiveLength - 1); in InsertElementByIndex() 196 srcArray->Set(thread, effectiveLength, oldValue); in InsertElementByIndex() 199 srcArray->Set(thread, index, value.GetTaggedValue()); in InsertElementByIndex()
|
| D | tagged_array.h | 80 static void RemoveElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray, 82 static void InsertElementByIndex(const JSThread *thread, JSHandle<TaggedArray> &srcArray,
|
| /arkcompiler/ets_runtime/ecmascript/js_api/ |
| D | js_api_plain_array.cpp | 81 void JSAPIPlainArray::AdjustPrimitiveArray(TaggedArray *srcArray, int32_t fromIndex, int32_t toInde… in AdjustPrimitiveArray() argument 85 … ToUintPtr(srcArray->GetData()) + fromIndex * JSTaggedValue::TaggedTypeSize()); in AdjustPrimitiveArray() 87 … ToUintPtr(srcArray->GetData()) + toIndex * JSTaggedValue::TaggedTypeSize()); in AdjustPrimitiveArray() 100 void JSAPIPlainArray::AdjustArray(JSThread *thread, TaggedArray *srcArray, int32_t fromIndex, in AdjustArray() argument 108 JSTaggedValue value = srcArray->Get(idx); in AdjustArray() 109 srcArray->Set(thread, idx + 1, value); in AdjustArray() 114 if (srcArray->IsGeneralNewAndNotMarking(thread)) { in AdjustArray() 115 AdjustPrimitiveArray(srcArray, fromIndex, toIndex); in AdjustArray() 118 … ToUintPtr(srcArray->GetData()) + fromIndex * JSTaggedValue::TaggedTypeSize()); in AdjustArray() 121 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 | 385 void JSAPILightWeightSet::AdjustArray(JSThread *thread, JSHandle<TaggedArray> srcArray, uint32_t fr… in AdjustArray() argument 392 JSTaggedValue value = srcArray->Get(idx); in AdjustArray() 393 srcArray->Set(thread, idx + 1, value); in AdjustArray() 401 JSTaggedValue value = srcArray->Get(fromIndex + i); in AdjustArray() 402 srcArray->Set(thread, toIndex + i, value); in AdjustArray() 404 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…
|
| /arkcompiler/runtime_core/static_core/plugins/ets/runtime/types/ |
| D | ets_string_builder.cpp | 131 coretypes::Array *srcArray = reinterpret_cast<EtsArray *>(obj)->GetCoreType(); in ReconstructStringAsMUtf8() local 132 uint32_t n = srcArray->GetLength(); in ReconstructStringAsMUtf8() 135 dstData[j] = srcArray->GetPrimitive<uint16_t>(sizeof(uint16_t) * j); in ReconstructStringAsMUtf8() 157 coretypes::Array *srcArray = reinterpret_cast<EtsCharArray *>(obj)->GetCoreType(); in ReconstructStringAsUtf16() local 158 auto *srcData = reinterpret_cast<EtsChar *>(srcArray->GetData()); in ReconstructStringAsUtf16() 159 uint32_t n = srcArray->GetLength(); in ReconstructStringAsUtf16()
|
| /arkcompiler/ets_runtime/ecmascript/base/ |
| D | typed_array_helper.cpp | 390 JSHandle<JSTaggedValue> srcArray = BuiltinsBase::GetCallArg(argv, 0); in CreateFromTypedArray() local 391 JSHandle<JSTypedArray> srcObj(srcArray); in CreateFromTypedArray() 442 ContentType srcArrayContentType = JSHandle<JSTypedArray>::Cast(srcArray)->GetContentType(); in CreateFromTypedArray() 506 JSHandle<JSTaggedValue> srcArray) in CheckBufferAndType() argument 519 ContentType srcArrayContentType = JSHandle<JSTypedArray>::Cast(srcArray)->GetContentType(); in CheckBufferAndType() 573 JSHandle<JSTaggedValue> srcArray = BuiltinsBase::GetCallArg(argv, 0); in CreateSharedFromTypedArray() local 574 JSHandle<JSTypedArray> srcObj(srcArray); in CreateSharedFromTypedArray() 575 JSTaggedValue buffer = GetTypedArrayBuffer(argv, srcObj, srcArray->IsSharedTypedArray()); in CreateSharedFromTypedArray() 604 if (arrayType == srcType && srcArray->IsSharedTypedArray()) { in CreateSharedFromTypedArray() 612 … JSTaggedValue checkResult = CheckBufferAndType(srcData.GetTaggedValue(), thread, obj, srcArray); in CreateSharedFromTypedArray()
|
| /arkcompiler/ets_runtime/ecmascript/containers/ |
| D | containers_lightweightset.cpp | 530 JSHandle<TaggedArray> srcArray(thread, lightweightset->GetValues()); in ToArray() local 532 if (srcArray.GetTaggedValue().IsCOWArray()) { in ToArray() 533 array->SetElements(thread, srcArray.GetTaggedValue()); in ToArray() 537 auto newElements = factory->CopyArray(srcArray, srcArray->GetLength(), srcArray->GetLength(), in ToArray()
|
| /arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
| D | builtins_typedarray_stub_builder.cpp | 2216 GateRef srcArray = GetCallArg0(numArgs); in Set() local 2217 BRANCH(IsEcmaObject(srcArray), &srcArrayIsEcmaObj, slowPath); in Set() 2219 BRANCH(IsTypedArray(srcArray), &srcArrayIsTypedArray, slowPath); in Set() 2222 GateRef srcType = GetObjectType(LoadHClass(srcArray)); in Set() 2228 GateRef srcBuffer = GetViewedArrayBuffer(srcArray); in Set() 2232 GateRef srcLen = ZExtInt32ToInt64(GetArrayLength(srcArray)); in Set() 2243 … { glue, srcArray, thisValue, Int32(0), TruncInt64ToInt32(*realOffset), in Set() 2259 … GateRef srcValue = FastGetPropertyByIndex(glue, srcArray, TruncInt64ToInt32(*startIndex), in Set() 2260 GetObjectType(LoadHClass(srcArray))); in Set()
|
| /arkcompiler/ets_runtime/ecmascript/stubs/ |
| D | runtime_stubs.h | 158 …static void CopyTypedArrayBuffer(uintptr_t argGlue, JSTypedArray *srcArray, JSTypedArray *targetAr…
|
| D | runtime_stubs.cpp | 224 void RuntimeStubs::CopyTypedArrayBuffer(uintptr_t argGlue, JSTypedArray *srcArray, JSTypedArray *ta… in CopyTypedArrayBuffer() argument 232 JSType srcType = srcArray->GetClass()->GetObjectType(); in CopyTypedArrayBuffer() 239 JSTaggedValue srcBuffer = srcArray->GetViewedArrayBufferOrByteArray(); in CopyTypedArrayBuffer() 241 uint32_t srcByteIndex = uSrcStartPos * srcElementSize + srcArray->GetByteOffset(); in CopyTypedArrayBuffer() 253 …aggedValue curElement = JSTypedArray::FastGetPropertyByIndex(thread, JSTaggedValue::Cast(srcArray), in CopyTypedArrayBuffer()
|