/arkcompiler/ets_runtime/ecmascript/base/ |
H A D | typed_array_helper.cpp | 156 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); in FastCreateTypedArray() local 158 uint64_t byteLength = static_cast<uint64_t>(elementSize) * length; in FastCreateTypedArray() 199 // 5. Let elementSize be the Element Size value specified in Table 61 for constructorName. in AllocateTypedArrayBuffer() 200 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); in AllocateTypedArrayBuffer() local 201 // 6. Let byteLength be elementSize × length. in AllocateTypedArrayBuffer() 203 uint64_t byteLength = static_cast<uint64_t>(elementSize) * length; in AllocateTypedArrayBuffer() 214 thread->GetEcmaVM()->GetFactory()->NewByteArray(arrayLength, elementSize).GetTaggedValue()); in AllocateTypedArrayBuffer() 255 // 5. Let elementSize be the Element Size value specified in Table 61 for constructorName. in AllocateTypedArrayBuffer() 256 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); in AllocateTypedArrayBuffer() local 257 // 6. Let byteLength be elementSize × lengt in AllocateTypedArrayBuffer() 462 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); CreateFromTypedArray() local 645 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); CreateSharedFromTypedArray() local 719 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); CreateFromArrayBuffer() local 786 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(arrayType); CreateFromSendableArrayBuffer() local [all...] |
H A D | atomic_helper.cpp | 82 // 7. Let elementSize be the Element Size value specified in Table 60 for arrayTypeName. in ValidateAtomicAccess() 86 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(elementType); in ValidateAtomicAccess() local 88 // 9. Return (accessIndex × elementSize) + offset. in ValidateAtomicAccess() 89 ASSERT((static_cast<size_t>(index) * static_cast<size_t>(elementSize) + in ValidateAtomicAccess() 91 uint32_t allOffset = static_cast<uint32_t>(index) * elementSize + offset; in ValidateAtomicAccess()
|
H A D | fast_json_stringifier.h | 65 uint32_t elementSize);
|
H A D | fast_json_stringifier.cpp | 448 CVector<std::pair<CString, int>> &strCache, uint32_t &cacheIndex, uint32_t elementSize) in SerializeElementsWithCache() 463 for (; cacheIndex < elementSize; cacheIndex++) { in SerializeElementsWithCache() 447 SerializeElementsWithCache(const JSHandle<JSObject> &obj, bool hasContent, CVector<std::pair<CString, int>> &strCache, uint32_t &cacheIndex, uint32_t elementSize) SerializeElementsWithCache() argument
|
/arkcompiler/ets_runtime/ecmascript/ |
H A D | js_typed_array.cpp | 428 // 11. Let elementSize be the Number value of the Element Size value specified in Table 49 for in IntegerIndexedElementGet() 430 uint32_t elementSize = TypedArrayHelper::GetElementSize(typedarrayObj); in IntegerIndexedElementGet() local 431 // 12. Let indexedPosition = (index × elementSize) + offset. in IntegerIndexedElementGet() 433 uint32_t byteIndex = k * elementSize + offset; in IntegerIndexedElementGet() 546 // 11. Let elementSize be the Number value of the Element Size value specified in Table 49 for arrayTypeName. in FastCopyElementToArray() 547 uint32_t elementSize = TypedArrayHelper::GetElementSize(typedarrayObj); in FastCopyElementToArray() local 551 // 12. Let indexedPosition = (index × elementSize) + offset. in FastCopyElementToArray() 552 uint32_t byteIndex = index * elementSize + offset; in FastCopyElementToArray() 588 // 11. Let elementSize be the Number value of the Element Size value specified in Table 49 for arrayTypeName. in FastElementGet() 589 uint32_t elementSize in FastElementGet() local 629 uint32_t elementSize = TypedArrayHelper::GetElementSize(typedarrayObj); IntegerIndexedElementSet() local 703 uint32_t elementSize = TypedArrayHelper::GetElementSize(jsType); FastGetPropertyByIndex() local 740 uint32_t elementSize = TypedArrayHelper::GetElementSize(jsType); FastSetPropertyByIndex() local 836 uint32_t elementSize = TypedArrayHelper::GetElementSize(jsType); FastTypedArrayFill() local [all...] |
/arkcompiler/runtime_core/static_core/runtime/mem/ |
H A D | object_helpers-inl.h | 120 auto elementSize = coretypes::Array::GetElementSize<ObjectHeader *, false>(); in TraverseArray() 124 for (ArraySizeT i = p - arrayStart; p < end; ++p, ++i, offset += elementSize) { in TraverseArray() 235 auto elementSize = coretypes::Array::GetElementSize<TaggedType, true>(); in TraverseArray() 238 for (ArraySizeT i = p - arrayStart; p < end; ++p, ++i, offset += elementSize) { in TraverseArray()
|
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/src/cg/aarch64/ |
H A D | aarch64_obj_emitter.cpp | 1603 uint32 elementSize = size; 1604 while (elementSize > k2ByteSize) { 1605 elementSize >>= 1; 1606 uint64 mask = (1ULL << elementSize) - 1; 1607 if ((imm & mask) != ((imm >> elementSize) & mask)) { 1608 elementSize <<= 1; 1613 if (elementSize != k64BitSize) { 1614 imm &= ((1ULL << elementSize) - 1); 1618 for (uint32 i = 1; i < elementSize; ++i) { 1631 immr = elementSize [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_dataview.cpp | 392 // 12. Let elementSize be the Number value of the Element Size value specified in Table 49 for Element Type type. in GetViewValue() 393 uint32_t elementSize = JSDataView::GetElementSize(type); in GetViewValue() local 394 // 13. If getIndex +elementSize > viewSize, throw a RangeError exception. in GetViewValue() 395 if (index + elementSize > size) { in GetViewValue() 396 THROW_RANGE_ERROR_AND_RETURN(thread, "getIndex +elementSize > viewSize", JSTaggedValue::Exception()); in GetViewValue() 457 // 12. Let elementSize be the Number value of the Element Size value specified in Table 49 for Element Type type. in SetViewValue() 458 uint32_t elementSize = JSDataView::GetElementSize(type); in SetViewValue() local 459 // 13. If getIndex +elementSize > viewSize, throw a RangeError exception. in SetViewValue() 460 if (static_cast<uint32_t>(index) + elementSize > size) { in SetViewValue() 461 THROW_RANGE_ERROR_AND_RETURN(thread, "getIndex +elementSize > viewSiz in SetViewValue() [all...] |
H A D | builtins_shared_typedarray.cpp | 1402 // d. Let elementSize be the Number value of the Element Size value specified in Table 49 for srcType. in Slice() 1403 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(srcType); in Slice() local 1408 // h. Let srcByteIndex be (k × elementSize) + srcByteOffset. in Slice() 1409 uint32_t srcByteIndex = k * elementSize + srcByteOffset; in Slice() 1412 // i. Repeat, while targetByteIndex < count × elementSize in Slice() 1422 targetBuf, elementSize * count, srcBuf, elementSize * count) != EOK) { in Slice() 1428 if (memcpy_s(targetBuf, elementSize, srcBuf, elementSize) != EOK) { in Slice() 1432 srcBuf += elementSize; in Slice() 1594 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(elementType); Subarray() local [all...] |
H A D | builtins_typedarray.cpp | 1518 // d. Let elementSize be the Number value of the Element Size value specified in Table 49 for srcType. in Slice() 1519 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(srcType); in Slice() local 1524 // h. Let srcByteIndex be (k × elementSize) + srcByteOffset. in Slice() 1525 uint32_t srcByteIndex = k * elementSize + srcByteOffset; in Slice() 1528 // i. Repeat, while targetByteIndex < count × elementSize in Slice() 1536 targetBuf, elementSize * count, srcBuf, elementSize * count) != EOK) { in Slice() 1542 if (memcpy_s(targetBuf, elementSize, srcBuf, elementSize) != EOK) { in Slice() 1546 srcBuf += elementSize; in Slice() 1748 uint32_t elementSize = TypedArrayHelper::GetSizeFromType(elementType); Subarray() local [all...] |
H A D | builtins_arraybuffer.cpp | 808 uint32_t elementSize = TypedArrayHelper::GetElementSize(items); in TypedArrayToList() local 812 uint32_t byteIndex = index * elementSize + offset; in TypedArrayToList()
|
/arkcompiler/runtime_core/static_core/libpandabase/mem/ |
H A D | mmap_mem_pool-inl.h | 46 auto elementSize = element->first; in PopFreePool() local 47 ASSERT(elementSize == mmapPool->GetSize()); in PopFreePool() 57 if (size < elementSize) { in PopFreePool() 58 Pool newPool(elementSize - size, ToVoidPtr(ToUintPtr(elementMem) + size)); in PopFreePool()
|
/arkcompiler/ets_runtime/ecmascript/compiler/builtins/ |
H A D | builtins_dataview_stub_builder.cpp | 74 GateRef elementSize = GetElementSize(type);
in SetTypedValue() local 75 BRANCH(Int32GreaterThan(Int32Add(index, elementSize), size), slowPath, &setValue);
in SetTypedValue()
|
H A D | builtins_typedarray_stub_builder.cpp | 1712 GateRef elementSize = Int32Div(oldByteLength, arrayLen);
in SubArray() local 1714 *result = newBuilder.NewTaggedSubArray(glue, thisValue, elementSize, *newLength, *beginIndex, objHclass, buffer);
in SubArray() 3270 GateRef elementSize = Int32(base::TypedArrayHelper::GetSizeFromType(arrayType));
in AllocateTypedArrayBuffer() local 3271 GateRef byteLength = Int64Mul(ZExtInt32ToInt64(elementSize), ZExtInt32ToInt64(length));
in AllocateTypedArrayBuffer() 3278 newObjectStubBuilder.NewByteArray(&data, &newByteArrayExit, elementSize, length);
in AllocateTypedArrayBuffer() 3329 GateRef elementSize = Int32(base::TypedArrayHelper::GetSizeFromType(arrayType));
in CreateFromArrayBuffer() local 3335 BRANCH(Int32Equal(Int32Mod(offset, elementSize), Int32(0)), &next, slowPath);
in CreateFromArrayBuffer() 3355 newByteLength = Int64Mul(ZExtInt32ToInt64(newLength), ZExtInt32ToInt64(elementSize));
in CreateFromArrayBuffer() 3365 BRANCH(Int32Equal(Int32Mod(bufferByteLength, elementSize), Int32(0)), &next1, slowPath);
in CreateFromArrayBuffer() 3378 offset, TruncInt64ToInt32(Int64Div(*newByteLength, ZExtInt32ToInt64(elementSize))));
in CreateFromArrayBuffer() [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | new_object_stub_builder.h | 127 GateRef NewTaggedSubArray(GateRef glue, GateRef srcTypedArray, GateRef elementSize, GateRef newLength,
134 void NewByteArray(Variable *result, Label *exit, GateRef elementSize, GateRef length);
|
H A D | new_object_stub_builder.cpp | 2144 GateRef elementSize, GateRef newLength, GateRef beginIndex, GateRef arrayCls, GateRef buffer)
in NewTaggedSubArray() 2154 GateRef beginByteOffset = Int32Add(srcByteOffset, Int32Mul(beginIndex, elementSize));
in NewTaggedSubArray() 2158 GateRef newByteLength = Int32Mul(elementSize, newLength);
in NewTaggedSubArray() 2205 GateRef elementSize = GetElementSizeFromType(glue, srcType);
in NewTypedArray() local 2206 GateRef newByteLength = Int32Mul(elementSize, length);
in NewTypedArray() 2218 NewByteArray(&buffer, &newByteArrayExit, elementSize, length);
in NewTypedArray() 2334 GateRef elementSize = Int32(4); // 4: float32 primtype's byte length
in NewFloat32ArrayWithSize() local 2335 GateRef newByteLength = Int32Mul(size, elementSize);
in NewFloat32ArrayWithSize() 2339 NewByteArray(&buffer, &newByteArrayExit, elementSize, size);
in NewFloat32ArrayWithSize() 2387 GateRef elementSize in NewTypedArrayFromCtor() local 2143 NewTaggedSubArray(GateRef glue, GateRef srcTypedArray, GateRef elementSize, GateRef newLength, GateRef beginIndex, GateRef arrayCls, GateRef buffer) NewTaggedSubArray() argument 2403 NewByteArray(Variable *result, Label *exit, GateRef elementSize, GateRef length) NewByteArray() argument 2423 Store(VariableType::INT32(), glue_, result->ReadVariable(), IntPtr(ByteArray::BYTE_LENGTH_OFFSET), elementSize); NewByteArray() local [all...] |
H A D | typed_hcr_lowering.cpp | 969 GateRef elementSize = Circuit::NullGate(); in GetElementSize() local 974 elementSize = builder_.Int32(sizeof(uint8_t)); in GetElementSize() 978 elementSize = builder_.Int32(sizeof(uint16_t)); in GetElementSize() 983 elementSize = builder_.Int32(sizeof(uint32_t)); in GetElementSize() 986 elementSize = builder_.Int32(sizeof(double)); in GetElementSize() 992 return elementSize; in GetElementSize() 1123 GateRef elementSize = GetElementSize(id); in LowerTypedArrayLoadElement() local 1124 GateRef offset = builder_.PtrMul(index, elementSize); in LowerTypedArrayLoadElement() 1312 GateRef elementSize = GetElementSize(id); in LowerTypedArrayStoreElement() local 1313 GateRef offset = builder_.PtrMul(index, elementSize); in LowerTypedArrayStoreElement() 1414 GateRef elementSize = builder_.Int32(sizeof(uint8_t)); LowerUInt8ClampedArrayStoreElement() local [all...] |
H A D | stub_builder-inl.h | 3802 inline GateRef StubBuilder::ComputeTaggedTypedArraySize(GateRef elementSize, GateRef length) in ComputeTaggedTypedArraySize() argument 3804 return PtrAdd(IntPtr(ByteArray::DATA_OFFSET), PtrMul(elementSize, length)); in ComputeTaggedTypedArraySize()
|
H A D | stub_builder.h | 1005 inline GateRef ComputeTaggedTypedArraySize(GateRef elementSize, GateRef length);
|
H A D | typed_native_inline_lowering.cpp | 1369 GateRef elementSize = BuiltinIdToSize(builtinId); in LowerDataViewProtoFunc() local 1370 GateRef totalSize = builder_.Int32Add(requestIndex, elementSize); in LowerDataViewProtoFunc()
|
/arkcompiler/runtime_core/static_core/compiler/optimizer/code_generator/ |
H A D | codegen.cpp | 2214 static void GetEntryPointId(uint64_t elementSize, RuntimeInterface::EntrypointId &eid) in GetEntryPointId() argument 2216 switch (elementSize) { in GetEntryPointId() 2257 uint64_t elementSize = runtime->GetArrayElementSize(method, arrayType); in VisitNewArray() local 2261 arraySize = lenInst->CastToConstant()->GetIntValue() * elementSize + classArraySize; in VisitNewArray() 2273 GetEntryPointId(elementSize, eid); in VisitNewArray()
|
/arkcompiler/ets_runtime/ecmascript/stubs/ |
H A D | runtime_stubs.h | 160 int32_t tarStartPos, int32_t count, int32_t elementSize);
|
H A D | runtime_stubs.cpp | 275 int32_t tarStartPos, int32_t count, int32_t elementSize) in CopyTypedArrayBuffer() 283 uint32_t srcByteIndex = static_cast<uint32_t>(srcStartPos * elementSize + srcArray->GetByteOffset()); in CopyTypedArrayBuffer() 284 uint32_t targetByteIndex = static_cast<uint32_t>(tarStartPos * elementSize + targetArray->GetByteOffset()); in CopyTypedArrayBuffer() 288 if (memmove_s(targetBuf, elementSize * count, srcBuf, elementSize * count) != EOK) { in CopyTypedArrayBuffer() 274 CopyTypedArrayBuffer(JSTypedArray *srcArray, JSTypedArray *targetArray, int32_t srcStartPos, int32_t tarStartPos, int32_t count, int32_t elementSize) CopyTypedArrayBuffer() argument
|
/arkcompiler/runtime_core/static_core/libllvmbackend/lowering/ |
H A D | llvm_ir_constructor.cpp | 323 static RuntimeInterface::EntrypointId GetAllocateArrayTlabEntrypoint(size_t elementSize) in GetAllocateArrayTlabEntrypoint() argument 325 switch (elementSize) { in GetAllocateArrayTlabEntrypoint() 4149 uint64_t elementSize = runtime->GetArrayElementSize(method, arrayType); in VisitNewArray() local 4155 arraySize = lenInst->CastToConstant()->GetIntValue() * elementSize + classArraySize; in VisitNewArray() 4163 auto eid = GetAllocateArrayTlabEntrypoint(elementSize); in VisitNewArray()
|