Lines Matching defs:engine

74     explicit HandleScopeWrapper(NativeEngine* engine) : scope_(engine->GetEcmaVm()) {}
82 explicit EscapableHandleScopeWrapper(NativeEngine* engine)
83 : scope_(engine->GetEcmaVm()), escapeCalled_(false) {}
1805 auto engine = reinterpret_cast<NativeEngine*>(env);
1806 auto vm = engine->GetEcmaVm();
1823 ref = engine->CreateReference(js_object, 1, false, callback, native_object, finalize_hint);
1826 ref = engine->CreateReference(js_object, 0, true, callback, native_object, finalize_hint);
1851 auto engine = reinterpret_cast<NativeEngine*>(env);
1852 auto vm = engine->GetEcmaVm();
1868 ref = engine->CreateAsyncReference(js_object, 1, false, callback, native_object, finalize_hint);
1871 ref = engine->CreateAsyncReference(js_object, 0, true, callback, native_object, finalize_hint);
1896 auto engine = reinterpret_cast<NativeEngine*>(env);
1897 auto vm = engine->GetEcmaVm();
1913 ref = engine->CreateReference(js_object, 1, false, callback, native_object, finalize_hint,
1917 ref = engine->CreateReference(js_object, 0, true, callback, native_object, finalize_hint,
1958 auto engine = reinterpret_cast<NativeEngine*>(env);
1959 auto vm = engine->GetEcmaVm();
1980 ref = engine->CreateReference(js_object, 0, true, nullptr, nullptr, nullptr);
2002 auto engine = reinterpret_cast<NativeEngine*>(env);
2003 auto vm = engine->GetEcmaVm();
2025 auto engine = reinterpret_cast<NativeEngine*>(env);
2026 auto vm = engine->GetEcmaVm();
2058 auto engine = reinterpret_cast<NativeEngine*>(env);
2059 auto vm = engine->GetEcmaVm();
2076 auto engine = reinterpret_cast<NativeEngine*>(env);
2077 auto vm = engine->GetEcmaVm();
2095 auto engine = reinterpret_cast<NativeEngine*>(env);
2096 auto vm = engine->GetEcmaVm();
2130 auto engine = reinterpret_cast<ArkNativeEngine*>(env);
2131 auto ref = new ArkNativeReference(engine, value, initial_refcount);
2205 NativeEngine* engine = reinterpret_cast<NativeEngine*>(env);
2207 *result = reference->Get(engine);
2216 auto engine = reinterpret_cast<NativeEngine*>(env);
2217 *result = HandleScopeToNapiHandleScope(new HandleScopeWrapper(engine));
2218 engine->openHandleScopes_++;
2227 auto engine = reinterpret_cast<NativeEngine*>(env);
2228 if (engine->openHandleScopes_ == 0) {
2232 engine->openHandleScopes_--;
2242 auto engine = reinterpret_cast<NativeEngine*>(env);
2243 *result = EscapableHandleScopeToNapiEscapableHandleScope(new EscapableHandleScopeWrapper(engine));
2244 engine->openHandleScopes_++;
2253 auto engine = reinterpret_cast<NativeEngine*>(env);
2254 if (engine->openHandleScopes_ == 0) {
2258 engine->openHandleScopes_--;
2383 auto engine = reinterpret_cast<NativeEngine*>(env);
2384 auto vm = engine->GetEcmaVm();
2385 engine->lastException_.Empty();
2457 auto engine = reinterpret_cast<NativeEngine*>(env);
2458 auto vm = engine->GetEcmaVm();
2588 HILOG_INFO("engine create buffer_copy failed!");
2627 auto engine = reinterpret_cast<NativeEngine*>(env);
2628 auto vm = engine->GetEcmaVm();
2750 auto engine = reinterpret_cast<NativeEngine*>(env);
2751 auto vm = engine->GetEcmaVm();
2758 *type = static_cast<napi_typedarray_type>(engine->GetTypedArrayType(typedArray));
2777 *type = static_cast<napi_typedarray_type>(engine->GetSendableTypedArrayType(typedArray));
2879 auto engine = reinterpret_cast<NativeEngine*>(env);
2881 auto resultValue = engine->CreatePromise(&nativeDeferred);
2941 auto engine = reinterpret_cast<NativeEngine*>(env);
2942 auto vm = const_cast<EcmaVM*>(engine->GetEcmaVm());
2943 engine->SetPromiseRejectCallBackRef(rejectCallbackRef);
2944 engine->SetCheckCallbackRef(checkCallbackRef);
2945 panda::JSNApi::SetHostPromiseRejectionTracker(const_cast<EcmaVM*>(vm), engine->GetPromiseRejectCallback(),
2946 reinterpret_cast<void*>(engine));
2973 auto engine = reinterpret_cast<NativeEngine*>(env);
2974 *result = engine->RunActor(buffer, bufferSize, descriptor, entryPoint, false);
2982 auto engine = reinterpret_cast<NativeEngine*>(env);
2983 *result = engine->NapiLoadModule(path, nullptr);
2994 auto engine = reinterpret_cast<NativeEngine*>(env);
2995 *result = engine->NapiLoadModuleWithInfo(path, module_info);
3005 auto engine = reinterpret_cast<NativeEngine*>(env);
3006 engine->AdjustExternalMemory(change_in_bytes, adjusted_value);
3278 auto engine = reinterpret_cast<NativeEngine*>(env);
3279 auto result = engine->CreateRuntime();
3336 auto engine = reinterpret_cast<NativeEngine*>(env);
3337 auto vm = engine->GetEcmaVm();
3338 Local<panda::JSValueRef> res = panda::JSNApi::DeserializeValue(vm, buffer, reinterpret_cast<void*>(engine));
3679 auto engine = reinterpret_cast<NativeEngine*>(env);
3681 reference = engine->CreateReference(js_object, 1, false, callback, native_object, finalize_hint);
3684 reference = engine->CreateReference(js_object, 0, true, callback, native_object, finalize_hint);
3763 auto engine = reinterpret_cast<NativeEngine*>(env);
3765 if (engine->IsApplicationApiVersionAPI11Plus()) {
3769 if (engine->IsRestrictedWorkerThread()) {
3770 *result = engine->RunScriptInRestrictedThread(pathStr.c_str());
3772 *result = engine->RunScript(pathStr.c_str());
3823 auto engine = reinterpret_cast<NativeEngine*>(env);
3824 [[maybe_unused]] auto vm = engine->GetEcmaVm();
3828 stack = engine->ExecuteTranslateBySourceMap(rawStack);
3841 auto engine = reinterpret_cast<NativeEngine*>(env);
3842 auto vm = engine->GetEcmaVm();
3875 void* DetachFuncCallback(void* engine, void* object, void* hint, void* detachData)
3877 if (detachData == nullptr || (engine == nullptr || object ==nullptr)) {
3882 void* detachVal = detach(reinterpret_cast<NativeEngine*>(engine), object, hint);
3886 Local<panda::JSValueRef> AttachFuncCallback(void* engine, void* buffer, void* hint, void* attachData)
3888 auto vm = reinterpret_cast<NativeEngine*>(engine)->GetEcmaVm();
3889 if (attachData == nullptr || (engine == nullptr || buffer ==nullptr)) {
3896 napi_value attachVal = attach(reinterpret_cast<napi_env>(engine), buffer, hint);
3919 auto engine = reinterpret_cast<NativeEngine*>(env);
3920 auto vm = engine->GetEcmaVm();
4079 auto engine = reinterpret_cast<NativeEngine*>(env);
4080 *scope = reinterpret_cast<napi_fast_native_scope>(new panda::JsiFastNativeScope(engine->GetEcmaVm()));