Home
last modified time | relevance | path

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

123456

/arkcompiler/ets_runtime/ecmascript/napi/test/
Djsnapi_first_tests.cpp86 vm_ = JSNApi::CreateJSVM(option); in SetUp()
87 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in SetUp()
88 thread_ = vm_->GetJSThread(); in SetUp()
89 vm_->SetEnableForceGC(true); in SetUp()
94 vm_->SetEnableForceGC(false); in TearDown()
95 JSNApi::DestroyJSVM(vm_); in TearDown()
100 LocalScope scope(vm_); in TestNumberRef()
101 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
112 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
114 ASSERT_EQ(obj->Int32Value(vm_), val); in TestNumberRef()
[all …]
Djsnapi_third_tests.cpp86 vm_ = JSNApi::CreateJSVM(option); in SetUp()
87 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in SetUp()
88 thread_ = vm_->GetJSThread(); in SetUp()
89 vm_->SetEnableForceGC(true); in SetUp()
94 vm_->SetEnableForceGC(false); in TearDown()
95 JSNApi::DestroyJSVM(vm_); in TearDown()
100 LocalScope scope(vm_); in TestNumberRef()
101 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
112 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
114 ASSERT_EQ(obj->Int32Value(vm_), val); in TestNumberRef()
[all …]
Dffi_workload.cpp128 vm_ = JSNApi::CreateJSVM(option); in SetUp()
129 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in SetUp()
130 thread_ = vm_->GetJSThread(); in SetUp()
131 vm_->SetEnableForceGC(true); in SetUp()
137 vm_->SetEnableForceGC(false); in TearDown()
138 JSNApi::DestroyJSVM(vm_); in TearDown()
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()
[all …]
Djsnapi_sample.cpp57 vm_ = JSNApi::CreateJSVM(option); in SetUp()
58 thread_ = vm_->GetJSThread(); in SetUp()
59 vm_->SetEnableForceGC(true); in SetUp()
64 vm_->SetEnableForceGC(false); in TearDown()
65 JSNApi::DestroyJSVM(vm_); in TearDown()
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 …]
Djsnapi_second_tests.cpp86 vm_ = JSNApi::CreateJSVM(option); in SetUp()
87 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in SetUp()
88 thread_ = vm_->GetJSThread(); in SetUp()
89 vm_->SetEnableForceGC(true); in SetUp()
94 vm_->SetEnableForceGC(false); in TearDown()
95 JSNApi::DestroyJSVM(vm_); in TearDown()
100 LocalScope scope(vm_); in TestNumberRef()
101 Local<NumberRef> obj = NumberRef::New(vm_, val); in TestNumberRef()
112 ASSERT_EQ(obj->IntegerValue(vm_), val); in TestNumberRef()
114 ASSERT_EQ(obj->Int32Value(vm_), val); in TestNumberRef()
[all …]
Ddfx_jsnapi_tests.cpp43 TestHelper::CreateEcmaVMWithScope(vm_, thread_, scope_); in SetUp()
44 vm_->GetJSThread()->GetCurrentEcmaContext()->SetRuntimeStatEnable(true); in SetUp()
45 vm_->SetEnableForceGC(false); in SetUp()
50 TestHelper::DestroyEcmaVMWithScope(vm_, scope_); in TearDown()
54 EcmaVM *vm_ {nullptr}; member in panda::test::DFXJSNApiTests
91 … DFXJSNApi::DumpHeapSnapshot(vm_, dumpFormat, filePath, isVmMode, isPrivate, captureNumericValue); in HWTEST_F_L0()
123 …DFXJSNApi::DumpHeapSnapshot(vm_, dumpFormat, &stream, progress, isVmMode, isPrivate, captureNumeri… in HWTEST_F_L0()
141 result = DFXJSNApi::BuildNativeAndJsStackTrace(vm_, stackTraceStr); in HWTEST_F_L0()
154 bool result = DFXJSNApi::BuildJsStackTrace(vm_, stackTraceStr); in HWTEST_F_L0()
167 vm_->SetEnableForceGC(false); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/executiontest/
Dthread_termination_test.cpp42 TestHelper::CreateEcmaVMWithScope(vm_, thread_, scope_); in SetUp()
47 TestHelper::DestroyEcmaVMWithScope(vm_, scope_); in TearDown()
68 EcmaVM *vm_ {nullptr}; member in panda::test::ThreadTerminationTest
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}; member in panda::test::TerminatorThread
127 JSThread *thread = vm_->GetAssociatedJSThread(); in HWTEST_F_L0()
129 JSNApi::EnableUserUncaughtErrorHandler(vm_); in HWTEST_F_L0()
130 RegisterGlobalTemplate(vm_, TerminateThread, Fail, Signal); in HWTEST_F_L0()
[all …]
/arkcompiler/toolchain/tooling/agent/
Druntime_impl.cpp116 internalObjects_ = Global<MapRef>(vm_, MapRef::New(vm_)); in Enable()
135 *totalSize = static_cast<double>(DFXJSNApi::GetHeapTotalSize(vm_)); in GetHeapUsage()
136 *usedSize = static_cast<double>(DFXJSNApi::GetHeapUsedSize(vm_)); in GetHeapUsage()
158 Local<JSValueRef> value = Local<JSValueRef>(vm_, iter->second); in GetProperties()
164 if (!internalObjects_.IsEmpty() && internalObjects_->Get(vm_, value)->IsNumber()) { in GetProperties()
165 …if (static_cast<ArkInternalValueType>(internalObjects_->Get(vm_, value)->ToNumber(vm_)->Value()) == in GetProperties()
166 …rkInternalValueType::Entry || static_cast<ArkInternalValueType>(internalObjects_->Get(vm_, value)-> in GetProperties()
167 ToNumber(vm_)->Value()) == ArkInternalValueType::Scope) { in GetProperties()
255 Local<ArrayRef> keys = Local<ObjectRef>(value)->GetOwnPropertyNames(vm_); in GetProperties()
256 int32_t length = static_cast<int32_t>(keys->Length(vm_)); in GetProperties()
[all …]
Ddebugger_impl.cpp44 : vm_(vm), frontend_(channel), runtime_(runtime) in DebuggerImpl()
48 jsDebugger_ = DebuggerApi::CreateJSDebugger(vm_); in DebuggerImpl()
51 DebuggerExecutor::Initialize(vm_); in DebuggerImpl()
55 vm_->GetJsDebuggerManager()->SetLocalScopeUpdater(&updaterFunc_); in DebuggerImpl()
56 vm_->GetJsDebuggerManager()->SetStepperFunc(&stepperFunc_); in DebuggerImpl()
57 vm_->GetJsDebuggerManager()->SetJSReturnNativeFunc(&returnNative_); in DebuggerImpl()
64 vm_->GetJsDebuggerManager()->SetLocalScopeUpdater(nullptr); in ~DebuggerImpl()
65 vm_->GetJsDebuggerManager()->SetStepperFunc(nullptr); in ~DebuggerImpl()
66 vm_->GetJsDebuggerManager()->SetJSReturnNativeFunc(nullptr); in ~DebuggerImpl()
82 if (!vm_->GetJsDebuggerManager()->IsDebugApp()) { in NotifyScriptParsed()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/maprefgetsetkeyvaluesize_fuzzer/
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()
47 object->Get(vm_, key); in Int32GetSizeFuzzerTest()
48 object->GetKey(vm_, 0); in Int32GetSizeFuzzerTest()
49 object->GetValue(vm_, 0); in Int32GetSizeFuzzerTest()
50 JSNApi::DestroyJSVM(vm_); in Int32GetSizeFuzzerTest()
/arkcompiler/runtime_core/arkplatform/tests/
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); in SetUp()
65 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in SetUp()
70 JSNApi::DestroyJSVM(vm_); in TearDown()
75 panda::ecmascript::EcmaVM *vm_ = nullptr; member in arkplatform::test::JSNapiTest
113 Local<BooleanRef> res = BooleanRef::New(vm_, input); in TEST_F()
[all …]
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/tests/
Dpgo_profiler_test.cpp80 JSPandaFileManager::GetInstance()->RemoveJSPandaFileVm(vm_, pf_.get()); in TearDown()
81 vm_ = nullptr; in TearDown()
143 vm_ = JSNApi::CreateJSVM(option); in ExecuteAndLoadJSPandaFile()
144 JSNApi::EnableUserUncaughtErrorHandler(vm_); in ExecuteAndLoadJSPandaFile()
147 auto result = JSNApi::Execute(vm_, targetAbcPath, recordName, false); in ExecuteAndLoadJSPandaFile()
152 JSNApi::DestroyJSVM(vm_); in ExecuteAndLoadJSPandaFile()
231 EcmaVM *vm_ = nullptr; member in panda::test::PGOProfilerTest
245 vm_ = JSNApi::CreateJSVM(option); in HWTEST_F_L0()
246 JSHandle<ConstantPool> constPool = vm_->GetFactory()->NewConstantPool(4); in HWTEST_F_L0()
250 ASSERT_TRUE(vm_ != nullptr) << "Cannot create Runtime"; in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/jsnapihaspendingexception_fuzzer/
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/ets_runtime/ecmascript/napi/include/
Djsnapi.h394 Global<T>::Global(const EcmaVM *vm, const Local<S> &current) : vm_(vm) in Global()
397 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in Global()
403 Global<T>::Global(const EcmaVM *vm, const Global<S> &current) : vm_(vm) in Global()
406 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in Global()
411 CopyableGlobal<T>::CopyableGlobal(const EcmaVM *vm, const Local<T> &current) : vm_(vm) in CopyableGlobal()
414 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in CopyableGlobal()
420 CopyableGlobal<T>::CopyableGlobal(const EcmaVM *vm, const Local<S> &current) : vm_(vm) in CopyableGlobal()
423 address_ = JSNApi::GetGlobalHandleAddr(vm_, reinterpret_cast<uintptr_t>(*current)); in CopyableGlobal()
431 vm_ = that.vm_; in Copy()
433 ECMA_ASSERT(vm_ != nullptr); in Copy()
[all …]
/arkcompiler/toolchain/tooling/backend/
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()
96 [[maybe_unused]] LocalScope scope(debugger_->vm_); in NativeCalling()
103 [[maybe_unused]] LocalScope scope(debugger_->vm_); in NativeReturn()
/arkcompiler/ets_runtime/test/fuzztest/jsnapiuncaughtexception_fuzzer/
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/jsnapiuncaughtclearexception_fuzzer/
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/exceptiontypeerror_fuzzer/
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/
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/ets_runtime/ecmascript/napi/
DJSNapi接口说明.md810 JSNApi::NotifyNativeCalling(vm_, par);
860 JSNApi::SetProfilerState(vm_, ret);
884 bool b = JSNApi::IsProfiling(vm_);
907 JSNApi::SynchronizVMInfo(vm_, hostVM_);
930 JSNApi::SetLoop(vm_, loop);
953 JSNApi::SetAssetPath(vm_, assetPath);
976 JSNApi::SetBundle(vm_, value);
999 JSNApi::SwitchCurrentContext(vm_, context);
1022 JSNApi::LoadAotFile(vm_, moduleName);
1092 Local<JSValueRef> value = JSNApi::DeserializeValue(vm_, recoder, hint);
[all …]
/arkcompiler/ets_runtime/test/fuzztest/objectrefsetprototype_fuzzer/
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/
Decma_string_table.cpp27 EcmaStringTable::EcmaStringTable(const EcmaVM *vm) : vm_(vm) {} in EcmaStringTable()
108 …auto firstFlat = JSHandle<EcmaString>(vm_->GetJSThread(), EcmaStringAccessor::Flatten(vm_, firstSt… in GetOrInternString()
109 …auto secondFlat = JSHandle<EcmaString>(vm_->GetJSThread(), EcmaStringAccessor::Flatten(vm_, second… in GetOrInternString()
114 JSHandle<EcmaString> concatHandle(vm_->GetJSThread(), in GetOrInternString()
115 EcmaStringAccessor::Concat(vm_, firstFlat, secondFlat, MemSpaceType::OLD_SPACE)); in GetOrInternString()
116 …EcmaString *concatString = EcmaStringAccessor::Flatten(vm_, concatHandle, MemSpaceType::OLD_SPACE); in GetOrInternString()
130 …EcmaStringAccessor::CreateFromUtf8(vm_, utf8Data, utf8Len, canBeCompress, MemSpaceType::OLD_SPACE); in GetOrInternString()
147 …EcmaString *str = EcmaStringAccessor::CreateFromUtf8(vm_, utf8Data, utf8Len, true, MemSpaceType::N… in CreateAndInternStringNonMovable()
161 …EcmaStringAccessor::CreateFromUtf16(vm_, utf16Data, utf16Len, canBeCompress, MemSpaceType::OLD_SPA… in GetOrInternString()
172 JSHandle<EcmaString> strHandle(vm_->GetJSThread(), string); in GetOrInternString()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dpass_manager.h40 : vm_(collector->GetVM()), in PassContext()
42 tsManager_(vm_->GetJSThread()->GetCurrentEcmaContext()->GetTSManager()), in PassContext()
45 cmpCfg_(triple, &vm_->GetJSOptions()), in PassContext()
60 return vm_->GetJSThread()->GetCurrentEcmaContext()->GetPTManager(); in GetPTManager()
115 return vm_->GetNativeAreaAllocator(); in GetNativeAreaAllocator()
120 return vm_; in GetEcmaVM()
129 EcmaVM *vm_ {nullptr};
146 : vm_(vm), triple_(triple), optLevel_(optLevel), relocMode_(relocMode), log_(log), in PassManager()
149 enableJITLog_ = vm_->GetJSOptions().GetTraceJIT(); in PassManager()
158 EcmaVM *vm_ {nullptr};
/arkcompiler/ets_runtime/ecmascript/module/
Djs_module_manager.cpp42 ModuleManager::ModuleManager(EcmaVM *vm) : vm_(vm) in ModuleManager()
44 …resolvedModules_ = NameDictionary::Create(vm_->GetJSThread(), DEAULT_DICTIONART_CAPACITY).GetTagge… in ModuleManager()
49 FrameHandler frameHandler(vm_->GetJSThread()); in GetCurrentModule()
60 …return SourceTextModule::Cast(currentModule.GetTaggedObject())->GetModuleValue(vm_->GetJSThread(),… in GetModuleValueInner()
69 …return SourceTextModule::Cast(currentModule.GetTaggedObject())->GetModuleValue(vm_->GetJSThread(),… in GetModuleValueInner()
77 …return SourceTextModule::Cast(currentModule->GetTaggedObject())->GetModuleValue(vm_->GetJSThread()… in GetModuleValueInner()
99 JSThread *thread = vm_->GetJSThread(); in GetModuleValueOutterInternal()
201 ObjectFactory *factory = vm_->GetFactory(); in GetCJSModuleValue()
233 …return FastRuntimeStub::CallGetter(vm_->GetJSThread(), JSTaggedValue(obj), JSTaggedValue(obj), val… in GetValueFromExportObject()
241 JSThread *thread = vm_->GetJSThread(); in StoreModuleValue()
[all …]
/arkcompiler/runtime_core/static_core/runtime/include/
Dcompiler_interface.h40 : method_(method), isOsr_(isOsr), vm_(vm) in method_()
48 vm_ = task.vm_; in CompilerTask()
49 task.vm_ = nullptr; in CompilerTask()
56 vm_ = task.vm_;
57 task.vm_ = nullptr;
77 return vm_; in GetVM()
83 PandaVM *vm_ {nullptr};

123456