Home
last modified time | relevance | path

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

/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_arraybuffer_test.cpp61 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in CreateBuiltinsArrayBuffer() local
64 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, arrayBuffer.GetTaggedValu… in CreateBuiltinsArrayBuffer()
65 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in CreateBuiltinsArrayBuffer()
79 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in HWTEST_F_L0() local
81 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, arrayBuffer.GetTaggedValu… in HWTEST_F_L0()
82 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in HWTEST_F_L0()
Dbuiltins_dataview_test.cpp63 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in CreateBuiltinsDataviewArrayBuffer() local
66 …cmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, JSTaggedValue(*arrayBuffer), 6); in CreateBuiltinsDataviewArrayBuffer()
67 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in CreateBuiltinsDataviewArrayBuffer()
100 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in CreateArrayBuffer() local
103 …auto ecmaRuntimeCallInfo = TestHelper::CreateEcmaRuntimeCallInfo(thread, arrayBuffer.GetTaggedValu… in CreateArrayBuffer()
104 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in CreateArrayBuffer()
/arkcompiler/ets_runtime/test/moduletest/allocatearraybuffer/
Dallocatearraybuffer.js23 var arrayBuffer = Reflect.construct(ArrayBuffer, [16], newTarget); variable
24 print(arrayBuffer.length);
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforinteger_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforinteger_fuzzer.cpp55 …JSTaggedValue arrayBuffer = BuiltinsArrayBuffer::AllocateArrayBuffer(thread, bufferConstructor, MA… in BuiltinsArrayBufferGetValueFromBufferForIntegerFuzzTest() local
59 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT16, val, false); in BuiltinsArrayBufferGetValueFromBufferForIntegerFuzzTest()
60 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::UINT16, false); in BuiltinsArrayBufferGetValueFromBufferForIntegerFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforfloat_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforfloat_fuzzer.cpp59 …JSTaggedValue arrayBuffer = BuiltinsArrayBuffer::AllocateArrayBuffer(thread, bufferConstructor, MA… in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() local
62 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::FLOAT64, val, false); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
63 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::FLOAT64, false); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforbigint_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforbigint_fuzzer.cpp52 JSTaggedValue arrayBuffer = in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest() local
56 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::BIGUINT64, val, true); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
57 … BuiltinsArrayBuffer::GetValueFromBuffer(thread, arrayBuffer, 0, DataViewType::BIGUINT64, true); in BuiltinsArrayBufferGetValueFromBufferForBigIntFuzzTest()
/arkcompiler/ets_runtime/ecmascript/napi/test/
Djsnapi_tests.cpp484 Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm_, length); in HWTEST_F_L0() local
485 ASSERT_TRUE(arrayBuffer->IsArrayBuffer()); in HWTEST_F_L0()
486 ASSERT_EQ(arrayBuffer->ByteLength(vm_), length); in HWTEST_F_L0()
487 ASSERT_NE(arrayBuffer->GetBuffer(), nullptr); in HWTEST_F_L0()
510 Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm_, buffer, length, deleter, data); in HWTEST_F_L0() local
511 ASSERT_TRUE(arrayBuffer->IsArrayBuffer()); in HWTEST_F_L0()
512 ASSERT_EQ(arrayBuffer->ByteLength(vm_), length); in HWTEST_F_L0()
513 ASSERT_EQ(arrayBuffer->GetBuffer(), buffer); in HWTEST_F_L0()
523 Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm_, length); in HWTEST_F_L0() local
525 ASSERT_TRUE(arrayBuffer->IsArrayBuffer()); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybufferisview_fuzzer/
Dbuiltinsarraybufferisview_fuzzer.cpp64 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in BuiltinsArrayBufferIsViewFuzzTest() local
67 … auto ecmaRuntimeCallInfo = CreateEcmaRuntimeCallInfo(thread, arrayBuffer.GetTaggedValue(), 6); in BuiltinsArrayBufferIsViewFuzzTest()
68 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in BuiltinsArrayBufferIsViewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybufferarraybufferconstructor_fuzzer/
Dbuiltinsarraybufferarraybufferconstructor_fuzzer.cpp68 JSHandle<JSFunction> arrayBuffer(thread, env->GetArrayBufferFunction().GetTaggedValue()); in BuiltinsArrayBufferArrayBufferConstructorFuzzTest() local
71 … auto ecmaRuntimeCallInfo = CreateEcmaRuntimeCallInfo(thread, arrayBuffer.GetTaggedValue(), 6); in BuiltinsArrayBufferArrayBufferConstructorFuzzTest()
72 ecmaRuntimeCallInfo->SetFunction(arrayBuffer.GetTaggedValue()); in BuiltinsArrayBufferArrayBufferConstructorFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffersetvalueinbufferforuint8clamped_fuzzer/
Dbuiltinsarraybuffersetvalueinbufferforuint8clamped_fuzzer.cpp55 JSTaggedValue arrayBuffer = in BuiltinsArrayBufferSetValueInBufferForUint8ClampedFuzzTest() local
59 …BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT8_CLAMPED, val, tr… in BuiltinsArrayBufferSetValueInBufferForUint8ClampedFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffersetvalueinbufferforbyte_fuzzer/
Dbuiltinsarraybuffersetvalueinbufferforbyte_fuzzer.cpp55 …JSTaggedValue arrayBuffer = BuiltinsArrayBuffer::AllocateArrayBuffer(thread, bufferConstructor, MA… in BuiltinsArrayBufferSetValueInBufferForByteFuzzTest() local
58 … BuiltinsArrayBuffer::SetValueInBuffer(thread, arrayBuffer, 0, DataViewType::UINT8, val, true); in BuiltinsArrayBufferSetValueInBufferForByteFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybufferfastsetvalueinbuffer_fuzzer/
Dbuiltinsarraybufferfastsetvalueinbuffer_fuzzer.cpp55 …JSTaggedValue arrayBuffer = BuiltinsArrayBuffer::AllocateArrayBuffer(thread, bufferConstructor, MA… in BuiltinsArrayBufferFastSetValueInBufferFuzzTest() local
58 … BuiltinsArrayBuffer::FastSetValueInBuffer(thread, arrayBuffer, 0, DataViewType::INT32, val, true); in BuiltinsArrayBufferFastSetValueInBufferFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybufferclonearraybuffer_fuzzer/
Dbuiltinsarraybufferclonearraybuffer_fuzzer.cpp59 …JSTaggedValue arrayBuffer = BuiltinsArrayBuffer::AllocateArrayBuffer(thread, bufferConstructor, in… in BuiltinsArrayBufferCloneArrayBufferFuzzTest() local
60 BuiltinsArrayBuffer::CloneArrayBuffer(thread, JSHandle<JSTaggedValue>(thread, arrayBuffer), in BuiltinsArrayBufferCloneArrayBufferFuzzTest()
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_arraybuffer.cpp242 JSHandle<JSArrayBuffer> arrayBuffer(obj); in AllocateArrayBuffer() local
244 factory->NewJSArrayBufferData(arrayBuffer, arrayByteLength); in AllocateArrayBuffer()
246 arrayBuffer->SetArrayBufferByteLength(arrayByteLength); in AllocateArrayBuffer()
248 return arrayBuffer.GetTaggedValue(); in AllocateArrayBuffer()
252 bool BuiltinsArrayBuffer::IsDetachedBuffer(JSTaggedValue arrayBuffer) in IsDetachedBuffer() argument
254 if (arrayBuffer.IsByteArray()) { in IsDetachedBuffer()
258 ASSERT(arrayBuffer.IsArrayBuffer() || arrayBuffer.IsSharedArrayBuffer()); in IsDetachedBuffer()
259 JSArrayBuffer *buffer = JSArrayBuffer::Cast(arrayBuffer.GetTaggedObject()); in IsDetachedBuffer()
729 JSArrayBuffer *arrayBuffer = JSArrayBuffer::Cast(arrBuf.GetTaggedObject()); in GetDataPointFromBuffer() local
730 if (arrayBuffer->GetArrayBufferByteLength() == 0) { in GetDataPointFromBuffer()
[all …]
Dbuiltins_atomics.cpp169 …JSHandle<JSTaggedValue> arrayBuffer(thread, AtomicHelper::ValidateIntegerTypedArray(thread, array,… in Wait() local
173 if (!arrayBuffer->IsSharedArrayBuffer()) { in Wait()
220 res = DoWait<int64_t>(thread, arrayBuffer, indexedPosition, v, t); in Wait()
223 res = DoWait<int32_t>(thread, arrayBuffer, indexedPosition, static_cast<int32_t>(v), t); in Wait()
247 …JSHandle<JSTaggedValue> arrayBuffer(thread, AtomicHelper::ValidateIntegerTypedArray(thread, array,… in Notify() local
268 if (!arrayBuffer->IsSharedArrayBuffer()) { in Notify()
271 return JSTaggedValue(Signal(arrayBuffer, indexedPosition, c)); in Notify()
516 WaitResult BuiltinsAtomics::DoWait(JSThread *thread, JSHandle<JSTaggedValue> &arrayBuffer, in DoWait() argument
521 void *buffer = BuiltinsArrayBuffer::GetDataPointFromBuffer(arrayBuffer.GetTaggedValue()); in DoWait()
566 uint32_t BuiltinsAtomics::Signal(JSHandle<JSTaggedValue> &arrayBuffer, const size_t &index, double … in Signal() argument
[all …]
Dbuiltins_sharedarraybuffer.h37 static bool IsShared(JSTaggedValue arrayBuffer);
Dbuiltins_atomics.h54 …static uint32_t Signal(JSHandle<JSTaggedValue> &arrayBuffer, const size_t &index, double wakeCount…
56 static WaitResult DoWait(JSThread *thread, JSHandle<JSTaggedValue> &arrayBuffer,
Dbuiltins_sharedarraybuffer.cpp81 bool BuiltinsSharedArrayBuffer::IsShared(JSTaggedValue arrayBuffer) in IsShared() argument
83 if (!arrayBuffer.IsSharedArrayBuffer()) { in IsShared()
86 JSArrayBuffer *buffer = JSArrayBuffer::Cast(arrayBuffer.GetTaggedObject()); in IsShared()
Dbuiltins_arraybuffer.h56 static bool IsDetachedBuffer(JSTaggedValue arrayBuffer);
/arkcompiler/ets_runtime/ecmascript/
Djs_serializer.cpp794 JSHandle<JSArrayBuffer> arrayBuffer = JSHandle<JSArrayBuffer>::Cast(value); in WriteJSArrayBuffer() local
795 if (arrayBuffer->IsDetach()) { in WriteJSArrayBuffer()
798 bool shared = arrayBuffer->GetShared(); in WriteJSArrayBuffer()
818 bool withNativeAreaAllocator = arrayBuffer->GetWithNativeAreaAllocator(); in WriteJSArrayBuffer()
824 uint32_t arrayLength = arrayBuffer->GetArrayBufferByteLength(); in WriteJSArrayBuffer()
831 JSHandle<JSNativePointer> np(thread_, arrayBuffer->GetArrayBufferData()); in WriteJSArrayBuffer()
844 arrayBuffer->Detach(thread_, withNativeAreaAllocator); in WriteJSArrayBuffer()
1771 JSHandle<JSArrayBuffer> arrayBuffer; in ReadJSArrayBuffer() local
1774 arrayBuffer = factory_->NewJSArrayBuffer(0); in ReadJSArrayBuffer()
1775 arrayBuffer->SetShared(shared); in ReadJSArrayBuffer()
[all …]
Djs_typed_array.cpp716 … JSHandle<JSArrayBuffer> arrayBuffer = thread->GetEcmaVM()->GetFactory()->NewJSArrayBuffer(length); in GetOffHeapBuffer() local
721 JSTaggedValue data = arrayBuffer->GetArrayBufferData(); in GetOffHeapBuffer()
726 typedArray->SetViewedArrayBufferOrByteArray(thread, arrayBuffer.GetTaggedValue()); in GetOffHeapBuffer()
729 return arrayBuffer.GetTaggedValue(); in GetOffHeapBuffer()
Dobject_factory.cpp280 JSHandle<JSArrayBuffer> arrayBuffer(NewJSObjectByConstructor(constructor)); in NewJSArrayBuffer() local
281 arrayBuffer->SetArrayBufferByteLength(length); in NewJSArrayBuffer()
290 arrayBuffer->SetArrayBufferData(thread_, pointer.GetTaggedValue()); in NewJSArrayBuffer()
291 arrayBuffer->SetWithNativeAreaAllocator(true); in NewJSArrayBuffer()
293 return arrayBuffer; in NewJSArrayBuffer()
302 JSHandle<JSArrayBuffer> arrayBuffer(NewJSObjectByConstructor(constructor)); in NewJSArrayBuffer() local
304 arrayBuffer->SetArrayBufferByteLength(length); in NewJSArrayBuffer()
307 arrayBuffer->SetArrayBufferData(thread_, pointer.GetTaggedValue()); in NewJSArrayBuffer()
308 arrayBuffer->SetShared(share); in NewJSArrayBuffer()
309 arrayBuffer->SetWithNativeAreaAllocator(deleter == NativeAreaAllocator::FreeBufferFunc && in NewJSArrayBuffer()
[all …]
/arkcompiler/ets_runtime/ecmascript/napi/
Djsnapi.cpp2069 JSHandle<JSArrayBuffer> arrayBuffer = factory->NewJSArrayBuffer(length); in New() local
2070 return JSNApiHelper::ToLocal<ArrayBufferRef>(JSHandle<JSTaggedValue>(arrayBuffer)); in New()
2078 JSHandle<JSArrayBuffer> arrayBuffer = in New() local
2080 return JSNApiHelper::ToLocal<ArrayBufferRef>(JSHandle<JSTaggedValue>(arrayBuffer)); in New()
2086 JSHandle<JSArrayBuffer> arrayBuffer(JSNApiHelper::ToJSHandle(this)); in ByteLength() local
2087 LOG_IF_SPECIAL(arrayBuffer, FATAL); in ByteLength()
2088 return arrayBuffer->GetArrayBufferByteLength(); in ByteLength()
2093 JSHandle<JSArrayBuffer> arrayBuffer(JSNApiHelper::ToJSHandle(this)); in GetBuffer() local
2094 LOG_IF_SPECIAL(arrayBuffer, FATAL); in GetBuffer()
2095 JSTaggedValue bufferData = arrayBuffer->GetArrayBufferData(); in GetBuffer()
[all …]
/arkcompiler/ets_runtime/ecmascript/napi/include/
Djsnapi.h812 …static Local<DataViewRef> New(const EcmaVM *vm, Local<ArrayBufferRef> arrayBuffer, uint32_t byteOf…
/arkcompiler/ets_frontend/es2panda/test/compiler/js/
Dcocos_worker_test.js6339 this.arrayBuffer = function() {