Lines Matching full:vm
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 globalObj->Set(vm, StringRef::NewFromUtf8(vm, "debuggerSetValue"), FunctionRef::New( in Initialize()
27 const_cast<panda::EcmaVM*>(vm), DebuggerExecutor::DebuggerSetValue)); in Initialize()
28 globalObj->Set(vm, StringRef::NewFromUtf8(vm, "debuggerGetValue"), FunctionRef::New( in Initialize()
29 const_cast<panda::EcmaVM*>(vm), DebuggerExecutor::DebuggerGetValue)); in Initialize()
34 EcmaVM *vm = runtimeCallInfo->GetVM(); in DebuggerGetValue() local
37 return JSValueRef::Undefined(vm); in DebuggerGetValue()
41 return JSValueRef::Undefined(vm); in DebuggerGetValue()
45 auto &frameHandler = vm->GetJsDebuggerManager()->GetEvalFrameHandler(); in DebuggerGetValue()
48 Local<JSValueRef> value = GetValue(vm, frameHandler.get(), Local<StringRef>(name)); in DebuggerGetValue()
53 if (!isThrow->ToBoolean(vm)->Value()) { in DebuggerGetValue()
54 DebuggerApi::ClearException(vm); in DebuggerGetValue()
55 return JSValueRef::Undefined(vm); in DebuggerGetValue()
59 ThrowException(vm, varName + " is not defined"); in DebuggerGetValue()
65 EcmaVM *vm = runtimeCallInfo->GetVM(); in DebuggerSetValue() local
68 return JSValueRef::Undefined(vm); in DebuggerSetValue()
72 return JSValueRef::Undefined(vm); in DebuggerSetValue()
76 auto &frameHandler = vm->GetJsDebuggerManager()->GetEvalFrameHandler(); in DebuggerSetValue()
79 if (SetValue(vm, frameHandler.get(), Local<StringRef>(name), value)) { in DebuggerSetValue()
84 ThrowException(vm, varName + " is not defined"); in DebuggerSetValue()
88 Local<JSValueRef> DebuggerExecutor::GetValue(const EcmaVM *vm, const FrameHandler *frameHandler, Lo… in GetValue() argument
91 value = GetLocalValue(vm, frameHandler, name); in GetValue()
95 value = GetLexicalValue(vm, frameHandler, name); in GetValue()
99 value = GetGlobalValue(vm, name); in GetValue()
107 bool DebuggerExecutor::SetValue(const EcmaVM *vm, FrameHandler *frameHandler, in SetValue() argument
110 if (SetLocalValue(vm, frameHandler, name, value)) { in SetValue()
113 if (SetLexicalValue(vm, frameHandler, name, value)) { in SetValue()
116 if (SetGlobalValue(vm, name, value)) { in SetValue()
123 void DebuggerExecutor::ThrowException(const EcmaVM *vm, const std::string &error) in ThrowException() argument
125 Local<StringRef> msg = StringRef::NewFromUtf8(vm, error.c_str()); in ThrowException()
126 Local<JSValueRef> exception = Exception::ReferenceError(vm, msg); in ThrowException()
127 JSNApi::ThrowException(vm, exception); in ThrowException()
130 Local<JSValueRef> DebuggerExecutor::GetLocalValue(const EcmaVM *vm, const FrameHandler *frameHandle… in GetLocalValue() argument
140 result = DebuggerApi::GetVRegValue(vm, frameHandler, index); in GetLocalValue()
144 bool DebuggerExecutor::SetLocalValue(const EcmaVM *vm, FrameHandler *frameHandler, in SetLocalValue() argument
154 vm->GetJsDebuggerManager()->NotifyLocalScopeUpdated(varName, value); in SetLocalValue()
158 Local<JSValueRef> DebuggerExecutor::GetLexicalValue(const EcmaVM *vm, const FrameHandler *frameHand… in GetLexicalValue() argument
168 result = DebuggerApi::GetProperties(vm, frameHandler, level, slot); in GetLexicalValue()
172 bool DebuggerExecutor::SetLexicalValue(const EcmaVM *vm, const FrameHandler *frameHandler, in SetLexicalValue() argument
181 DebuggerApi::SetProperties(vm, frameHandler, level, slot, value); in SetLexicalValue()
182 vm->GetJsDebuggerManager()->NotifyLocalScopeUpdated(varName, value); in SetLexicalValue()
186 Local<JSValueRef> DebuggerExecutor::GetGlobalValue(const EcmaVM *vm, Local<StringRef> name) in GetGlobalValue() argument
188 return DebuggerApi::GetGlobalValue(vm, name); in GetGlobalValue()
191 bool DebuggerExecutor::SetGlobalValue(const EcmaVM *vm, Local<StringRef> name, Local<JSValueRef> va… in SetGlobalValue() argument
193 return DebuggerApi::SetGlobalValue(vm, name, value); in SetGlobalValue()