/arkcompiler/ets_runtime/ecmascript/tests/ |
D | js_array_buffer_test.cpp | 110 JSHandle<JSArrayBuffer> arrBuf = factory->NewJSArrayBuffer(5); in HWTEST_F_L0() local 111 … arrBuf->Attach(thread, length + 1, JSHandle<JSTaggedValue>::Cast(nativePointer).GetTaggedValue()); in HWTEST_F_L0() 112 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 6U); in HWTEST_F_L0() 113 EXPECT_EQ(arrBuf->GetArrayBufferData().GetRawData(), in HWTEST_F_L0() 116 arrBuf->Detach(thread); in HWTEST_F_L0() 117 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 0U); in HWTEST_F_L0() 118 EXPECT_EQ(arrBuf->GetArrayBufferData().GetRawData(), JSTaggedValue::Null().GetRawData()); in HWTEST_F_L0() 119 EXPECT_TRUE(arrBuf->IsDetach()); in HWTEST_F_L0()
|
D | js_serializer_test.cpp | 882 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest1() local 883 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest1() 884 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest1() 901 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest2() local 902 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest2() 903 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest2() 920 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest3() local 921 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 0); in TransferJSArrayBufferTest3() 922 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest3() 935 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest4() local [all …]
|
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
D | builtins_sharedarraybuffer_test.cpp | 106 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 109 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 120 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 123 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 162 JSHandle<JSArrayBuffer> arrBuf(thread, in HWTEST_F_L0() local 166 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 167 …ecmaRuntimeCallInfo->SetCallArg(0, arrBuf.GetTaggedValue()); // JSTaggedValue(static_cast<int32_t>… in HWTEST_F_L0() 176 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 187 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 202 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() [all …]
|
D | builtins_arraybuffer_test.cpp | 96 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 99 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0() 111 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 114 ecmaRuntimeCallInfo->SetThis(arrBuf.GetTaggedValue()); in HWTEST_F_L0()
|
D | builtins_dataview_test.cpp | 83 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in CreateBuiltinsDataView() local 88 ecmaRuntimeCallInfo->SetCallArg(0, arrBuf.GetTaggedValue()); in CreateBuiltinsDataView() 134 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 138 ecmaRuntimeCallInfo->SetCallArg(0, arrBuf.GetTaggedValue()); in HWTEST_F_L0() 147 arrBuf->SetArrayBufferData(thread, JSTaggedValue::Null()); in HWTEST_F_L0() 151 ecmaRuntimeCallInfo->SetCallArg(0, arrBuf.GetTaggedValue()); in HWTEST_F_L0() 178 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 179 arrBuf->SetArrayBufferData(thread, JSTaggedValue::Null()); in HWTEST_F_L0() 180 view->SetViewedArrayBuffer(thread, arrBuf); in HWTEST_F_L0() 209 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local [all …]
|
D | builtins_atomics_test.cpp | 220 JSTypedArray *CreateInt32TypedArray(JSThread *thread, const JSHandle<JSArrayBuffer> &arrBuf) in CreateInt32TypedArray() argument 231 ecmaRuntimeCallInfo1->SetCallArg(0, arrBuf.GetTaggedValue()); in CreateInt32TypedArray() 526 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 527 obj = JSHandle<JSTaggedValue>(thread, CreateInt32TypedArray(thread, arrBuf)); in HWTEST_F_L0() 528 arrBuf->SetArrayBufferData(thread, JSTaggedValue::Null()); in HWTEST_F_L0() 900 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 901 …Handle<JSTaggedValue> obj = JSHandle<JSTaggedValue>(thread, CreateInt32TypedArray(thread, arrBuf)); in HWTEST_F_L0() 931 …JSHandle<JSArrayBuffer> arrBuf(thread, JSArrayBuffer::Cast(reinterpret_cast<TaggedObject *>(tagged… in HWTEST_F_L0() local 932 …Handle<JSTaggedValue> obj = JSHandle<JSTaggedValue>(thread, CreateInt32TypedArray(thread, arrBuf)); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_arraybuffer.h | 59 …static JSTaggedValue GetValueFromBuffer(JSThread *thread, JSTaggedValue arrBuf, uint32_t byteIndex, 62 … static JSTaggedValue SetValueInBuffer(JSThread *thread, JSTaggedValue arrBuf, uint32_t byteIndex, 75 …static JSTaggedValue FastSetValueInBuffer(JSThread* thread, JSTaggedValue arrBuf, uint32_t byteInd… 77 …static JSTaggedValue TryFastSetValueInBuffer(JSThread *thread, JSTaggedValue arrBuf, uint32_t byte… 98 static void *GetDataPointFromBuffer(JSTaggedValue arrBuf, uint32_t byteOffset = 0); 136 … JSHandle<JSTaggedValue> &arrBuf, uint32_t byteIndex, bool littleEndian);
|
D | builtins_arraybuffer.cpp | 111 JSHandle<JSArrayBuffer> arrBuf(thisHandle); in GetByteLength() local 113 uint32_t length = arrBuf->GetArrayBufferByteLength(); in GetByteLength() 132 JSHandle<JSArrayBuffer> arrBuf(thisHandle); in Slice() local 142 int32_t len = static_cast<int32_t>(arrBuf->GetArrayBufferByteLength()); in Slice() 218 void *fromBuf = GetDataPointFromBuffer(arrBuf.GetTaggedValue()); in Slice() 296 JSHandle<JSArrayBuffer> arrBuf(srcBuffer); in CloneArrayBuffer() local 297 uint32_t srcLen = arrBuf->GetArrayBufferByteLength(); in CloneArrayBuffer() 314 void *fromBuf = GetDataPointFromBuffer(arrBuf.GetTaggedValue()); in CloneArrayBuffer() 324 JSTaggedValue BuiltinsArrayBuffer::GetValueFromBuffer(JSThread *thread, JSTaggedValue arrBuf, uint3… in GetValueFromBuffer() argument 327 void *pointer = GetDataPointFromBuffer(arrBuf); in GetValueFromBuffer() [all …]
|
D | builtins_atomics.cpp | 308 JSTaggedValue BuiltinsAtomics::AtomicReadModifyWriteCase(JSThread *thread, JSTaggedValue arrBuf, in AtomicReadModifyWriteCase() argument 313 void *pointer = BuiltinsArrayBuffer::GetDataPointFromBuffer(arrBuf); in AtomicReadModifyWriteCase()
|
D | builtins_ark_tools.cpp | 662 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(obj1); in ArrayBufferDetach() local 663 arrBuf->Detach(thread); in ArrayBufferDetach()
|
/arkcompiler/ets_runtime/ecmascript/ |
D | js_typed_array.h | 103 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in FastGetOffHeapBuffer() local 104 if (arrBuf.IsArrayBuffer() || arrBuf.IsSharedArrayBuffer()) { in FastGetOffHeapBuffer() 105 return arrBuf; in FastGetOffHeapBuffer()
|
D | js_typed_array.cpp | 718 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in GetOffHeapBuffer() local 719 if (arrBuf.IsArrayBuffer() || arrBuf.IsSharedArrayBuffer()) { in GetOffHeapBuffer() 720 return arrBuf; in GetOffHeapBuffer() 723 ByteArray *byteArray = ByteArray::Cast(arrBuf.GetTaggedObject()); in GetOffHeapBuffer()
|
/arkcompiler/ets_runtime/test/typeinfer/builtins/ |
D | builtins.ts | 175 let arrBuf = new ArrayBuffer(5); 176 AssertType(arrBuf.byteLength, "number"); 177 AssertType(arrBuf.slice(1), "ArrayBuffer");
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
D | typed_array_stub_builder.h | 39 GateRef GetDataPointFromBuffer(GateRef arrBuf);
|
D | typed_array_stub_builder.cpp | 54 GateRef TypedArrayStubBuilder::GetDataPointFromBuffer(GateRef arrBuf) in GetDataPointFromBuffer() argument 63 DEFVARIABLE(result, VariableType::JS_ANY(), arrBuf); in GetDataPointFromBuffer() 64 Branch(IsByteArray(arrBuf), &isByteArray, ¬ByteArray); in GetDataPointFromBuffer() 72 GateRef data = GetArrayBufferData(arrBuf); in GetDataPointFromBuffer()
|
/arkcompiler/ets_runtime/ecmascript/serializer/tests/ |
D | serializer_test.cpp | 837 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest1() local 838 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest1() 839 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest1() 858 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest2() local 859 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest2() 860 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest2() 880 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest3() local 881 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 0); in TransferJSArrayBufferTest3() 882 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest3() 1619 JSHandle<JSArrayBuffer> arrBuf = factory->NewJSArrayBuffer(buffer, in HWTEST_F_L0() local [all …]
|