Home
last modified time | relevance | path

Searched refs:vm_ (Results 1 - 25 of 152) sorted by relevance

1234567

/arkcompiler/ets_runtime/ecmascript/napi/test/
H A Djsnapi_sendable_tests.cpp39 vm_ = JSNApi::CreateJSVM(option);
40 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
41 thread_ = vm_->GetJSThread();
42 vm_->SetEnableForceGC(true);
44 staticKey = StringRef::NewFromUtf8(vm_, "static");
45 nonStaticKey = StringRef::NewFromUtf8(vm_, "nonStatic");
46 instanceKey = StringRef::NewFromUtf8(vm_, "instance");
47 getterSetterKey = StringRef::NewFromUtf8(vm_, "getterSetter");
48 invalidKey = StringRef::NewFromUtf8(vm_, "invalid");
54 vm_
88 EcmaVM *vm_ = nullptr; global() local
[all...]
H A Djsnapi_second_tests.cpp98 vm_ = JSNApi::CreateJSVM(option);
99 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
100 thread_ = vm_->GetJSThread();
101 vm_->SetEnableForceGC(true);
108 vm_->SetEnableForceGC(false);
109 JSNApi::DestroyJSVM(vm_);
114 LocalScope scope(vm_); in TestNumberRef()
115 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
126 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
128 ASSERT_EQ(obj->Int32Value(vm_), va in TestNumberRef()
141 EcmaVM *vm_ = nullptr; global() local
[all...]
H A Djsnapi_first_tests.cpp92 vm_ = JSNApi::CreateJSVM(option);
93 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
94 thread_ = vm_->GetJSThread();
95 vm_->SetEnableForceGC(true);
102 vm_->SetEnableForceGC(false);
103 JSNApi::DestroyJSVM(vm_);
108 LocalScope scope(vm_); in TestNumberRef()
109 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
120 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
122 ASSERT_EQ(obj->Int32Value(vm_), va in TestNumberRef()
135 EcmaVM *vm_ = nullptr; global() local
[all...]
H A Ddfx_jsnapi_tests.cpp46 TestHelper::CreateEcmaVMWithScope(vm_, thread_, scope_);
47 vm_->GetJSThread()->GetCurrentEcmaContext()->SetRuntimeStatEnable(true);
48 vm_->SetEnableForceGC(false);
53 TestHelper::DestroyEcmaVMWithScope(vm_, scope_);
57 EcmaVM *vm_ {nullptr};
95 DFXJSNApi::DumpHeapSnapshot(vm_, filePath, dumpOption); in HWTEST_F_L0()
128 DFXJSNApi::DumpHeapSnapshot(vm_, &stream, dumpOption, progress); in HWTEST_F_L0()
146 result = DFXJSNApi::BuildNativeAndJsStackTrace(vm_, stackTraceStr); in HWTEST_F_L0()
159 bool result = DFXJSNApi::BuildJsStackTrace(vm_, stackTraceStr); in HWTEST_F_L0()
172 vm_ in HWTEST_F_L0()
[all...]
H A Djsnapi_third_tests.cpp89 vm_ = JSNApi::CreateJSVM(option);
90 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
91 thread_ = vm_->GetJSThread();
92 vm_->SetEnableForceGC(true);
99 vm_->SetEnableForceGC(false);
100 JSNApi::DestroyJSVM(vm_);
105 LocalScope scope(vm_); in TestNumberRef()
106 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
117 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
119 ASSERT_EQ(obj->Int32Value(vm_), va in TestNumberRef()
134 EcmaVM *vm_ = nullptr; global() local
[all...]
H A Djsnapi_sample.cpp57 vm_ = JSNApi::CreateJSVM(option);
58 thread_ = vm_->GetJSThread();
59 vm_->SetEnableForceGC(true);
64 vm_->SetEnableForceGC(false);
65 JSNApi::DestroyJSVM(vm_);
70 EcmaVM *vm_ = nullptr; member in panda::test::JSNApiSampleTest
76 LocalScope scope(vm_); in HWTEST_F_L0()
79 Local<IntegerRef> intObject = IntegerRef::New(vm_, inputInt); in HWTEST_F_L0()
86 Local<IntegerRef> uintObject = IntegerRef::NewFromUnsigned(vm_, inputUint); in HWTEST_F_L0()
93 LocalScope scope(vm_); in HWTEST_F_L0()
[all...]
H A Dffi_workload.cpp128 vm_ = JSNApi::CreateJSVM(option);
129 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
130 thread_ = vm_->GetJSThread();
131 vm_->SetEnableForceGC(true);
137 vm_->SetEnableForceGC(false);
138 JSNApi::DestroyJSVM(vm_);
144 EcmaVM *vm_ = nullptr; member in panda::test::JSNApiSplTest
204 LocalScope scope(vm_); in HWTEST_F_L0()
208 (void)JSValueRef::False(vm_); in HWTEST_F_L0()
216 LocalScope scope(vm_); in HWTEST_F_L0()
1245 ConstructobjectHashMap(const EcmaVM *vm_) ConstructobjectHashMap() argument
1266 ConstructobjectHashSet(const EcmaVM *vm_) ConstructobjectHashSet() argument
1293 ConstructobjectLightWeightMap(const EcmaVM *vm_) ConstructobjectLightWeightMap() argument
1320 ConstructobjectLightWeightSet(const EcmaVM *vm_) ConstructobjectLightWeightSet() argument
[all...]
/arkcompiler/ets_runtime/test/executiontest/
H A Dthread_termination_test.cpp42 TestHelper::CreateEcmaVMWithScope(vm_, thread_, scope_);
47 TestHelper::DestroyEcmaVMWithScope(vm_, scope_);
68 EcmaVM *vm_ {nullptr};
75 explicit TerminatorThread(EcmaVM *vm) : vm_(vm) {} in TerminatorThread()
83 DFXJSNApi::TerminateExecution(vm_); in Run()
91 DFXJSNApi::TerminateExecution(vm_); in RunWithSleep()
101 EcmaVM *vm_ {nullptr};
127 JSThread *thread = vm_->GetAssociatedJSThread(); in HWTEST_F_L0()
129 JSNApi::EnableUserUncaughtErrorHandler(vm_); in HWTEST_F_L0()
130 RegisterGlobalTemplate(vm_, TerminateThrea in HWTEST_F_L0()
[all...]
/arkcompiler/toolchain/tooling/agent/
H A Druntime_impl.cpp147 internalObjects_ = Global<MapRef>(vm_, MapRef::New(vm_)); in Enable()
166 *totalSize = static_cast<double>(DFXJSNApi::GetHeapTotalSize(vm_)); in GetHeapUsage()
167 *usedSize = static_cast<double>(DFXJSNApi::GetHeapUsedSize(vm_)); in GetHeapUsage()
189 Local<JSValueRef> value = Local<JSValueRef>(vm_, iter->second); in GetProperties()
190 if (value.IsEmpty() || !value->IsObject(vm_)) { in GetProperties()
195 if (!internalObjects_.IsEmpty() && internalObjects_->Get(vm_, value)->IsNumber()) { in GetProperties()
196 if (static_cast<ArkInternalValueType>(internalObjects_->Get(vm_, value)->ToNumber(vm_)->Value()) == in GetProperties()
197 ArkInternalValueType::Entry || static_cast<ArkInternalValueType>(internalObjects_->Get(vm_, valu in GetProperties()
[all...]
H A Ddebugger_impl.cpp48 : vm_(vm), frontend_(channel), runtime_(runtime) in DebuggerImpl()
52 jsDebugger_ = DebuggerApi::CreateJSDebugger(vm_); in DebuggerImpl()
58 vm_->GetJsDebuggerManager()->SetLocalScopeUpdater(&updaterFunc_); in DebuggerImpl()
59 vm_->GetJsDebuggerManager()->SetStepperFunc(&stepperFunc_); in DebuggerImpl()
60 vm_->GetJsDebuggerManager()->SetJSReturnNativeFunc(&returnNative_); in DebuggerImpl()
67 vm_->GetJsDebuggerManager()->SetLocalScopeUpdater(nullptr); in ~DebuggerImpl()
68 vm_->GetJsDebuggerManager()->SetStepperFunc(nullptr); in ~DebuggerImpl()
69 vm_->GetJsDebuggerManager()->SetJSReturnNativeFunc(nullptr); in ~DebuggerImpl()
112 frontend_.ScriptParsed(vm_, *script); in NotifyScriptParsed()
135 frontend_.ScriptParsed(vm_, *scrip in SendableScriptParsed()
[all...]
/arkcompiler/ets_runtime/test/fuzztest/maprefgetsetkeyvaluesize_fuzzer/
H A Dmaprefgetsetkeyvaluesize_fuzzer.cpp32 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in Int32GetSizeFuzzerTest() local
41 Local<MapRef> object = MapRef::New(vm_); in Int32GetSizeFuzzerTest()
42 Local<JSValueRef> key = StringRef::NewFromUtf8(vm_, value, (int32_t)size); in Int32GetSizeFuzzerTest()
43 Local<JSValueRef> objectvalue = StringRef::NewFromUtf8(vm_, value, (int32_t)size); in Int32GetSizeFuzzerTest()
44 object->Set(vm_, key, objectvalue); in Int32GetSizeFuzzerTest()
45 object->GetSize(vm_); in Int32GetSizeFuzzerTest()
46 object->GetTotalElements(vm_); in Int32GetSizeFuzzerTest()
47 object->Get(vm_, key); in Int32GetSizeFuzzerTest()
48 object->GetKey(vm_, 0); in Int32GetSizeFuzzerTest()
49 object->GetValue(vm_, in Int32GetSizeFuzzerTest()
[all...]
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/tests/
H A Dpgo_profiler_test.cpp84 vm_ = nullptr;
147 vm_ = JSNApi::CreateJSVM(option); in ExecuteAndLoadJSPandaFile()
148 JSNApi::EnableUserUncaughtErrorHandler(vm_); in ExecuteAndLoadJSPandaFile()
151 auto result = JSNApi::Execute(vm_, targetAbcPath, recordName, false); in ExecuteAndLoadJSPandaFile()
156 JSNApi::DestroyJSVM(vm_); in ExecuteAndLoadJSPandaFile()
235 EcmaVM *vm_ = nullptr; member in panda::test::PGOProfilerTest
249 vm_ = JSNApi::CreateJSVM(option); in HWTEST_F_L0()
250 vm_->GetJSThread()->ManagedCodeBegin(); in HWTEST_F_L0()
251 JSHandle<ConstantPool> constPool = vm_->GetFactory()->NewSConstantPool(4); in HWTEST_F_L0()
255 ASSERT_TRUE(vm_ ! in HWTEST_F_L0()
[all...]
/arkcompiler/runtime_core/arkplatform/tests/
H A Djsnapi_test.cpp40 LocalScope scope(vm_); in TestNumberRef()
41 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
52 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
54 ASSERT_EQ(obj->Int32Value(vm_), val); in TestNumberRef()
56 ASSERT_EQ(obj->Uint32Value(vm_), val); in TestNumberRef()
64 vm_ = JSNApi::CreateJSVM(option);
65 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime";
70 JSNApi::DestroyJSVM(vm_);
75 panda::ecmascript::EcmaVM *vm_ = nullptr; local
113 Local<BooleanRef> res = BooleanRef::New(vm_, inpu in TEST_F()
[all...]
/arkcompiler/ets_runtime/test/fuzztest/jsnapihaspendingexception_fuzzer/
H A Djsnapihaspendingexception_fuzzer.cpp29 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in JSNApiUncaughtClearExceptionFuzzTest() local
31 thread_ = vm_->GetJSThread(); in JSNApiUncaughtClearExceptionFuzzTest()
40 Local<StringRef> message = StringRef::NewFromUtf8(vm_, value, (int)size); in JSNApiUncaughtClearExceptionFuzzTest()
41 Local<JSValueRef> error = Exception::Error(vm_, message); in JSNApiUncaughtClearExceptionFuzzTest()
42 JSNApi::ThrowException(vm_, error); in JSNApiUncaughtClearExceptionFuzzTest()
43 JSNApi::HasPendingException(vm_); in JSNApiUncaughtClearExceptionFuzzTest()
44 JSNApi::DestroyJSVM(vm_); in JSNApiUncaughtClearExceptionFuzzTest()
/arkcompiler/toolchain/tooling/backend/
H A Djs_pt_hooks.cpp24 [[maybe_unused]] LocalScope scope(debugger_->vm_); in DebuggerStmt()
33 [[maybe_unused]] LocalScope scope(debugger_->vm_); in Breakpoint()
40 [[maybe_unused]] LocalScope scope(debugger_->vm_); in Exception()
49 [[maybe_unused]] LocalScope scope(debugger_->vm_); in SingleStep()
71 [[maybe_unused]] LocalScope scope(debugger_->vm_); in NativeOut()
84 [[maybe_unused]] LocalScope scope(debugger_->vm_); in LoadModule()
95 [[maybe_unused]] LocalScope scope(debugger_->vm_); in NativeCalling()
102 [[maybe_unused]] LocalScope scope(debugger_->vm_); in NativeReturn()
111 [[maybe_unused]] LocalScope scope(debugger_->vm_); in SendableMethodEntry()
/arkcompiler/ets_runtime/ecmascript/napi/include/
H A Djsnapi.h459 Global<T>::Global(const EcmaVM *vm, const Local<S> &current) : vm_(vm) in Global()
462 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in Global()
468 Global<T>::Global(const EcmaVM *vm, const Global<S> &current) : vm_(vm) in Global()
471 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in Global()
476 CopyableGlobal<T>::CopyableGlobal(const EcmaVM *vm, const Local<T> &current) : vm_(vm) in CopyableGlobal()
479 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in CopyableGlobal()
485 CopyableGlobal<T>::CopyableGlobal(const EcmaVM *vm, const Local<S> &current) : vm_(vm) in CopyableGlobal()
488 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in CopyableGlobal()
496 vm_ = that.vm_; in Copy()
[all...]
/arkcompiler/runtime_core/static_core/tools/ark_js_napi_cli/ark_hz/
H A Dark_js_runtime.cpp58 if (vm_ != nullptr) { in Init()
62 vm_ = JSNApi::CreateEcmaVM(options_); in Init()
63 if (vm_ == nullptr) { in Init()
68 engine_ = std::make_unique<ArkNativeEngine>(vm_, nullptr); in Init()
71 engine_->SetCleanEnv([this] { JSNApi::DestroyJSVM(vm_); }); in Init()
80 LocalScope scope(vm_); in Execute()
81 return JSNApi::Execute(vm_, filename, options_.GetEntryPoint()); in Execute()
/arkcompiler/ets_runtime/test/fuzztest/jsnapiuncaughtclearexception_fuzzer/
H A Djsnapiuncaughtclearexception_fuzzer.cpp29 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in JSNApiUncaughtClearExceptionFuzzTest() local
38 Local<StringRef> message = StringRef::NewFromUtf8(vm_, value, (int)size); in JSNApiUncaughtClearExceptionFuzzTest()
39 Local<JSValueRef> error = Exception::Error(vm_, message); in JSNApiUncaughtClearExceptionFuzzTest()
40 JSNApi::ThrowException(vm_, error); in JSNApiUncaughtClearExceptionFuzzTest()
41 JSNApi::GetAndClearUncaughtException(vm_); in JSNApiUncaughtClearExceptionFuzzTest()
42 JSNApi::DestroyJSVM(vm_); in JSNApiUncaughtClearExceptionFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/jsnapiuncaughtexception_fuzzer/
H A Djsnapiuncaughtexception_fuzzer.cpp28 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in JSNApiUncaughtExceptionFuzzTest() local
37 Local<StringRef> message = StringRef::NewFromUtf8(vm_, value, (int)size); in JSNApiUncaughtExceptionFuzzTest()
38 Local<JSValueRef> error = Exception::Error(vm_, message); in JSNApiUncaughtExceptionFuzzTest()
39 JSNApi::ThrowException(vm_, error); in JSNApiUncaughtExceptionFuzzTest()
40 JSNApi::GetUncaughtException(vm_); in JSNApiUncaughtExceptionFuzzTest()
41 JSNApi::DestroyJSVM(vm_); in JSNApiUncaughtExceptionFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/exceptiontypeerror_fuzzer/
H A Dexceptiontypeerror_fuzzer.cpp28 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in ExceptionTypeErrorFuzzTest() local
30 thread_ = vm_->GetJSThread(); in ExceptionTypeErrorFuzzTest()
39 Local<StringRef> message = StringRef::NewFromUtf8(vm_, value, (int)size); in ExceptionTypeErrorFuzzTest()
40 Local<JSValueRef> error = Exception::TypeError(vm_, message); in ExceptionTypeErrorFuzzTest()
41 JSNApi::ThrowException(vm_, error); in ExceptionTypeErrorFuzzTest()
42 JSNApi::DestroyJSVM(vm_); in ExceptionTypeErrorFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/objectrefgetownproperty_fuzzer/
H A Dobjectrefgetownproperty_fuzzer.cpp28 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in JSNApiGetOwnPropertyFuzzTest() local
37 Local<ObjectRef> object = ObjectRef::New(vm_); in JSNApiGetOwnPropertyFuzzTest()
38 Local<JSValueRef> key = StringRef::NewFromUtf8(vm_, value, (int)size); in JSNApiGetOwnPropertyFuzzTest()
39 Local<JSValueRef> objectvalue = ObjectRef::New(vm_); in JSNApiGetOwnPropertyFuzzTest()
41 object->GetOwnProperty(vm_, key, attribute); in JSNApiGetOwnPropertyFuzzTest()
42 JSNApi::DestroyJSVM(vm_); in JSNApiGetOwnPropertyFuzzTest()
/arkcompiler/runtime_core/static_core/plugins/ets/tests/runtime/types/
H A Dets_arrayobj_test.cpp47 vm_ = coroutine->GetPandaVM(); in EtsArrayObjectMembers()
66 PandaEtsVM *vm_ = nullptr; // NOLINT(misc-non-private-member-variables-in-classes) member in ark::ets::test::EtsArrayObjectMembers
80 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
86 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
92 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
98 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
104 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
110 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
116 EtsClass *klass = vm_->GetClassLinker()->GetArrayClass(); in TEST_F()
122 EtsClass *klass = vm_ in TEST_F()
[all...]
/arkcompiler/ets_runtime/test/fuzztest/objectrefsetprototype_fuzzer/
H A Dobjectrefsetprototype_fuzzer.cpp27 EcmaVM *vm_ = JSNApi::CreateJSVM(option); in ObjectRefSetPrototypeFuzzTest() local
32 Local<ObjectRef> object = ObjectRef::New(vm_); in ObjectRefSetPrototypeFuzzTest()
33 Local<ObjectRef> prototype = object->GetPrototype(vm_); in ObjectRefSetPrototypeFuzzTest()
34 object->SetPrototype(vm_, prototype); in ObjectRefSetPrototypeFuzzTest()
35 JSNApi::DestroyJSVM(vm_); in ObjectRefSetPrototypeFuzzTest()
/arkcompiler/ets_runtime/ecmascript/ohos/
H A Dframework_helper.h32 vm_(thread->GetEcmaVM()) in FrameworkHelper()
41 return vm_; in GetEcmaVM()
70 if (vm_->GetJSOptions().WasSetCompilerFrameworkAbcPath()) { in FilePathInit()
71 CompilerFrameworkAotPath_ = vm_->GetJSOptions().GetCompilerFrameworkAbcPath(); in FilePathInit()
73 if (vm_->GetJSOptions().IsEnableFrameworkAOT()) { in FilePathInit()
84 EcmaVM *vm_ {nullptr};
/arkcompiler/ets_runtime/ecmascript/compiler/
H A Dcompilation_env.cpp21 CompilationEnv::CompilationEnv(EcmaVM *vm) : vm_(vm), thread_(vm_->GetJSThread()), in CompilationEnv()
26 return vm_->GetNativeAreaAllocator(); in GetNativeAreaAllocator()
31 return vm_->GetPGOProfiler(); in GetPGOProfiler()

Completed in 25 milliseconds

1234567