Home
last modified time | relevance | path

Searched refs:DataViewType (Results 1 – 25 of 34) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/base/
Dtyped_array_helper-inl.h36 DataViewType TypedArrayHelper::GetType(const JSHandle<JSTypedArray> &obj) in GetType()
42 DataViewType TypedArrayHelper::GetType(JSType type) in GetType()
46 return DataViewType::INT8; in GetType()
48 return DataViewType::UINT8; in GetType()
50 return DataViewType::UINT8_CLAMPED; in GetType()
52 return DataViewType::INT16; in GetType()
54 return DataViewType::UINT16; in GetType()
56 return DataViewType::INT32; in GetType()
58 return DataViewType::UINT32; in GetType()
60 return DataViewType::FLOAT32; in GetType()
[all …]
Dtyped_array_helper.h31 const DataViewType arrayType);
35 const DataViewType arrayType);
39 const DataViewType arrayType);
47 inline static DataViewType GetType(const JSHandle<JSTypedArray> &obj);
48 inline static DataViewType GetType(JSType type);
53 const DataViewType arrayType);
54 inline static uint32_t GetSizeFromType(const DataViewType arrayType);
61 const DataViewType arrayType);
63 const DataViewType arrayType);
65 const DataViewType arrayType);
[all …]
Datomic_helper.cpp35 DataViewType type = JSTypedArray::GetTypeFromName(thread, typeName); in ValidateIntegerTypedArray()
43 if (!(type == DataViewType::INT32 || type == DataViewType::BIGINT64)) { in ValidateIntegerTypedArray()
85 DataViewType elementType = JSTypedArray::GetTypeFromName(thread, arrayTypeName); in ValidateAtomicAccess()
105 DataViewType type = JSTypedArray::GetTypeFromName(thread, arrayTypeName); in AtomicStore()
107 if (type == DataViewType::BIGUINT64 || type == DataViewType::BIGINT64) { in AtomicStore()
138 DataViewType elementType = JSTypedArray::GetTypeFromName(thread, arrayTypeName); in AtomicLoad()
Dtyped_array_helper.cpp43 const DataViewType arrayType) in TypedArrayConstructor()
87 const DataViewType arrayType) in FastCopyElementFromArray()
111 const DataViewType arrayType) in CreateFromOrdinaryObject()
204 const DataViewType arrayType) in CreateFromTypedArray()
228 DataViewType srcType = JSTypedArray::GetTypeFromName(thread, srcName); in CreateFromTypedArray()
307 const DataViewType arrayType) in CreateFromArrayBuffer()
380 const DataViewType arrayType) in AllocateTypedArray()
394 if (arrayType == DataViewType::BIGINT64 || in AllocateTypedArray()
395 arrayType == DataViewType::BIGUINT64) { in AllocateTypedArray()
417 const DataViewType arrayType) in AllocateTypedArray()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Djs_dataview.cpp21 uint32_t JSDataView::GetElementSize(DataViewType type) in GetElementSize()
25 case DataViewType::INT8: in GetElementSize()
26 case DataViewType::UINT8: in GetElementSize()
27 case DataViewType::UINT8_CLAMPED: in GetElementSize()
30 case DataViewType::INT16: in GetElementSize()
31 case DataViewType::UINT16: in GetElementSize()
34 case DataViewType::INT32: in GetElementSize()
35 case DataViewType::UINT32: in GetElementSize()
36 case DataViewType::FLOAT32: in GetElementSize()
39 case DataViewType::FLOAT64: in GetElementSize()
[all …]
Djs_typed_array.cpp415 DataViewType elementType = TypedArrayHelper::GetType(typedarrayObj); in IntegerIndexedElementGet()
450 DataViewType JSTypedArray::GetTypeFromName(JSThread *thread, const JSHandle<JSTaggedValue> &typeNam… in GetTypeFromName()
454 return DataViewType::FLOAT32; in GetTypeFromName()
457 return DataViewType::INT8; in GetTypeFromName()
460 return DataViewType::UINT8; in GetTypeFromName()
463 return DataViewType::UINT8_CLAMPED; in GetTypeFromName()
466 return DataViewType::INT16; in GetTypeFromName()
469 return DataViewType::UINT16; in GetTypeFromName()
472 return DataViewType::INT32; in GetTypeFromName()
475 return DataViewType::UINT32; in GetTypeFromName()
[all …]
Dbyte_array.cpp22 void ByteArray::Set(JSThread* thread, uint32_t idx, DataViewType type, JSTaggedType val, uint32_t o… in Set()
30 JSTaggedValue ByteArray::Get(JSThread *thread, uint32_t idx, DataViewType type, uint32_t offset) in Get()
Djs_dataview.h26 enum class DataViewType : uint8_t { enum
34 static uint32_t GetElementSize(DataViewType type);
Dbyte_array.h43 …void Set(JSThread* thread, uint32_t idx, DataViewType type, JSTaggedType val, uint32_t offset = 0);
44 JSTaggedValue Get(JSThread *thread, uint32_t idx, DataViewType type, uint32_t offset = 0);
Djs_serializer.cpp392 bool JSSerializer::WriteByteArray(const JSHandle<JSTaggedValue> &value, DataViewType viewType) in WriteByteArray()
416 uint32_t JSSerializer::GetDataViewTypeIndex(const DataViewType viewType) in GetDataViewTypeIndex()
420 case DataViewType::INT8: in GetDataViewTypeIndex()
423 case DataViewType::UINT8: in GetDataViewTypeIndex()
426 case DataViewType::UINT8_CLAMPED: in GetDataViewTypeIndex()
429 case DataViewType::INT16: in GetDataViewTypeIndex()
432 case DataViewType::UINT16: in GetDataViewTypeIndex()
435 case DataViewType::INT32: in GetDataViewTypeIndex()
438 case DataViewType::UINT32: in GetDataViewTypeIndex()
441 case DataViewType::FLOAT32: in GetDataViewTypeIndex()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/tests/
Dtyped_array_helper_test.cpp52 … *CreateTypedArrayCallInfo(JSThread *thread, const JSHandle<TaggedArray> &array, DataViewType type) in CreateTypedArrayCallInfo()
59 case DataViewType::BIGINT64: { in CreateTypedArrayCallInfo()
63 case DataViewType::BIGUINT64: { in CreateTypedArrayCallInfo()
67 case DataViewType::FLOAT32: { in CreateTypedArrayCallInfo()
71 case DataViewType::FLOAT64: { in CreateTypedArrayCallInfo()
75 case DataViewType::INT16: { in CreateTypedArrayCallInfo()
79 case DataViewType::INT32: { in CreateTypedArrayCallInfo()
83 case DataViewType::INT8: { in CreateTypedArrayCallInfo()
87 case DataViewType::UINT16: { in CreateTypedArrayCallInfo()
91 case DataViewType::UINT32: { in CreateTypedArrayCallInfo()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_dataview.cpp196 return GetTypedValue(argv, DataViewType::FLOAT32); in GetFloat32()
204 return GetTypedValue(argv, DataViewType::FLOAT64); in GetFloat64()
212 return GetTypedValue(argv, DataViewType::INT8); in GetInt8()
220 return GetTypedValue(argv, DataViewType::INT16); in GetInt16()
228 return GetTypedValue(argv, DataViewType::INT32); in GetInt32()
236 return GetTypedValue(argv, DataViewType::UINT8); in GetUint8()
244 return GetTypedValue(argv, DataViewType::UINT16); in GetUint16()
252 return GetTypedValue(argv, DataViewType::UINT32); in GetUint32()
259 return GetTypedValue(argv, DataViewType::BIGINT64); in GetBigInt64()
266 return GetTypedValue(argv, DataViewType::BIGUINT64); in GetBigUint64()
[all …]
Dbuiltins_arraybuffer.cpp319 DataViewType type, bool littleEndian) in GetValueFromBuffer()
327 DataViewType type, bool littleEndian) in GetValueFromBuffer()
330 case DataViewType::UINT8: in GetValueFromBuffer()
331 case DataViewType::UINT8_CLAMPED: { in GetValueFromBuffer()
335 case DataViewType::INT8: { in GetValueFromBuffer()
340 case DataViewType::UINT16: in GetValueFromBuffer()
342 case DataViewType::INT16: in GetValueFromBuffer()
344 case DataViewType::UINT32: in GetValueFromBuffer()
346 case DataViewType::INT32: in GetValueFromBuffer()
348 case DataViewType::FLOAT32: in GetValueFromBuffer()
[all …]
Dbuiltins_arraybuffer.h30 using DataViewType = ecmascript::DataViewType; variable
59 DataViewType type, bool littleEndian);
62DataViewType type, const JSHandle<JSTaggedValue> &value, bool littleEndian);
70 static bool IsUnclampedIntegerElementType(DataViewType type);
72 static bool IsBigIntElementType(DataViewType type);
75 DataViewType type, double val, bool littleEndian);
77 DataViewType type, double val, bool littleEndian);
79 DataViewType type, bool littleEndian);
Dbuiltins_dataview.h23 using DataViewType = ecmascript::DataViewType; variable
80 DataViewType type);
84 DataViewType type, const JSHandle<JSTaggedValue> &value);
86 static JSTaggedValue GetTypedValue(EcmaRuntimeCallInfo *argv, DataViewType type);
87 static JSTaggedValue SetTypedValue(EcmaRuntimeCallInfo *argv, DataViewType type);
Dbuiltins_atomics.cpp301 DataViewType elementType = JSTypedArray::GetTypeFromName(thread, arrayTypeName); in AtomicReadModifyWrite()
308DataViewType type, uint32_t indexedPosition, in AtomicReadModifyWriteCase()
316 case DataViewType::UINT8: in AtomicReadModifyWriteCase()
318 case DataViewType::INT8: in AtomicReadModifyWriteCase()
320 case DataViewType::UINT16: in AtomicReadModifyWriteCase()
322 case DataViewType::INT16: in AtomicReadModifyWriteCase()
324 case DataViewType::UINT32: in AtomicReadModifyWriteCase()
326 case DataViewType::INT32: in AtomicReadModifyWriteCase()
328 case DataViewType::BIGINT64: in AtomicReadModifyWriteCase()
330 case DataViewType::BIGUINT64: in AtomicReadModifyWriteCase()
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_dataview_test.cpp60 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::INT8), 1U); in HWTEST_F_L0()
61 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::UINT8), 1U); in HWTEST_F_L0()
62 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::UINT8_CLAMPED), 1U); in HWTEST_F_L0()
63 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::INT16), 2U); in HWTEST_F_L0()
64 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::UINT16), 2U); in HWTEST_F_L0()
65 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::INT32), 4U); in HWTEST_F_L0()
66 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::UINT32), 4U); in HWTEST_F_L0()
67 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::FLOAT32), 4U); in HWTEST_F_L0()
68 EXPECT_EQ(JSDataView::GetElementSize(DataViewType::FLOAT64), 8U); in HWTEST_F_L0()
Dbyte_array_test.cpp81 byteArray->Set(thread, 1, DataViewType::UINT32, val, 2); in HWTEST_F_L0()
82 EXPECT_EQ(byteArray->Get(thread, 1, DataViewType::UINT32, 2), JSTaggedValue(value)); in HWTEST_F_L0()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforinteger_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforinteger_fuzzer.cpp59 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT16, val, false); in BuiltinsArrayBufferGetValueFromBufferForIntegerFuzzTest()
60 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::UINT16, false); in BuiltinsArrayBufferGetValueFromBufferForIntegerFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforfloat_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforfloat_fuzzer.cpp62 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::FLOAT64, val, false); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
63 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::FLOAT64, false); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforbigint_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforbigint_fuzzer.cpp56 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::BIGUINT64, val, true); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
57 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::BIGUINT64, true); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_atomics_test.cpp87 JSTypedArray *CreateTypedArray(JSThread *thread, const JSHandle<TaggedArray> &array, DataViewType t… in CreateTypedArray()
96 case DataViewType::BIGINT64: { in CreateTypedArray()
108 case DataViewType::BIGUINT64: { in CreateTypedArray()
120 case DataViewType::INT16: { in CreateTypedArray()
132 case DataViewType::INT32: { in CreateTypedArray()
144 case DataViewType::INT8: { in CreateTypedArray()
156 case DataViewType::UINT16: { in CreateTypedArray()
168 case DataViewType::UINT32: { in CreateTypedArray()
180 case DataViewType::UINT8: { in CreateTypedArray()
251 …Value> obj = JSHandle<JSTaggedValue>(thread, CreateTypedArray(thread, array, DataViewType::UINT8)); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffersetvalueinbufferforuint8clamped_fuzzer/
Dbuiltinsarraybuffersetvalueinbufferforuint8clamped_fuzzer.cpp59 …BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT8_CLAMPED, val, tr… in BuiltinsArrayBufferSetValueInBufferForUint8ClampedFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffersetvalueinbufferforbyte_fuzzer/
Dbuiltinsarraybuffersetvalueinbufferforbyte_fuzzer.cpp58 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT8, val, true); in BuiltinsArrayBufferSetValueInBufferForByteFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybufferfastsetvalueinbuffer_fuzzer/
Dbuiltinsarraybufferfastsetvalueinbuffer_fuzzer.cpp58 … BuiltinsArrayBuffer::FastSetValueInBuffer(thread, arrayBuffer, 0, DataViewType::INT32, val, true); in BuiltinsArrayBufferFastSetValueInBufferFuzzTest()

12