21#if !defined(DART_PRECOMPILED_RUNTIME)
31 const auto& send_function =
32 Function::CheckedHandle(zone, arguments->NativeArg0());
34 ReceivePort::CheckedHandle(zone, arguments->NativeArgAt(1));
36 isolate->CreateAsyncFfiCallback(zone, send_function,
port.Id()));
40 const auto& trampoline =
41 Function::CheckedHandle(zone, arguments->NativeArg0());
42 const auto&
target = Closure::CheckedHandle(zone, arguments->NativeArgAt(1));
43 const bool keep_isolate_alive =
44 Bool::CheckedHandle(zone, arguments->NativeArgAt(2)).value();
45 return Pointer::New(isolate->CreateIsolateLocalFfiCallback(
46 zone, trampoline,
target, keep_isolate_alive));
50 const auto& pointer = Pointer::CheckedHandle(zone, arguments->NativeArg0());
51 isolate->DeleteFfiCallback(pointer.NativeAddress());
57 Integer::CheckedHandle(zone, arguments->NativeArg0()).AsInt64Value();
58 isolate->UpdateNativeCallableKeepIsolateAliveCounter(
delta);
64 const char*
name = name_dart.ToCString();
66#define RETURN_FUNCTION_ADDRESS(function_name, R, A) \
67 if (strcmp(name, #function_name) == 0) { \
68 return Integer::New(reinterpret_cast<intptr_t>(function_name)); \
71#undef RETURN_FUNCTION_ADDRESS
87#define ENTRY(name, R, A) \
88 DartApiEntry{#name, reinterpret_cast<void (*)()>(name)},
102 (
Dart_Handle entry_handle, intptr_t external_size)) {
106 const auto& entry_object =
108 const auto& entry = FinalizerEntry::Cast(entry_object);
111 intptr_t external_size_diff;
115 const intptr_t external_size_old = entry.external_size();
116 if (FLAG_trace_finalizers) {
118 " bytes in %s space\n",
119 external_size_old, external_size, space == 0 ?
"new" :
"old");
121 external_size_diff = external_size - external_size_old;
122 if (external_size_diff == 0) {
125 entry.set_external_size(external_size);
128 if (external_size_diff > 0) {
139struct AsTypedListFinalizerData {
146 auto*
result =
malloc(
sizeof(AsTypedListFinalizerData));
153 const auto*
data =
reinterpret_cast<AsTypedListFinalizerData*
>(peer);
static ObjectPtr UnwrapHandle(Dart_Handle object)
static DART_NORETURN void ThrowOOM()
static DART_NORETURN void ThrowArgumentError(const Instance &arg)
bool AllocatedExternal(intptr_t size, Space space)
void FreedExternal(intptr_t size, Space space)
static IntegerPtr New(const String &str, Heap::Space space=Heap::kNew)
static PointerPtr New(uword native_address, Heap::Space space=Heap::kNew)
static StringPtr NewFormatted(const char *format,...) PRINTF_ATTRIBUTE(1
static Thread * Current()
IsolateGroup * isolate_group() const
#define THR_Print(format,...)
struct _Dart_Handle * Dart_Handle
#define DART_NATIVE_API_DL_SYMBOLS(F)
#define DART_API_ALL_DL_SYMBOLS(F)
#define DART_API_DL_MAJOR_VERSION
#define DART_API_DL_MINOR_VERSION
#define ENTRY(name, R, A)
#define RETURN_FUNCTION_ADDRESS(function_name, R, A)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
const uint8_t uint32_t uint32_t GError ** error
#define MSAN_UNPOISON(ptr, len)
void * malloc(size_t size)
static const DartApi dart_api_data
static const DartApiEntry dart_api_entries[]
DEFINE_FFI_NATIVE_ENTRY(FinalizerEntry_SetExternalSize, void,(Dart_Handle entry_handle, intptr_t external_size))
void AsTypedListFinalizerCallback(void *peer)
DEFINE_NATIVE_ENTRY(List_allocate, 0, 2)
Heap::Space SpaceForExternal(FinalizerEntryPtr raw_entry)
static int8_t data[kExtLength]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
#define GET_NON_NULL_NATIVE_ARGUMENT(type, name, value)