Home
last modified time | relevance | path

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

/arkcompiler/ets_runtime/test/aottest/aot_type_test/uint32Array/
Duint32Array.ts18 let typedArray : Uint32Array = new Uint32Array([1, 2, 4294967290, 5, 5, 5, 6, 6, 4294967295]);
19 print(typedArray[2]);
20 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
21 print(typedArray[0]);
22 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
23 print(typedArray[1]);
24 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
25 print(typedArray[0]);
26 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
27 print(typedArray[1]);
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/uint8ClampedArray/
Duint8ClampedArray.ts18 let typedArray : Uint8ClampedArray = new Uint8ClampedArray([8848, -6666, 250, 5, 5, 5, 7, 7]);
19 print(typedArray[0]);
20 print(typedArray[1]);
21 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
22 print(typedArray[0]);
23 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
24 print(typedArray[1]);
25 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
26 print(typedArray[0]);
27 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/uint16Array/
Duint16Array.ts18 let typedArray : Uint16Array = new Uint16Array([1, 2, 65530, 5, 5, 5, 6, 6]);
19 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
20 print(typedArray[0]);
21 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
22 print(typedArray[1]);
23 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
24 print(typedArray[0]);
25 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
26 print(typedArray[1]);
27 let s = typedArray[2] + typedArray[6];
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/int8Array/
Dint8Array.ts18 let typedArray : Int8Array = new Int8Array([1, 2, 100, -100, 27, 28, 28, 29]);
19 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
20 print(typedArray[0]);
21 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
22 print(typedArray[1]);
23 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
24 print(typedArray[0]);
25 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
26 print(typedArray[1]);
27 let s = typedArray[2] + typedArray[6];
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/int16Array/
Dint16Array.ts18 let typedArray : Int16Array = new Int16Array([1, 2, 32760, -32760, 7, 8, 8, 9]);
19 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
20 print(typedArray[0]);
21 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
22 print(typedArray[1]);
23 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
24 print(typedArray[0]);
25 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
26 print(typedArray[1]);
27 let s = typedArray[2] + typedArray[6];
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/uint8Array/
Duint8Array.ts18 let typedArray : Uint8Array = new Uint8Array([1, 2, 250, 5, 5, 5, 6, 6]);
19 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
20 print(typedArray[0]);
21 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
22 print(typedArray[1]);
23 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
24 print(typedArray[0]);
25 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
26 print(typedArray[1]);
27 let s = typedArray[2] + typedArray[6];
[all …]
/arkcompiler/ets_runtime/test/aottest/aot_type_test/int32Array/
Dint32Array.ts18 let typedArray : Int32Array = new Int32Array([1, 2, 2147483640, -2147483640, 7, 8, 8, 9]);
19 typedArray[0] = typedArray[2] + typedArray[4]; //upper bound
20 print(typedArray[0]);
21 typedArray[1] = typedArray[3] - typedArray[5]; //lower bound
22 print(typedArray[1]);
23 typedArray[0] = typedArray[2] + typedArray[6]; //over flow
24 print(typedArray[0]);
25 typedArray[1] = typedArray[3] - typedArray[7]; //under spill
26 print(typedArray[1]);
27 let s = typedArray[2] + typedArray[6];
[all …]
/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/float64Array/
Dfloat64Array.ts18 let typedArray : Float64Array = new Float64Array([1.5, 2.5, 3, 4.5, 5.5, 6, 7]);
19 typedArray[0] = 1;
20 print(typedArray[0])
22 for (let i = 0; i < typedArray.length; ++i) {
23 s += typedArray[i];
/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.cpp547 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
548 ASSERT_TRUE(typedArray->IsInt8Array()); in HWTEST_F_L0()
549 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
550 ASSERT_EQ(typedArray->ByteOffset(vm_), 5U); // 5 : offset of byte in HWTEST_F_L0()
551 ASSERT_EQ(typedArray->ArrayLength(vm_), 6U); // 6 : length of array in HWTEST_F_L0()
552 ASSERT_EQ(typedArray->GetArrayBuffer(vm_)->GetBuffer(), arrayBuffer->GetBuffer()); in HWTEST_F_L0()
563 Local<Uint8ArrayRef> typedArray = Uint8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
564 ASSERT_TRUE(typedArray->IsUint8Array()); in HWTEST_F_L0()
565 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
566 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.cpp381 JSHandle<JSTypedArray> typedArray = JSHandle<JSTypedArray>::Cast(thisHandle); in GetBuffer() local
382 JSTaggedValue buffer = JSTypedArray::GetOffHeapBuffer(thread, typedArray); in GetBuffer()
1145 JSHandle<JSTypedArray> typedArray(argArray); in Set() local
1148 JSTaggedValue srcBuffer = typedArray->GetViewedArrayBufferOrByteArray(); in Set()
1167 JSHandle<JSTaggedValue> srcName(thread, typedArray->GetTypedArrayName()); in Set()
1170 uint32_t srcLength = typedArray->GetArrayLength(); in Set()
1171 uint32_t srcByteOffset = typedArray->GetByteOffset(); in Set()
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.cpp122 GateRef TypedArrayStubBuilder::FastCopyElementToArray(GateRef glue, GateRef typedArray, GateRef arr… in FastCopyElementToArray() argument
137 GateRef buffer = GetViewedArrayBuffer(typedArray); in FastCopyElementToArray()
146 GateRef arrLen = GetArrayLength(typedArray); in FastCopyElementToArray()
147 GateRef offset = GetByteOffset(typedArray); in FastCopyElementToArray()
148 GateRef hclass = LoadHClass(typedArray); in FastCopyElementToArray()
168 CallRuntime(glue, RTSTUB_ID(FastCopyElementToArray), { typedArray, array}); in FastCopyElementToArray()
Dtyped_array_stub_builder.h33 GateRef FastCopyElementToArray(GateRef glue, GateRef typedArray, GateRef array);
/arkcompiler/ets_runtime/ecmascript/
Djs_typed_array.h87 static bool FastCopyElementToArray(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
93 static bool IsValidIntegerIndex(const JSHandle<JSTaggedValue> &typedArray, JSTaggedValue index);
100 static JSTaggedValue GetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray);
Djs_typed_array.cpp422 bool JSTypedArray::IsValidIntegerIndex(const JSHandle<JSTaggedValue> &typedArray, JSTaggedValue ind… in IsValidIntegerIndex() argument
426 JSHandle<JSTypedArray> typedarrayObj(typedArray); in IsValidIntegerIndex()
487 …l JSTypedArray::FastCopyElementToArray(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray, in FastCopyElementToArray() argument
492 ASSERT(typedArray->IsTypedArray()); in FastCopyElementToArray()
494 JSHandle<JSTypedArray> typedarrayObj(typedArray); in FastCopyElementToArray()
707 JSTaggedValue JSTypedArray::GetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray) in GetOffHeapBuffer() argument
709 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in GetOffHeapBuffer()
720 … ByteArray::Cast(typedArray->GetViewedArrayBufferOrByteArray().GetTaggedObject())->GetData())); in GetOffHeapBuffer()
726 typedArray->SetViewedArrayBufferOrByteArray(thread, arrayBuffer.GetTaggedValue()); in GetOffHeapBuffer()
727 typedArray->SetIsOnHeap(false); in GetOffHeapBuffer()
Djs_serializer.cpp714 JSHandle<JSTypedArray> typedArray = JSHandle<JSTypedArray>::Cast(value); in WriteJSTypedArray() local
721 [[maybe_unused]] DataViewType viewType = TypedArrayHelper::GetType(typedArray); in WriteJSTypedArray()
723 …JSHandle<JSTaggedValue> viewedArrayBufferOrByteArray(thread_, typedArray->GetViewedArrayBufferOrBy… in WriteJSTypedArray()
743 JSHandle<JSTaggedValue> typedArrayName(thread_, typedArray->GetTypedArrayName()); in WriteJSTypedArray()
748 JSTaggedValue byteLength(typedArray->GetByteLength()); in WriteJSTypedArray()
753 JSTaggedValue byteOffset(typedArray->GetByteOffset()); in WriteJSTypedArray()
758 JSTaggedValue arrayLength(typedArray->GetArrayLength()); in WriteJSTypedArray()
763 ContentType contentType = typedArray->GetContentType(); in WriteJSTypedArray()
1672 JSHandle<JSTypedArray> typedArray = in ReadJSTypedArray() local
1674 obj = JSHandle<JSObject>::Cast(typedArray); in ReadJSTypedArray()
[all …]
/arkcompiler/ets_runtime/ecmascript/ts_types/
Dlib_ark_builtins.d.ts1752 …add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1754 …and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1756 …compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint3…
1758 …exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array,…
1762 …load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, ind…
1764 …or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index…
1766 …store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, in…
1768 …sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, inde…
1770 …wait(typedArray: Int32Array, index: number, value: number, timeout?: number): 'ok' | 'not-equal' |…
1772 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->GetViewedArrayBufferOrByteArray().IsByteArray()); in HWTEST_F_L0()
1479 JSTypedArray::GetOffHeapBuffer(thread, typedArray); in HWTEST_F_L0()
1480 ASSERT_TRUE(typedArray->GetViewedArrayBufferOrByteArray().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.cpp2256 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ByteLength() local
2257 LOG_IF_SPECIAL(typedArray, FATAL); in ByteLength()
2258 return typedArray->GetByteLength(); in ByteLength()
2264 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ByteOffset() local
2265 LOG_IF_SPECIAL(typedArray, FATAL); in ByteOffset()
2266 return typedArray->GetByteOffset(); in ByteOffset()
2272 JSHandle<JSTypedArray> typedArray(JSNApiHelper::ToJSHandle(this)); in ArrayLength() local
2273 LOG_IF_SPECIAL(typedArray, FATAL); in ArrayLength()
2274 return typedArray->GetArrayLength(); in ArrayLength()
/arkcompiler/ets_runtime/ecmascript/stubs/
Druntime_stubs.cpp1892 …JSHandle<JSTaggedValue> typedArray = GetHArg<JSTaggedValue>(argv, argc, 0); // 0: means the zerot… in DEF_RUNTIME_STUBS() local
1894 …return JSTaggedValue(JSTypedArray::FastCopyElementToArray(thread, typedArray, array)).GetRawData(); in DEF_RUNTIME_STUBS()