Home
last modified time | relevance | path

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

12

/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/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/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/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/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/runtime_core/static_core/plugins/ets/stdlib/escompat/
DAtomics.ets60 public static add(typedArray: Int8Array, index: int, value: byte): byte {
61 …sition = Atomics.validateAtomicAccess(typedArray.byteOffset as int, Int8Array.BYTES_PER_ELEMENT as…
62 let buffer = typedArray.buffer
64 let oldValue = typedArray.at(indexedPosition)
66 typedArray.set(indexedPosition, newValue)
74 public static and(typedArray: Int8Array, index: int, value: byte): byte {
75 …sition = Atomics.validateAtomicAccess(typedArray.byteOffset as int, Int8Array.BYTES_PER_ELEMENT as…
76 let buffer = typedArray.buffer
78 let oldValue = typedArray.at(indexedPosition)
80 typedArray.set(indexedPosition, newValue)
[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/fuzztest/jsvaluerefisarray_fuzzer/
Djsvaluerefisarray_fuzzer.cpp35 Local<JSValueRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsInt8ArrayFuzztest() local
36 typedArray->IsInt8Array(); in IsInt8ArrayFuzztest()
51 Local<JSValueRef> typedArray = Uint8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsUint8ArrayFuzztest() local
52 typedArray->IsUint8Array(); in IsUint8ArrayFuzztest()
67 Local<JSValueRef> typedArray = Uint8ClampedArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsUint8ClampedArrayFuzztest() local
68 typedArray->IsUint8ClampedArray(); in IsUint8ClampedArrayFuzztest()
84 Local<JSValueRef> typedArray = Int16ArrayRef::New(vm, arrayBuffer, 0, length); in IsInt16ArrayFuzztest() local
85 typedArray->IsInt16Array(); in IsInt16ArrayFuzztest()
101 Local<JSValueRef> typedArray = Uint16ArrayRef::New(vm, arrayBuffer, 0, length); in IsUint16ArrayFuzztest() local
102 typedArray->IsUint16Array(); in IsUint16ArrayFuzztest()
/arkcompiler/ets_runtime/test/fuzztest/typedarrayref_fuzzer/
Dtypedarrayref_fuzzer.cpp37 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, byteOffset, length); in TypedArrayrefArrayLengthFuzzerTest() local
38 typedArray->ArrayLength(vm); in TypedArrayrefArrayLengthFuzzerTest()
54 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, byteOffset, length); in TypedArrayrefByteOffSetFuzzerTest() local
55 typedArray->ByteOffset(vm); in TypedArrayrefByteOffSetFuzzerTest()
71 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, byteOffset, length); in TypedArrayrefGetArrayBufferFuzzerTest() local
72 typedArray->GetArrayBuffer(vm); in TypedArrayrefGetArrayBufferFuzzerTest()
/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/test/moduletest/typedarrayjoin/
Dtypedarrayjoin.js29 let typedArray; variable
33 ArkTools.arrayBufferDetach(typedArray.buffer);
39 typedArray = new constructor(arr); variable
40 print(typedArray.join(separator) == '*');
/arkcompiler/ets_runtime/ecmascript/napi/test/
Djsnapi_first_tests.cpp773 Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
774 ASSERT_TRUE(typedArray->IsInt8Array()); in HWTEST_F_L0()
775 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
776 ASSERT_EQ(typedArray->ByteOffset(vm_), 5U); // 5 : offset of byte in HWTEST_F_L0()
777 ASSERT_EQ(typedArray->ArrayLength(vm_), 6U); // 6 : length of array in HWTEST_F_L0()
778 ASSERT_EQ(typedArray->GetArrayBuffer(vm_)->GetBuffer(), arrayBuffer->GetBuffer()); in HWTEST_F_L0()
798 Local<Uint8ArrayRef> typedArray = Uint8ArrayRef::New(vm_, arrayBuffer, 5, 6); in HWTEST_F_L0() local
799 ASSERT_TRUE(typedArray->IsUint8Array()); in HWTEST_F_L0()
800 ASSERT_EQ(typedArray->ByteLength(vm_), 6U); // 6 : length of bytes in HWTEST_F_L0()
801 ASSERT_EQ(typedArray->ByteOffset(vm_), 5U); // 5 : offset of byte in HWTEST_F_L0()
[all …]
Djsnapi_sample.cpp1853 … Local<Int8ArrayRef> typedArray = Int8ArrayRef::New(vm_, arrayBuffer, byteOffset, int8ArrayLength); in HWTEST_F_L0() local
1854 GTEST_LOG_(INFO) << "sample_Int8Array_byteLength : " << typedArray->ByteLength(vm_); in HWTEST_F_L0()
1855 GTEST_LOG_(INFO) << "sample_Int8Array_byteOffset : " << typedArray->ByteOffset(vm_); in HWTEST_F_L0()
1856 GTEST_LOG_(INFO) << "sample_Int8Array_arrayLength : " << typedArray->ArrayLength(vm_); in HWTEST_F_L0()
1857 int8_t *result = (int8_t *)typedArray->GetArrayBuffer(vm_)->GetBuffer(); in HWTEST_F_L0()
1878 …Local<Uint8ArrayRef> typedArray = Uint8ArrayRef::New(vm_, arrayBuffer, byteOffset, Uint8ArrayLengt… in HWTEST_F_L0() local
1879 GTEST_LOG_(INFO) << "sample_Uint8Array_byteLength : " << typedArray->ByteLength(vm_); in HWTEST_F_L0()
1880 GTEST_LOG_(INFO) << "sample_Uint8Array_byteOffset : " << typedArray->ByteOffset(vm_); in HWTEST_F_L0()
1881 GTEST_LOG_(INFO) << "sample_Uint8Array_arrayLength : " << typedArray->ArrayLength(vm_); in HWTEST_F_L0()
1882 uint8_t *result = (uint8_t *)typedArray->GetArrayBuffer(vm_)->GetBuffer(); in HWTEST_F_L0()
[all …]
/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);
101 …tic inline JSTaggedValue FastGetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray) in FastGetOffHeapBuffer() argument
103 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in FastGetOffHeapBuffer()
107 return GetOffHeapBuffer(thread, typedArray); in FastGetOffHeapBuffer()
109 static bool FastTypedArrayFill(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray,
Djs_typed_array.cpp432 bool JSTypedArray::IsValidIntegerIndex(const JSHandle<JSTaggedValue> &typedArray, JSTaggedValue ind… in IsValidIntegerIndex() argument
436 JSHandle<JSTypedArray> typedarrayObj(typedArray); in IsValidIntegerIndex()
497 …l JSTypedArray::FastCopyElementToArray(JSThread *thread, const JSHandle<JSTaggedValue> &typedArray, in FastCopyElementToArray() argument
502 ASSERT(typedArray->IsTypedArray()); in FastCopyElementToArray()
504 JSHandle<JSTypedArray> typedarrayObj(typedArray); in FastCopyElementToArray()
716 JSTaggedValue JSTypedArray::GetOffHeapBuffer(JSThread *thread, JSHandle<JSTypedArray> &typedArray) in GetOffHeapBuffer() argument
718 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in GetOffHeapBuffer()
729 … ByteArray::Cast(typedArray->GetViewedArrayBufferOrByteArray().GetTaggedObject())->GetData())); in GetOffHeapBuffer()
735 typedArray->SetViewedArrayBufferOrByteArray(thread, arrayBuffer.GetTaggedValue()); in GetOffHeapBuffer()
736 JSHandle<JSTaggedValue> typeName(thread, typedArray->GetTypedArrayName()); in GetOffHeapBuffer()
[all …]
Djs_serializer.cpp729 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->GetViewedArrayBufferOrBy… in WriteJSTypedArray()
758 JSHandle<JSTaggedValue> typedArrayName(thread_, typedArray->GetTypedArrayName()); in WriteJSTypedArray()
763 JSTaggedValue byteLength(typedArray->GetByteLength()); in WriteJSTypedArray()
768 JSTaggedValue byteOffset(typedArray->GetByteOffset()); in WriteJSTypedArray()
773 JSTaggedValue arrayLength(typedArray->GetArrayLength()); in WriteJSTypedArray()
778 ContentType contentType = typedArray->GetContentType(); in WriteJSTypedArray()
1695 JSHandle<JSTypedArray> typedArray = in ReadJSTypedArray() local
1697 obj = JSHandle<JSObject>::Cast(typedArray); in ReadJSTypedArray()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisbig64array_fuzzer/
Djsvaluerefisbig64array_fuzzer.cpp48 … Local<BigInt64ArrayRef> typedArray = BigInt64ArrayRef::New(vm, ref, (int32_t)size, (int32_t)size); in JSValueRefIsBigInt64ArrayFuzzTest() local
49 typedArray->IsBigInt64Array(); in JSValueRefIsBigInt64ArrayFuzzTest()
75 …Local<BigUint64ArrayRef> typedArray = BigUint64ArrayRef::New(vm, ref, (int32_t)size, (int32_t)size… in JSValueRefIsBigUint64ArrayRefNewFuzzTest() local
76 typedArray->IsBigUint64Array(); in JSValueRefIsBigUint64ArrayRefNewFuzzTest()
/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 …]
/arkcompiler/ets_runtime/test/fuzztest/uint32arrayrefbytelength_fuzzer/
Duint32arrayrefbytelength_fuzzer.cpp48 Local<Uint32ArrayRef> typedArray = Uint32ArrayRef::New(vm, ref, (int32_t)size, (int32_t)size); in Uint32ArrayRefByteLengthFuzzTest() local
49 typedArray->ByteLength(vm); in Uint32ArrayRefByteLengthFuzzTest()
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.cpp212 GateRef TypedArrayStubBuilder::FastCopyElementToArray(GateRef glue, GateRef typedArray, GateRef arr… in FastCopyElementToArray() argument
227 GateRef buffer = GetViewedArrayBuffer(typedArray); in FastCopyElementToArray()
236 GateRef arrLen = GetArrayLength(typedArray); in FastCopyElementToArray()
237 GateRef offset = GetByteOffset(typedArray); in FastCopyElementToArray()
238 GateRef hclass = LoadHClass(typedArray); in FastCopyElementToArray()
258 CallRuntime(glue, RTSTUB_ID(FastCopyElementToArray), { typedArray, array}); in FastCopyElementToArray()
422 Label typedArray(env); in SubArray() local
429 Branch(IsTypedArray(thisValue), &typedArray, slowPath); in SubArray()
430 Bind(&typedArray); in SubArray()
/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 …]

12