| /arkcompiler/ets_runtime/test/fuzztest/jsvaluereffoundationvalue_fuzzer/ |
| D | jsvaluereffoundationvalue_fuzzer.cpp | 36 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefFoundationValueFuzzTest() local 55 Local<IntegerRef> intValue = IntegerRef::New(vm, key); in JSValueRefFoundationValueFuzzTest() 56 Local<NumberRef> resUnit32 = NumberRef::New(vm, inputUnit32); in JSValueRefFoundationValueFuzzTest() 57 Local<BooleanRef> resBool = BooleanRef::New(vm, inputBool); in JSValueRefFoundationValueFuzzTest() 58 Local<StringRef> stringUtf8 = StringRef::NewFromUtf8(vm, inputStr.data()); in JSValueRefFoundationValueFuzzTest() 59 Local<JSValueRef> tag = IntegerRef::New(vm, key); in JSValueRefFoundationValueFuzzTest() 60 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, bufferSize); in JSValueRefFoundationValueFuzzTest() 61 Local<Uint32ArrayRef> typedArray = Uint32ArrayRef::New(vm, ref, byteOffset, length); in JSValueRefFoundationValueFuzzTest() 62 Local<FunctionRef> obj(FunctionRef::NewClassFunction(vm, nativeFunc, deleter, ptr)); in JSValueRefFoundationValueFuzzTest() 63 Local<DateRef> dateRef = DateRef::New(vm, timeRef); in JSValueRefFoundationValueFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/napi/include/ |
| D | dfx_jsnapi.h | 65 const EcmaVM *vm; member 72 …// isVmMode means the internal class in vm is visible. isPrivate means the number and string is no… 73 …static void DumpHeapSnapshot(const EcmaVM *vm, const std::string &path, const DumpSnapShotOption &… 75 …static void DumpHeapSnapshot(const EcmaVM *vm, Stream *stream, const DumpSnapShotOption &dumpOptio… 78 static void DumpCpuProfile(const EcmaVM *vm); 79 static void DumpHeapSnapshot(const EcmaVM *vm, const DumpSnapShotOption &dumpOption); 80 …static void DumpHeapSnapshot(const EcmaVM *vm, const DumpSnapShotOption &dumpOption, uint32_t tid); 81 …static void DumpHeapSnapshotWithVm(const EcmaVM *vm, const DumpSnapShotOption &dumpOption, uint32_… 82 static void TriggerGC(const EcmaVM *vm, uint32_t tid); 83 static void TriggerGCWithVm(const EcmaVM *vm); [all …]
|
| D | jsnapi_expo.h | 123 using TimerTaskCallback = void* (*)(EcmaVM *vm, void *data, TimerCallbackFunc func, uint64_t timeou… 263 Local(const EcmaVM *vm, const Global<T> ¤t); 265 Local(const EcmaVM *vm, const CopyableGlobal<T> ¤t); 355 CopyableGlobal(const EcmaVM *vm, const Local<S> ¤t); 357 CopyableGlobal(const EcmaVM *vm, const Local<T> ¤t); 453 Global(const EcmaVM *vm, const Local<S> ¤t); 455 Global(const EcmaVM *vm, const Global<S> ¤t); 467 Local<T> ToLocal(const EcmaVM *vm) const in ToLocal() argument 469 return Local<T>(vm, *this); in ToLocal() 520 static Local<PrimitiveRef> Undefined(const EcmaVM *vm); [all …]
|
| /arkcompiler/toolchain/tooling/dynamic/backend/ |
| D | debugger_executor.cpp | 22 void DebuggerExecutor::Initialize(const EcmaVM *vm) in Initialize() argument 24 [[maybe_unused]] EcmaHandleScope handleScope(vm->GetJSThread()); in Initialize() 25 Local<ObjectRef> globalObj = JSNApi::GetGlobalObject(vm); in Initialize() 26 SetEvaluateToGlobal(vm, globalObj); in Initialize() 29 void DebuggerExecutor::SetEvaluateToGlobal(const EcmaVM *vm, Local<ObjectRef> &globalObj) in SetEvaluateToGlobal() argument 31 auto setStr = StringRef::NewFromUtf8(vm, "debuggerSetValue"); in SetEvaluateToGlobal() 32 auto getStr = StringRef::NewFromUtf8(vm, "debuggerGetValue"); in SetEvaluateToGlobal() 33 if (!globalObj->Has(vm, setStr) || !globalObj->Has(vm, getStr)) { in SetEvaluateToGlobal() 34 globalObj->Set(vm, setStr, FunctionRef::New( in SetEvaluateToGlobal() 35 const_cast<panda::EcmaVM*>(vm), DebuggerExecutor::DebuggerSetValue)); in SetEvaluateToGlobal() [all …]
|
| /arkcompiler/toolchain/tooling/dynamic/ |
| D | debugger_service.cpp | 23 void InitializeDebugger(::panda::ecmascript::EcmaVM *vm, in InitializeDebugger() argument 26 if (vm == nullptr || vm->GetJsDebuggerManager() == nullptr) { in InitializeDebugger() 27 LOG_DEBUGGER(DEBUG) << "VM has already been destroyed"; in InitializeDebugger() 30 ProtocolHandler *handler = vm->GetJsDebuggerManager()->GetDebuggerHandler(); in InitializeDebugger() 35 vm->GetJsDebuggerManager()->SetDebuggerHandler(new ProtocolHandler(onResponse, vm)); in InitializeDebugger() 38 void UninitializeDebugger(::panda::ecmascript::EcmaVM *vm) in UninitializeDebugger() argument 40 if (vm == nullptr || vm->GetJsDebuggerManager() == nullptr) { in UninitializeDebugger() 41 LOG_DEBUGGER(DEBUG) << "VM has already been destroyed"; in UninitializeDebugger() 44 ProtocolHandler *handler = vm->GetJsDebuggerManager()->GetDebuggerHandler(); in UninitializeDebugger() 46 vm->GetJsDebuggerManager()->SetDebuggerHandler(nullptr); in UninitializeDebugger() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | ecma_handle_scope.cpp | 26 auto vm = thread_->GetEcmaVM(); in EcmaHandleScope() local 27 OpenHandleScope(vm); in EcmaHandleScope() 28 OpenPrimitiveScope(vm); in EcmaHandleScope() 30 auto heapProfiler = reinterpret_cast<HeapProfiler *>(HeapProfilerInterface::GetInstance(vm)); in EcmaHandleScope() 36 void EcmaHandleScope::OpenHandleScope(EcmaVM *vm) in OpenHandleScope() argument 38 prevNext_ = vm->GetHandleScopeStorageNext(); in OpenHandleScope() 39 prevEnd_ = vm->GetHandleScopeStorageEnd(); in OpenHandleScope() 40 prevHandleStorageIndex_ = vm->GetCurrentHandleStorageIndex(); in OpenHandleScope() 43 void EcmaHandleScope::OpenPrimitiveScope(EcmaVM *vm) in OpenPrimitiveScope() argument 45 prevPrimitiveNext_ = vm->GetPrimitiveScopeStorageNext(); in OpenPrimitiveScope() [all …]
|
| D | ecma_string_table_optimization.cpp | 88 EcmaString* EcmaStringTableImpl<Traits>::GetOrInternFlattenString(EcmaVM* vm, EcmaString* string) in GetOrInternFlattenString() argument 94 JSThread *thread = vm->GetAssociatedJSThread(); in GetOrInternFlattenString() 121 EcmaString* EcmaStringTableImpl<Traits>::GetOrInternFlattenStringNoGC(EcmaVM* vm, EcmaString* strin… in GetOrInternFlattenStringNoGC() argument 127 JSThread *thread = vm->GetAssociatedJSThread(); in GetOrInternFlattenStringNoGC() 144 ThreadType* holder = GetThreadHolder(vm->GetJSThread()); in GetOrInternFlattenStringNoGC() 155 EcmaVM* vm, const JSHandle<EcmaString>& string, uint32_t offset, uint32_t utf8Len) in GetOrInternStringFromCompressedSubString() argument 159 JSThread *thread = vm->GetAssociatedJSThread(); in GetOrInternStringFromCompressedSubString() 167 ThreadType* holder = GetThreadHolder(vm->GetJSThread()); in GetOrInternStringFromCompressedSubString() 170 [vm, string, offset, utf8Len, hashcode]() -> common::ReadOnlyHandle<BaseString> { in GetOrInternStringFromCompressedSubString() 171 …EcmaString* str = EcmaStringAccessor::CreateFromUtf8CompressedSubString(vm, string, offset, utf8Le… in GetOrInternStringFromCompressedSubString() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/js_vm/ |
| D | main.cpp | 46 bool IsEqual(EcmaVM *vm, Local<JSValueRef> jsArg0, Local<JSValueRef> jsArg1) in IsEqual() argument 48 if (jsArg0->IsStrictEquals(vm, jsArg1)) { in IsEqual() 50 } else if ((jsArg0->IsJSArray(vm) && jsArg1->IsJSArray(vm))) { in IsEqual() 53 uint32_t length = arr0->Length(vm); in IsEqual() 54 if (length != arr1->Length(vm)) { in IsEqual() 58 Local<JSValueRef> arg0 = ArrayRef::GetValueAt(vm, arr0, i); in IsEqual() 59 Local<JSValueRef> arg1 = ArrayRef::GetValueAt(vm, arr1, i); in IsEqual() 60 if (!IsEqual(vm, arg0, arg1)) { in IsEqual() 71 EcmaVM *vm = runtimeInfo->GetVM(); in TestEnd() local 73 return JSValueRef::Undefined(vm); in TestEnd() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/napi/ |
| D | dfx_jsnapi.cpp | 67 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] const std::str… in DumpHeapSnapshot() argument 73 DumpHeapSnapshot(vm, &stream, dumpOption, nullptr, callback); in DumpHeapSnapshot() 83 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] Stream *stream, in DumpHeapSnapshot() argument 90 const_cast<EcmaVM *>(vm)); in DumpHeapSnapshot() 114 void DFXJSNApi::DumpCpuProfile([[maybe_unused]] const EcmaVM *vm) in DumpCpuProfile() argument 117 vm->GetJSThread()->PrintMegaICStat(); in DumpCpuProfile() 123 if (DFXJSNApi::StopCpuProfilerForColdStart(vm)) { in DumpCpuProfile() 128 if (DFXJSNApi::CpuProfilerSamplingAnyTime(vm)) { in DumpCpuProfile() 138 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, in DumpHeapSnapshot() argument 144 auto &options = const_cast<EcmaVM *>(vm)->GetJSOptions(); in DumpHeapSnapshot() [all …]
|
| D | jsnapi_expo.cpp | 213 Local<PrimitiveRef> JSValueRef::Undefined(const EcmaVM *vm) in Undefined() argument 216 vm->GetJSThread()->GlobalConstants()->GetHandledUndefined()); in Undefined() 219 Local<PrimitiveRef> JSValueRef::Null(const EcmaVM *vm) in Null() argument 222 vm->GetJSThread()->GlobalConstants()->GetHandledNull()); in Null() 225 Local<PrimitiveRef> JSValueRef::Hole(const EcmaVM *vm) in Hole() argument 228 vm->GetJSThread()->GlobalConstants()->GetHandledHole()); in Hole() 231 Local<PrimitiveRef> JSValueRef::True(const EcmaVM *vm) in True() argument 234 vm->GetJSThread()->GlobalConstants()->GetHandledTrue()); in True() 237 Local<PrimitiveRef> JSValueRef::False(const EcmaVM *vm) in False() argument 240 vm->GetJSThread()->GlobalConstants()->GetHandledFalse()); in False() [all …]
|
| D | jsnapi.cpp | 49 … bool StartDebug(const std::string& componentName, void* vm, bool isDebugMode, int32_t instanceId, 51 void StopDebug(void* vm); 52 void WaitForDebugger(void* vm); 145 …const EcmaVM *vm, Local<ArrayBufferRef> buffer, int32_t byteOffset, int32_t length) \ 147 …CROSS_THREAD_AND_EXCEPTION_CHECK_WITH_RETURN(vm, JSValueRef::Undefined(vm)); \ 148 …ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); \ 149 …JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); \ 157 …RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm)); \ 160 …RETURN_VALUE_IF_ABRUPT(thread, JSValueRef::Undefined(vm)); \ 171 …const EcmaVM *vm, Local<SendableArrayBufferRef> buffer, int32_t byteOffset, int32_t length) \ [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefismodulenamespace_fuzzer/ |
| D | jsvaluerefismodulenamespace_fuzzer.cpp | 44 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsModuleNamespaceObjectFuzztest() local 46 JsiFastNativeScope scope(vm); in IsModuleNamespaceObjectFuzztest() 47 ObjectFactory *objectFactory = vm->GetFactory(); in IsModuleNamespaceObjectFuzztest() 50 …SourceTextModule::AddLocalExportEntry(vm->GetJSThread(), module, localExportEntry1, 0, ERROR_TYPE_… in IsModuleNamespaceObjectFuzztest() 52 …SourceTextModule::AddLocalExportEntry(vm->GetJSThread(), module, localExportEntry2, 1, ERROR_TYPE_… in IsModuleNamespaceObjectFuzztest() 53 …JSHandle<TaggedArray> localExportEntries(vm->GetJSThread(), module->GetLocalExportEntries(vm->GetJ… in IsModuleNamespaceObjectFuzztest() 56 ModuleManager *moduleManager = vm->GetJSThread()->GetModuleManager(); in IsModuleNamespaceObjectFuzztest() 58 JSHandle<ModuleNamespace> np = ModuleNamespace::ModuleNamespaceCreate(vm->GetJSThread(), in IsModuleNamespaceObjectFuzztest() 63 moduleNamespace->IsModuleNamespaceObject(vm); in IsModuleNamespaceObjectFuzztest() 65 JSNApi::DestroyJSVM(vm); in IsModuleNamespaceObjectFuzztest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/napi/test/ |
| D | jsnapi_sample.cpp | 434 static std::vector<Local<SymbolRef>> GetSymbolRef(EcmaVM *vm) in GetSymbolRef() argument 437 …static std::vector<Local<SymbolRef>> value = { SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symb… in GetSymbolRef() 438 … SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symbolKey2")), in GetSymbolRef() 439 … SymbolRef::New(vm, StringRef::NewFromUtf8(vm, "symbolKey3")) }; in GetSymbolRef() 527 void ObjectRefSet(Local<ObjectRef> object, EcmaVM *vm, Local<SymbolRef> symbol) in ObjectRefSet() argument 531 bool b = object->Set(vm, cnt, StringRef::NewFromUtf8(vm, "TestValue1")); in ObjectRefSet() 533 …b = object->Set(vm, StringRef::NewFromUtf8(vm, "Test2"), StringRef::NewFromUtf8(vm, "TestValue2")); in ObjectRefSet() 535 …b = object->Set(vm, StringRef::NewFromUtf8(vm, "Test3"), StringRef::NewFromUtf8(vm, "TestValue3")); in ObjectRefSet() 537 b = object->Set(vm, symbol, StringRef::NewFromUtf8(vm, "symbolValue")); in ObjectRefSet() 540 Local<FunctionRef> getter1 = FunctionRef::New(vm, Getter1); in ObjectRefSet() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| D | builtins_lazy_callback.cpp | 26 EcmaVM *vm = thread->GetEcmaVM(); in Date() local 27 ObjectFactory *factory = vm->GetFactory(); in Date() 28 auto env = vm->GetGlobalEnv(); in Date() 32 Builtins builtin(thread, factory, vm); in Date() 41 EcmaVM *vm = thread->GetEcmaVM(); in Set() local 42 ObjectFactory *factory = vm->GetFactory(); in Set() 43 auto env = vm->GetGlobalEnv(); in Set() 46 Builtins builtin(thread, factory, vm); in Set() 56 EcmaVM *vm = thread->GetEcmaVM(); in Map() local 57 ObjectFactory *factory = vm->GetFactory(); in Map() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/cross_vm/ |
| D | jsnapi_expo_hybrid.cpp | 33 Local<StringRef> StringRef::GetProxyNapiWrapperString(const EcmaVM *vm) in GetProxyNapiWrapperString() argument 37 CROSS_THREAD_CHECK(vm); in GetProxyNapiWrapperString() 43 Local<ObjectRef> ObjectRef::NewJSXRefObject(const EcmaVM *vm) in NewJSXRefObject() argument 45 CROSS_THREAD_AND_EXCEPTION_CHECK_WITH_RETURN(vm, JSValueRef::Undefined(vm)); in NewJSXRefObject() 47 ObjectFactory *factory = vm->GetFactory(); in NewJSXRefObject() 52 void JSNApi::SetStackInfo(const EcmaVM *vm, const panda::StackInfo &info) in SetStackInfo() argument 54 JSThread *thread = vm->GetJSThread(); in SetStackInfo() 59 panda::StackInfo JSNApi::GetStackInfo(const EcmaVM *vm) in GetStackInfo() argument 61 JSThread *thread = vm->GetJSThread(); in GetStackInfo() 67 uintptr_t JSNApi::GetXRefGlobalHandleAddr(const EcmaVM *vm, uintptr_t localAddress) in GetXRefGlobalHandleAddr() argument [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisarray_fuzzer/ |
| D | jsvaluerefisarray_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsInt8ArrayFuzztest() local 34 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsInt8ArrayFuzztest() 35 Local<JSValueRef> typedArray = Int8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsInt8ArrayFuzztest() 36 typedArray->IsInt8Array(vm); in IsInt8ArrayFuzztest() 37 JSNApi::DestroyJSVM(vm); in IsInt8ArrayFuzztest() 44 EcmaVM *vm = JSNApi::CreateJSVM(option); in IsUint8ArrayFuzztest() local 50 …Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, (void *)data, (int32_t)size, deleter, … in IsUint8ArrayFuzztest() 51 Local<JSValueRef> typedArray = Uint8ArrayRef::New(vm, arrayBuffer, 0, (int32_t)size); in IsUint8ArrayFuzztest() 52 typedArray->IsUint8Array(vm); in IsUint8ArrayFuzztest() 53 JSNApi::DestroyJSVM(vm); in IsUint8ArrayFuzztest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | unified_gc_test.cpp | 42 EcmaVM *vm = thread->GetEcmaVM(); in HWTEST_F_L0() local 43 …JSHandle<TaggedArray> weakRefArray = vm->GetFactory()->NewTaggedArray(INT_VALUE_2, JSTaggedValue::… in HWTEST_F_L0() 44 vm->SetEnableForceGC(false); in HWTEST_F_L0() 55 vm->CollectGarbage(TriggerGCType::FULL_GC); in HWTEST_F_L0() 58 vm->SetEnableForceGC(true); in HWTEST_F_L0() 64 EcmaVM *vm = thread->GetEcmaVM(); in HWTEST_F_L0() local 68 CrossVMOperator::DoHandshake(vm, stsVMInterface.get(), &ecmaVMInterface); in HWTEST_F_L0() 70 EXPECT_TRUE(vm->GetCrossVMOperator()->GetSTSVMInterface() == stsVMInterface.get()); in HWTEST_F_L0() 71 EXPECT_TRUE(vm->GetCrossVMOperator()->GetEcmaVMInterface() == in HWTEST_F_L0() 77 EcmaVM *vm = thread->GetEcmaVM(); in HWTEST_F_L0() local [all …]
|
| D | unified_gc_multi_vm_test.cpp | 58 CrossVMOperator::DoHandshake(vm, stsVMInterface, &ecmaVMInterface); in DoHandShakeTest() 60 EXPECT_TRUE(vm->GetCrossVMOperator()->GetSTSVMInterface() == stsVMInterface); in DoHandShakeTest() 61 EXPECT_TRUE(vm->GetCrossVMOperator()->GetEcmaVMInterface() == in DoHandShakeTest() 82 CrossVMOperator::DoHandshake(vm, stsVMInterface, &ecmaVMInterface); in CheckUnifiedGCResultTest() 84 CrossReferenceObjectBuilder CrossReferenceObject(vm, thread); in CheckUnifiedGCResultTest() 97 CrossVMOperator::DoHandshake(vm, stsVMInterface, &ecmaVMInterface); in TriggerConcurrentMarkTest() 99 CrossReferenceObjectBuilder CrossReferenceObject(vm, thread); in TriggerConcurrentMarkTest() 100 auto heap = vm->GetHeap(); in TriggerConcurrentMarkTest() 114 CrossVMOperator::DoHandshake(vm, stsVMInterface, &ecmaVMInterface); in TriggerYoungGCTest() 116 CrossReferenceObjectBuilder CrossReferenceObject(vm, thread); in TriggerYoungGCTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/promiseref_fuzzer/ |
| D | promiseref_fuzzer.cpp | 33 EcmaVM *vm = JSNApi::CreateJSVM(option); in PromiseRefCatchFuzzTest() local 38 Local<PromiseCapabilityRef> capability = PromiseCapabilityRef::New(vm); in PromiseRefCatchFuzzTest() 39 Local<PromiseRef> promise = capability->GetPromise(vm); in PromiseRefCatchFuzzTest() 41 Local<FunctionRef> reject = FunctionRef::New(vm, RejectCallback); in PromiseRefCatchFuzzTest() 42 promise->Catch(vm, reject); in PromiseRefCatchFuzzTest() 43 JSNApi::DestroyJSVM(vm); in PromiseRefCatchFuzzTest() 54 EcmaVM *vm = JSNApi::CreateJSVM(option); in PromiseRefThenFinallyFuzzTest() local 59 Local<PromiseCapabilityRef> capability = PromiseCapabilityRef::New(vm); in PromiseRefThenFinallyFuzzTest() 60 Local<PromiseRef> promise = capability->GetPromise(vm); in PromiseRefThenFinallyFuzzTest() 62 Local<FunctionRef> reject = FunctionRef::New(vm, RejectCallback); in PromiseRefThenFinallyFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/containerslinkedlistcommon_fuzzer/ |
| D | containerslinkedlistcommon_fuzzer.h | 111 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListAddFuzzTest() local 113 JsiFastNativeScope scope(vm); in ContainersLinkedListAddFuzzTest() 114 auto thread = vm->GetAssociatedJSThread(); in ContainersLinkedListAddFuzzTest() 129 JSNApi::DestroyJSVM(vm); in ContainersLinkedListAddFuzzTest() 136 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListGetFirstFuzzTest() local 138 JsiFastNativeScope scope(vm); in ContainersLinkedListGetFirstFuzzTest() 139 auto thread = vm->GetAssociatedJSThread(); in ContainersLinkedListGetFirstFuzzTest() 159 JSNApi::DestroyJSVM(vm); in ContainersLinkedListGetFirstFuzzTest() 166 EcmaVM *vm = JSNApi::CreateJSVM(option); in ContainersLinkedListGetLastFuzzTest() local 168 JsiFastNativeScope scope(vm); in ContainersLinkedListGetLastFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisasync_fuzzer/ |
| D | jsvaluerefisasync_fuzzer.cpp | 36 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsAsyncGeneratorFunctionTrueFuzzTest() local 38 JsiFastNativeScope scope(vm); in JSValueRefIsAsyncGeneratorFunctionTrueFuzzTest() 40 ObjectFactory *factory = vm->GetFactory(); in JSValueRefIsAsyncGeneratorFunctionTrueFuzzTest() 46 [[maybe_unused]] auto it = object->IsAsyncGeneratorFunction(vm); in JSValueRefIsAsyncGeneratorFunctionTrueFuzzTest() 48 JSNApi::DestroyJSVM(vm); in JSValueRefIsAsyncGeneratorFunctionTrueFuzzTest() 57 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsAsyncGeneratorFunctionFalseFuzzTest() local 58 Local<JSValueRef> object = IntegerRef::New(vm, arkProp); in JSValueRefIsAsyncGeneratorFunctionFalseFuzzTest() 59 object->IsAsyncGeneratorFunction(vm); in JSValueRefIsAsyncGeneratorFunctionFalseFuzzTest() 60 JSNApi::DestroyJSVM(vm); in JSValueRefIsAsyncGeneratorFunctionFalseFuzzTest() 69 EcmaVM *vm = JSNApi::CreateJSVM(option); in JSValueRefIsAsyncGeneratorObjectTrueFuzzTest() local [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/bufferrefnew_fuzzer/ |
| D | bufferrefnew_fuzzer.cpp | 28 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefNewFuzzTest() local 33 BufferRef::New(vm, (int32_t)size); in BufferRefNewFuzzTest() 34 JSNApi::DestroyJSVM(vm); in BufferRefNewFuzzTest() 45 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefMultiParamNewFuzzTest() local 47 BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); in BufferRefMultiParamNewFuzzTest() 48 JSNApi::DestroyJSVM(vm); in BufferRefMultiParamNewFuzzTest() 55 EcmaVM *vm = JSNApi::CreateJSVM(option); in BufferRefByteLengthFuzzTest() local 61 … Local<BufferRef> buffer = BufferRef::New(vm, (void *)data, (int32_t)size, deleter, (void *)data); in BufferRefByteLengthFuzzTest() 62 buffer->ByteLength(vm); in BufferRefByteLengthFuzzTest() 63 JSNApi::DestroyJSVM(vm); in BufferRefByteLengthFuzzTest() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/vm_ops/ |
| D | ani_get_created_virtual_machines_test.cpp | 45 ani_vm *vm = nullptr; in TEST_F() local 51 ASSERT_EQ(ANI_CreateVM(&optionsPtr, ANI_VERSION_1, &vm), ANI_OK); in TEST_F() 53 vm = nullptr; in TEST_F() 57 ASSERT_EQ(ANI_GetCreatedVMs(&vm, 0, &size), ANI_INVALID_ARGS); in TEST_F() 58 ASSERT_EQ(ANI_GetCreatedVMs(&vm, bufferSize, nullptr), ANI_INVALID_ARGS); in TEST_F() 59 ASSERT_EQ(ANI_GetCreatedVMs(&vm, bufferSize, &size), ANI_OK); in TEST_F() 60 ASSERT_NE(vm, nullptr); in TEST_F() 62 ASSERT_EQ(vm->DestroyVM(), ANI_OK) << "Cannot destroy ANI VM"; in TEST_F() 63 ASSERT_EQ(ANI_GetCreatedVMs(&vm, bufferSize, &size), ANI_OK); in TEST_F() 69 ani_vm *vm = nullptr; in TEST_F() local [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/objectgetinformation_fuzzer/ |
| D | objectgetinformation_fuzzer.cpp | 30 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectGetAllPropertyNamesFuzzTest() local 36 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectGetAllPropertyNamesFuzzTest() 38 object->SetNativePointerField(vm, index, ptr1, callBack, ptr2); in ObjectGetAllPropertyNamesFuzzTest() 39 object->GetAllPropertyNames(vm, index); in ObjectGetAllPropertyNamesFuzzTest() 40 JSNApi::DestroyJSVM(vm); in ObjectGetAllPropertyNamesFuzzTest() 48 EcmaVM *vm = JSNApi::CreateJSVM(option); in ObjectGetNativePointerFieldCountFuzzTest() local 50 Local<ObjectRef> object = ObjectRef::New(vm); in ObjectGetNativePointerFieldCountFuzzTest() 51 object->SetNativePointerFieldCount(vm, key); in ObjectGetNativePointerFieldCountFuzzTest() 52 object->GetNativePointerFieldCount(vm); in ObjectGetNativePointerFieldCountFuzzTest() 53 JSNApi::DestroyJSVM(vm); in ObjectGetNativePointerFieldCountFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/exceptionclass_fuzzer/ |
| D | exceptionclass_fuzzer.cpp | 30 EcmaVM *vm = JSNApi::CreateJSVM(option); in ExpectionErrorFuzzTest() local 35 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ExpectionErrorFuzzTest() 36 [[maybe_unused]]Local<JSValueRef> error = Exception::Error(vm, message); in ExpectionErrorFuzzTest() 37 JSNApi::DestroyJSVM(vm); in ExpectionErrorFuzzTest() 44 EcmaVM *vm = JSNApi::CreateJSVM(option); in ExpectionRangeErrorFuzzTest() local 49 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ExpectionRangeErrorFuzzTest() 50 [[maybe_unused]]Local<JSValueRef> error = Exception::RangeError(vm, message); in ExpectionRangeErrorFuzzTest() 51 JSNApi::DestroyJSVM(vm); in ExpectionRangeErrorFuzzTest() 58 EcmaVM *vm = JSNApi::CreateJSVM(option); in ReferenceErrorFuzzTest() local 63 Local<StringRef> message = StringRef::NewFromUtf8(vm, (char*)data, (int)size); in ReferenceErrorFuzzTest() [all …]
|