Home
last modified time | relevance | path

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

/arkcompiler/ets_runtime/ecmascript/tests/
Djs_array_buffer_test.cpp109 JSHandle<JSArrayBuffer> arrBuf = factory->NewJSArrayBuffer(5); in HWTEST_F_L0() local
110arrBuf->Attach(thread, length + 1, JSHandle<JSTaggedValue>::Cast(nativePointer).GetTaggedValue()); in HWTEST_F_L0()
111 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 6U); in HWTEST_F_L0()
112 EXPECT_EQ(arrBuf->GetArrayBufferData().GetRawData(), in HWTEST_F_L0()
115 arrBuf->Detach(thread); in HWTEST_F_L0()
116 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 0U); in HWTEST_F_L0()
117 EXPECT_EQ(arrBuf->GetArrayBufferData().GetRawData(), JSTaggedValue::Null().GetRawData()); in HWTEST_F_L0()
118 EXPECT_TRUE(arrBuf->IsDetach()); in HWTEST_F_L0()
Djs_serializer_test.cpp845 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest1() local
846 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest1()
847 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest1()
864 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest2() local
865 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 5); // 5: bufferLength in TransferJSArrayBufferTest2()
866 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest2()
883 JSHandle<JSArrayBuffer> arrBuf = JSHandle<JSArrayBuffer>::Cast(res); in TransferJSArrayBufferTest3() local
884 EXPECT_EQ(arrBuf->GetArrayBufferByteLength(), 0); in TransferJSArrayBufferTest3()
885 JSHandle<JSTaggedValue> nativePtr(thread, arrBuf->GetArrayBufferData()); in TransferJSArrayBufferTest3()
1995 JSHandle<JSArrayBuffer> arrBuf = factory->NewJSArrayBuffer(buffer, in HWTEST_F_L0() 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.h58 …static JSTaggedValue GetValueFromBuffer(JSThread *thread, JSTaggedValue arrBuf, uint32_t byteIndex,
61 … static JSTaggedValue SetValueInBuffer(JSThread *thread, JSTaggedValue arrBuf, uint32_t byteIndex,
74 …static JSTaggedValue FastSetValueInBuffer(JSThread* thread, JSTaggedValue arrBuf, uint32_t byteInd…
80 static void *GetDataPointFromBuffer(JSTaggedValue arrBuf, uint32_t byteOffset = 0);
112 … JSHandle<JSTaggedValue> &arrBuf, uint32_t byteIndex, bool littleEndian);
Dbuiltins_arraybuffer.cpp105 JSHandle<JSArrayBuffer> arrBuf(thisHandle); in GetByteLength() local
107 uint32_t length = arrBuf->GetArrayBufferByteLength(); in GetByteLength()
126 JSHandle<JSArrayBuffer> arrBuf(thisHandle); in Slice() local
136 int32_t len = static_cast<int32_t>(arrBuf->GetArrayBufferByteLength()); in Slice()
212 void *fromBuf = GetDataPointFromBuffer(arrBuf.GetTaggedValue()); in Slice()
290 JSHandle<JSArrayBuffer> arrBuf(srcBuffer); in CloneArrayBuffer() local
291 uint32_t srcLen = arrBuf->GetArrayBufferByteLength(); in CloneArrayBuffer()
308 void *fromBuf = GetDataPointFromBuffer(arrBuf.GetTaggedValue()); in CloneArrayBuffer()
318 JSTaggedValue BuiltinsArrayBuffer::GetValueFromBuffer(JSThread *thread, JSTaggedValue arrBuf, uint3… in GetValueFromBuffer() argument
321 void *pointer = GetDataPointFromBuffer(arrBuf); in GetValueFromBuffer()
[all …]
Dbuiltins_atomics.cpp307 JSTaggedValue BuiltinsAtomics::AtomicReadModifyWriteCase(JSThread *thread, JSTaggedValue arrBuf, in AtomicReadModifyWriteCase() argument
312 void *pointer = BuiltinsArrayBuffer::GetDataPointFromBuffer(arrBuf); in AtomicReadModifyWriteCase()
/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.cpp53 GateRef TypedArrayStubBuilder::GetDataPointFromBuffer(GateRef arrBuf) in GetDataPointFromBuffer() argument
62 DEFVARIABLE(result, VariableType::JS_ANY(), arrBuf); in GetDataPointFromBuffer()
63 Branch(IsByteArray(arrBuf), &isByteArray, &notByteArray); in GetDataPointFromBuffer()
71 GateRef data = GetArrayBufferData(arrBuf); in GetDataPointFromBuffer()
Dtyped_array_stub_builder.h36 GateRef GetDataPointFromBuffer(GateRef arrBuf);
/arkcompiler/ets_runtime/ecmascript/
Djs_typed_array.cpp709 JSTaggedValue arrBuf = typedArray->GetViewedArrayBufferOrByteArray(); in GetOffHeapBuffer() local
710 if (arrBuf.IsArrayBuffer() || arrBuf.IsSharedArrayBuffer()) { in GetOffHeapBuffer()
711 return arrBuf; in GetOffHeapBuffer()
714 ByteArray *byteArray = ByteArray::Cast(arrBuf.GetTaggedObject()); in GetOffHeapBuffer()