5#include "flutter/lib/ui/dart_runtime_hooks.h"
13#include "flutter/common/settings.h"
14#include "flutter/fml/build_config.h"
15#include "flutter/fml/logging.h"
16#include "flutter/lib/ui/plugins/callback_cache.h"
17#include "flutter/lib/ui/ui_dart_state.h"
18#include "flutter/runtime/dart_plugin_registrant.h"
19#include "third_party/dart/runtime/include/bin/dart_io_api.h"
20#include "third_party/dart/runtime/include/dart_api.h"
21#include "third_party/dart/runtime/include/dart_tools_api.h"
46 return Dart_Invoke(builtin_library, getter_name, 0,
nullptr);
95 schedule_microtask =
Dart_Invoke(isolate_lib, method_name, 0, NULL);
100 &schedule_microtask);
105 const std::string& script_uri) {
109 if (!script_uri.empty()) {
129 ToDart(
"_registerServiceExtension"), 0,
nullptr);
135 const std::string& script_uri) {
162 uint8_t newline[] = {
'\n'};
164 reinterpret_cast<const uint8_t*
>(
log.c_str()),
208 bool is_static =
false;
234 bool is_static =
false;
static int64_t GetCallbackHandle(const std::string &name, const std::string &class_name, const std::string &library_path)
static Dart_Handle GetCallback(int64_t handle)
static Dart_Handle GetCallbackHandle(Dart_Handle func)
static Dart_Handle GetCallbackFromHandle(int64_t handle)
static void ScheduleMicrotask(Dart_Handle closure)
static void Logger_PrintDebugString(const std::string &message)
static void Logger_PrintString(const std::string &message)
static void Install(bool is_ui_isolate, const std::string &script_uri)
const std::string & logger_prefix() const
void ScheduleMicrotask(Dart_Handle handle)
void LogMessage(const std::string &tag, const std::string &message) const
static UIDartState * Current()
DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function, bool *is_static)
DART_EXPORT Dart_Handle Dart_GetNonNullableType(Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments)
DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function)
DART_EXPORT bool Dart_IsInstance(Dart_Handle object)
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_ClassName(Dart_Handle cls_type)
DART_EXPORT bool Dart_IsFunction(Dart_Handle handle)
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
DART_EXPORT Dart_Handle Dart_ClosureFunction(Dart_Handle closure)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value)
DART_EXPORT Dart_Handle Dart_Null(void)
DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char *str)
DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
DART_EXPORT const char * Dart_GetError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_ClassLibrary(Dart_Handle cls_type)
DART_EXPORT bool Dart_IsClosure(Dart_Handle object)
DART_EXPORT bool Dart_IsLibrary(Dart_Handle object)
DART_EXPORT bool Dart_IsTearOff(Dart_Handle object)
#define FML_LOG(severity)
bool ShouldCaptureStdout()
const char *const class_name
static void InitDartIO(Dart_Handle builtin_library, const std::string &script_uri)
static std::string GetFunctionClassName(Dart_Handle closure)
void DartPluginRegistrant_EnsureInitialized()
static std::string GetFunctionName(Dart_Handle func)
static void InitDartInternal(Dart_Handle builtin_library, bool is_ui_isolate)
static void PropagateIfError(Dart_Handle result)
DEF_SWITCHES_START aot vmservice shared library name
static std::string GetFunctionLibraryUrl(Dart_Handle closure)
static void InitDartCore(Dart_Handle builtin, const std::string &script_uri)
bool FindAndInvokeDartPluginRegistrant()
static Dart_Handle InvokeFunction(Dart_Handle builtin_library, const char *name)
static void InitDartAsync(Dart_Handle builtin_library, bool is_ui_isolate)
std::function< void()> closure
def print(*args, **kwargs)
Dart_Handle ToDart(const T &object)