Home
last modified time | relevance | path

Searched refs:promiseHandle (Results 1 – 6 of 6) sorted by relevance

/arkcompiler/runtime_core/static_core/plugins/ets/runtime/intrinsics/
Dstd_core_Promise.cpp121 EtsHandle<EtsPromise> promiseHandle(currentCoro, promise); in EtsAwaitPromise() local
125 if (promiseHandle->IsProxy()) { in EtsAwaitPromise()
140 EtsPromiseCreateLink(promiseHandle->GetLinkedPromise(currentCoro), promiseHandle.GetPtr()); in EtsAwaitPromise()
144 promiseHandle->SetEventPtr(e.get()); in EtsAwaitPromise()
147 if (promiseHandle->IsResolved()) { in EtsAwaitPromise()
149 return promiseHandle->GetValue(currentCoro); in EtsAwaitPromise()
153 auto *exc = promiseHandle->GetValue(currentCoro); in EtsAwaitPromise()
159 promiseHandle->Lock(); in EtsAwaitPromise()
160 if (!promiseHandle->IsPending()) { in EtsAwaitPromise()
162 promiseHandle->Unlock(); in EtsAwaitPromise()
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/
Dets_entrypoints.cpp40 … bool Launch(EtsCoroutine *currentCoro, Method *method, const EtsHandle<EtsPromise> &promiseHandle, in Launch() argument
45 …auto promiseRef = etsVm->GetGlobalObjectStorage()->Add(promiseHandle.GetPtr(), mem::Reference::Obj… in Launch()
47 promiseHandle.GetPtr()->SetEventPtr(evt); in Launch()
52 promiseHandle.GetPtr()->SetEventPtr(nullptr); in Launch()
78 EtsHandle<EtsPromise> promiseHandle(currentCoro, promise); in LaunchCoroutine() local
79 bool successfulLaunch = Launch(currentCoro, method, promiseHandle, std::move(values)); in LaunchCoroutine()
115 EtsHandle<EtsPromise> promiseHandle(currentCoro, promise); in LaunchFromInterpreterImpl() local
116 bool successfulLaunch = Launch(currentCoro, method, promiseHandle, std::move(args)); in LaunchFromInterpreterImpl()
120 frame->GetAccAsVReg().SetReference(promiseHandle.GetPtr()); in LaunchFromInterpreterImpl()
121 return promiseHandle.GetPtr(); in LaunchFromInterpreterImpl()
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/interop_js/
Djs_job_queue.cpp114 …EtsHandle<EtsPromise> promiseHandle(coro, EtsPromise::FromCoreType(vm->GetGlobalObjectStorage()->G… in OnJsPromiseResolved() local
116 ASSERT(promiseHandle.GetPtr()->GetEventPtr() != nullptr); in OnJsPromiseResolved()
117 promiseHandle.GetPtr()->GetEventPtr()->SetHappened(); in OnJsPromiseResolved()
120 panda::ets::intrinsics::EtsPromiseResolve(promiseHandle.GetPtr(), jsval->AsObject()); in OnJsPromiseResolved()
122 vm->GetCoroutineManager()->UnblockWaiters(promiseHandle.GetPtr()->GetEventPtr()); in OnJsPromiseResolved()
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/napi/
Dets_napi_helpers.cpp433 EtsHandle<EtsPromise> promiseHandle(currentCoro, promise); in EtsAsyncCall() local
438 promiseHandle.GetPtr()->SetEventPtr(nullptr); in EtsAsyncCall()
443 return ToObjPtr(promiseHandle.GetPtr()); in EtsAsyncCall()
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_promise_handler.cpp284 JSHandle<JSTaggedValue> promiseHandle = in ThenFinally() local
293 EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promiseHandle, undefined, 1); in ThenFinally()
325 JSHandle<JSTaggedValue> promiseHandle = in CatchFinally() local
335 EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, promiseHandle, undefined, 1); in CatchFinally()
/arkcompiler/runtime_core/static_core/plugins/ets/runtime/interpreter/
Dinterpreter-inl.h534 EtsHandle<EtsPromise> promiseHandle(coroutine, promise); in HandleLaunch()
546 promiseHandle.GetPtr()->SetEventPtr(nullptr); in HandleLaunch()
552 this->GetAccAsVReg().SetReference(promiseHandle.GetPtr()); in HandleLaunch()