Home
last modified time | relevance | path

Searched refs:arrBuf (Results 1 – 16 of 16) sorted by relevance

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_array_buffer_test.cpp110 JSHandle<JSArrayBuffer> arrBuf = factory->NewJSArrayBuffer(5); in HWTEST_F_L0() local
111arrBuf->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()
Djs_serializer_test.cpp882 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/
Dbuiltins_sharedarraybuffer_test.cpp106 …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 …]
Dbuiltins_arraybuffer_test.cpp96 …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()
Dbuiltins_dataview_test.cpp83 …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 …]
Dbuiltins_atomics_test.cpp220 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/
Dbuiltins_arraybuffer.h59 …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);
Dbuiltins_arraybuffer.cpp111 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 …]
Dbuiltins_atomics.cpp308 JSTaggedValue BuiltinsAtomics::AtomicReadModifyWriteCase(JSThread *thread, JSTaggedValue arrBuf, in AtomicReadModifyWriteCase() argument
313 void *pointer = BuiltinsArrayBuffer::GetDataPointFromBuffer(arrBuf); in AtomicReadModifyWriteCase()
Dbuiltins_ark_tools.cpp662 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(obj1); in ArrayBufferDetach() local
663 arrBuf->Detach(thread); in ArrayBufferDetach()
/arkcompiler/ets_runtime/ecmascript/
Djs_typed_array.h103 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in FastGetOffHeapBuffer() local
104 if (arrBuf.IsArrayBuffer() || arrBuf.IsSharedArrayBuffer()) { in FastGetOffHeapBuffer()
105 return arrBuf; in FastGetOffHeapBuffer()
Djs_typed_array.cpp718 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/
Dbuiltins.ts175 let arrBuf = new ArrayBuffer(5);
176 AssertType(arrBuf.byteLength, "number");
177 AssertType(arrBuf.slice(1), "ArrayBuffer");
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.h39 GateRef GetDataPointFromBuffer(GateRef arrBuf);
Dtyped_array_stub_builder.cpp54 GateRef TypedArrayStubBuilder::GetDataPointFromBuffer(GateRef arrBuf) in GetDataPointFromBuffer() argument
63 DEFVARIABLE(result, VariableType::JS_ANY(), arrBuf); in GetDataPointFromBuffer()
64 Branch(IsByteArray(arrBuf), &isByteArray, &notByteArray); in GetDataPointFromBuffer()
72 GateRef data = GetArrayBufferData(arrBuf); in GetDataPointFromBuffer()
/arkcompiler/ets_runtime/ecmascript/serializer/tests/
Dserializer_test.cpp837 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 …]