Home
last modified time | relevance | path

Searched refs:typedArray (Results 1 – 13 of 13) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/base/
Datomic_helper.cpp22 …Value AtomicHelper::ValidateIntegerTypedArray(JSThread *thread, JSHandle<JSTaggedValue> typedArray, in ValidateIntegerTypedArray() argument
27 JSTaggedValue buffer = TypedArrayHelper::ValidateTypedArray(thread, typedArray); in ValidateIntegerTypedArray()
34 …JSHandle<JSTaggedValue> typeName(thread, JSTypedArray::Cast(typedArray->GetTaggedObject())->GetTyp… in ValidateIntegerTypedArray()
58 …32_t AtomicHelper::ValidateAtomicAccess(JSThread *thread, const JSHandle<JSTaggedValue> typedArray, in ValidateAtomicAccess() argument
62 ASSERT(typedArray->IsECMAObject() && typedArray->IsTypedArray()); in ValidateAtomicAccess()
64 JSHandle<JSObject> typedArrayObj(typedArray); in ValidateAtomicAccess()
65 JSHandle<JSTypedArray> srcObj(typedArray); in ValidateAtomicAccess()
95 JSTaggedValue AtomicHelper::AtomicStore(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray, in AtomicStore() argument
98 JSTaggedValue bufferValue = ValidateIntegerTypedArray(thread, typedArray); in AtomicStore()
101 uint32_t indexedPosition = ValidateAtomicAccess(thread, typedArray, index); in AtomicStore()
[all …]
Datomic_helper.h92 …tatic JSTaggedValue ValidateIntegerTypedArray(JSThread *thread, JSHandle<JSTaggedValue> typedArray,
95 static uint32_t ValidateAtomicAccess(JSThread *thread, const JSHandle<JSTaggedValue> typedArray,
97 static JSTaggedValue AtomicStore(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
99 static JSTaggedValue AtomicLoad(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
/arkcompiler/ets_runtime/test/aottest/aot_type_test/float32Array/
Dfloat32Array.ts18 let typedArray : Float32Array = new Float32Array(1);
19 typedArray[0] = 1;
20 print(typedArray[0])
/arkcompiler/ets_runtime/ecmascript/napi/test/
Djsnapi_tests.cpp486 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
487 ASSERT_TRUE(typedArray->IsInt8Array()); in HWTEST_F_L0()
488 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
489 ASSERT_EQ(typedArray->ByteOffset(vm_), 5U); // 5 : offset of byte in HWTEST_F_L0()
490 ASSERT_EQ(typedArray->ArrayLength(vm_), 6U); // 6 : length of array in HWTEST_F_L0()
491 ASSERT_EQ(typedArray->GetArrayBuffer(vm_)->GetBuffer(), arrayBuffer->GetBuffer()); in HWTEST_F_L0()
502 Local<Uint8ArrayRef> typedArray = Uint8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
503 ASSERT_TRUE(typedArray->IsUint8Array()); in HWTEST_F_L0()
504 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
505 ASSERT_EQ(typedArray->ByteOffset(vm_), 5U); // 5 : offset of byte in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_atomics.cpp38 JSHandle<JSTaggedValue> typedArray = GetCallArg(argv, 0); in Sub() local
40 return AtomicReadModifyWrite(thread, typedArray, index, argv, AtomicHelper::SubFun()); in Sub()
49 JSHandle<JSTaggedValue> typedArray = GetCallArg(argv, 0); in Add() local
51 return AtomicReadModifyWrite(thread, typedArray, index, argv, AtomicHelper::AddFun()); in Add()
60 JSHandle<JSTaggedValue> typedArray = GetCallArg(argv, 0); in And() local
62 return AtomicReadModifyWrite(thread, typedArray, index, argv, AtomicHelper::AndFun()); in And()
71 JSHandle<JSTaggedValue> typedArray = GetCallArg(argv, 0); in Or() local
73 return AtomicReadModifyWrite(thread, typedArray, index, argv, AtomicHelper::OrFun()); in Or()
82 JSHandle<JSTaggedValue> typedArray = GetCallArg(argv, 0); in Xor() local
84 return AtomicReadModifyWrite(thread, typedArray, index, argv, AtomicHelper::XorFun()); in Xor()
[all …]
Dbuiltins_atomics.h59 …ic JSTaggedValue AtomicReadModifyWrite(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
Dbuiltins_typedarray.cpp366 JSHandle<JSTypedArray> typedArray = JSHandle<JSTypedArray>::Cast(thisHandle); in GetBuffer() local
367 JSTaggedValue buffer = JSTypedArray::GetOffHeapBuffer(thread, typedArray); in GetBuffer()
1122 JSHandle<JSTypedArray> typedArray(argArray); in Set() local
1125 JSTaggedValue srcBuffer = typedArray->GetViewedArrayBuffer(); in Set()
1144 JSHandle<JSTaggedValue> srcName(thread, typedArray->GetTypedArrayName()); in Set()
1147 uint32_t srcLength = typedArray->GetArrayLength(); in Set()
1148 uint32_t srcByteOffset = typedArray->GetByteOffset(); in Set()
/arkcompiler/ets_runtime/ecmascript/
Djs_typed_array.h85 static bool FastCopyElementToArray(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
91 static bool IsValidIntegerIndex(const JSHandle<JSTaggedValue> &typedArray, JSTaggedValue index);
98 static JSTaggedValue GetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray);
Djs_typed_array.cpp382 bool JSTypedArray::IsValidIntegerIndex(const JSHandle<JSTaggedValue> &typedArray, JSTaggedValue ind… in IsValidIntegerIndex() argument
386 JSHandle<JSTypedArray> typedarrayObj(typedArray); in IsValidIntegerIndex()
447 …l JSTypedArray::FastCopyElementToArray(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray, in FastCopyElementToArray() argument
452 ASSERT(typedArray->IsTypedArray()); in FastCopyElementToArray()
454 JSHandle<JSTypedArray> typedarrayObj(typedArray); in FastCopyElementToArray()
664 JSTaggedValue JSTypedArray::GetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray) in GetOffHeapBuffer() argument
666 JSTaggedValue arrBuf = typedArray->GetViewedArrayBuffer(); in GetOffHeapBuffer()
677 ByteArray::Cast(typedArray->GetViewedArrayBuffer().GetTaggedObject())->GetData())); in GetOffHeapBuffer()
683 typedArray->SetViewedArrayBuffer(thread, arrayBuffer.GetTaggedValue()); in GetOffHeapBuffer()
684 typedArray->SetIsOnHeap(false); in GetOffHeapBuffer()
Djs_serializer.cpp727 JSHandle<JSTypedArray> typedArray = JSHandle<JSTypedArray>::Cast(value); in WriteJSTypedArray() local
736 [[maybe_unused]] DataViewType viewType = TypedArrayHelper::GetType(typedArray); in WriteJSTypedArray()
738 … JSHandle<JSTaggedValue> viewedArrayBufferOrByteArray(thread_, typedArray->GetViewedArrayBuffer()); in WriteJSTypedArray()
762 JSHandle<JSTaggedValue> typedArrayName(thread_, typedArray->GetTypedArrayName()); in WriteJSTypedArray()
768 JSTaggedValue byteLength(typedArray->GetByteLength()); in WriteJSTypedArray()
774 JSTaggedValue byteOffset(typedArray->GetByteOffset()); in WriteJSTypedArray()
780 JSTaggedValue arrayLength(typedArray->GetArrayLength()); in WriteJSTypedArray()
786 ContentType contentType = typedArray->GetContentType(); in WriteJSTypedArray()
1680 JSHandle<JSTypedArray> typedArray = in ReadJSTypedArray() local
1682 obj = JSHandle<JSObject>::Cast(typedArray); in ReadJSTypedArray()
[all …]
/arkcompiler/ets_runtime/ecmascript/ts_types/
Dlib_ark_builtins.d.ts1750 …add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1752 …and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1754 …compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint3…
1757 …exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array,…
1761 …load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, ind…
1763 …or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index…
1765 …store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, in…
1767 …sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1769 …wait(typedArray: Int32Array, index: number, value: number, timeout?: number): 'ok' | 'not-equal' |…
1771 notify(typedArray: Int32Array, index: number, count?: number): number;
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_typed_array_test.cpp1477 JSHandle<JSTypedArray> typedArray(int8Array); in HWTEST_F_L0() local
1478 ASSERT_TRUE(typedArray->GetViewedArrayBuffer().IsByteArray()); in HWTEST_F_L0()
1479 JSTypedArray::GetOffHeapBuffer(thread, typedArray); in HWTEST_F_L0()
1480 ASSERT_TRUE(typedArray->GetViewedArrayBuffer().IsArrayBuffer()); in HWTEST_F_L0()
1481 JSTaggedValue data1 = JSTypedArray::FastGetPropertyByIndex(thread, typedArray.GetTaggedValue(), in HWTEST_F_L0()
1483 JSTaggedValue data2 = JSTypedArray::FastGetPropertyByIndex(thread, typedArray.GetTaggedValue(), in HWTEST_F_L0()
1485 JSTaggedValue data3 = JSTypedArray::FastGetPropertyByIndex(thread, typedArray.GetTaggedValue(), in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/napi/
Djsnapi.cpp1678 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ByteLength() local
1679 return typedArray->GetByteLength(); in ByteLength()
1684 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ByteOffset() local
1685 return typedArray->GetByteOffset(); in ByteOffset()
1690 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ArrayLength() local
1691 return typedArray->GetArrayLength(); in ArrayLength()