Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions
dart_api_impl.cc File Reference
#include "include/dart_api.h"
#include "include/dart_native_api.h"
#include <cstring>
#include <memory>
#include <utility>
#include "lib/stacktrace.h"
#include "platform/assert.h"
#include "platform/unicode.h"
#include "vm/app_snapshot.h"
#include "vm/class_finalizer.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/dart.h"
#include "vm/dart_api_impl.h"
#include "vm/dart_api_message.h"
#include "vm/dart_api_state.h"
#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/dwarf.h"
#include "vm/elf.h"
#include "vm/exceptions.h"
#include "vm/flags.h"
#include "vm/growable_array.h"
#include "vm/heap/verifier.h"
#include "vm/image_snapshot.h"
#include "vm/isolate_reload.h"
#include "vm/kernel_isolate.h"
#include "vm/lockers.h"
#include "vm/message.h"
#include "vm/message_handler.h"
#include "vm/message_snapshot.h"
#include "vm/native_entry.h"
#include "vm/native_symbol.h"
#include "vm/object.h"
#include "vm/object_graph.h"
#include "vm/object_store.h"
#include "vm/os.h"
#include "vm/os_thread.h"
#include "vm/port.h"
#include "vm/profiler.h"
#include "vm/profiler_service.h"
#include "vm/program_visitor.h"
#include "vm/resolver.h"
#include "vm/reusable_handles.h"
#include "vm/service.h"
#include "vm/service_event.h"
#include "vm/service_isolate.h"
#include "vm/stack_frame.h"
#include "vm/symbols.h"
#include "vm/tags.h"
#include "vm/version.h"
#include "vm/zone_text_buffer.h"
#include "vm/compiler/aot/precompiler.h"
#include "vm/kernel_loader.h"

Go to the source code of this file.

Classes

struct  dart::RunLoopData
 
class  dart::AcquiredData
 

Namespaces

namespace  dart
 

Macros

#define Z   (T->zone())
 
#define CHECK_ERROR_HANDLE(error)
 
#define DEFINE_UNWRAP(type)
 
#define ISOLATE_GROUP_METRIC_API(type, variable, name, unit)
 
#define ISOLATE_METRIC_API(type, variable, name, unit)
 
#define GET_LIST_LENGTH(zone, type, obj, len)
 
#define GET_LIST_ELEMENT(thread, type, obj, index)
 
#define GET_LIST_RANGE(thread, type, obj, offset, length)
 
#define SET_LIST_ELEMENT(type, obj, index, value)
 
#define GET_LIST_ELEMENT_AS_BYTES(type, obj, native_array, offset, length)
 
#define SET_LIST_ELEMENT_AS_BYTES(type, obj, native_array, offset, length)
 

Functions

 dart::DECLARE_FLAG (bool, print_class_table)
 
 dart::DEFINE_FLAG (bool, verify_acquired_data, false, "Verify correct API acquire/release of typed data.")
 
 dart::DEFINE_FLAG (bool, dump_tables, false, "Dump common hash tables before snapshotting.")
 
 dart::DEFINE_FLAG (bool, enable_deprecated_wait_for, false, "Enable deprecated dart:cli waitFor. " "This feature will be fully removed in Dart 3.4 release. " "See https://dartbug.com/52121.")
 
const char * dart::CanonicalFunction (const char *func)
 
static InstancePtr dart::GetListInstance (Zone *zone, const Object &obj)
 
static InstancePtr dart::GetMapInstance (Zone *zone, const Object &obj)
 
static bool dart::IsCompiletimeErrorObject (Zone *zone, const Object &obj)
 
static bool dart::GetNativeStringArgument (NativeArguments *arguments, int arg_index, Dart_Handle *str, void **peer)
 
static bool dart::GetNativeIntegerArgument (NativeArguments *arguments, int arg_index, int64_t *value)
 
static bool dart::GetNativeUnsignedIntegerArgument (NativeArguments *arguments, int arg_index, uint64_t *value)
 
static bool dart::GetNativeDoubleArgument (NativeArguments *arguments, int arg_index, double *value)
 
static Dart_Handle dart::GetNativeFieldsOfArgument (NativeArguments *arguments, int arg_index, int num_fields, intptr_t *field_values, const char *current_func)
 
static FunctionPtr dart::FindCoreLibPrivateFunction (Zone *zone, const String &name)
 
static ObjectPtr dart::CallStatic1Arg (Zone *zone, const String &name, const Instance &arg0)
 
static ObjectPtr dart::CallStatic2Args (Zone *zone, const String &name, const Instance &arg0, const Instance &arg1)
 
static ObjectPtr dart::CallStatic3Args (Zone *zone, const String &name, const Instance &arg0, const Instance &arg1, const Instance &arg2)
 
static const char * dart::GetErrorString (Thread *thread, const Object &obj)
 
static Dart_Handle dart::InitNewReadOnlyApiHandle (ObjectPtr raw)
 
DART_EXPORT bool dart::Dart_IsError (Dart_Handle handle)
 
DART_EXPORT void dart::Dart_KillIsolate (Dart_Isolate handle)
 
DART_EXPORT bool dart::Dart_IsApiError (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsUnhandledExceptionError (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsCompilationError (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsFatalError (Dart_Handle object)
 
DART_EXPORT const char * dart::Dart_GetError (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_ErrorHasException (Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_ErrorGetException (Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_ErrorGetStackTrace (Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_NewApiError (const char *error)
 
DART_EXPORT Dart_Handle dart::Dart_NewCompilationError (const char *error)
 
DART_EXPORT Dart_Handle dart::Dart_NewUnhandledExceptionError (Dart_Handle exception)
 
DART_EXPORT void dart::Dart_PropagateError (Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_ToString (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IdentityEquals (Dart_Handle obj1, Dart_Handle obj2)
 
DART_EXPORT Dart_Handle dart::Dart_HandleFromPersistent (Dart_PersistentHandle object)
 
DART_EXPORT Dart_Handle dart::Dart_HandleFromWeakPersistent (Dart_WeakPersistentHandle object)
 
static Dart_Handle dart::HandleFromFinalizable (Dart_FinalizableHandle object)
 
DART_EXPORT Dart_PersistentHandle dart::Dart_NewPersistentHandle (Dart_Handle object)
 
DART_EXPORT void dart::Dart_SetPersistentHandle (Dart_PersistentHandle obj1, Dart_Handle obj2)
 
static bool dart::IsFfiCompound (Thread *T, const Object &obj)
 
static Dart_WeakPersistentHandle dart::AllocateWeakPersistentHandle (Thread *thread, const Object &ref, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
static Dart_WeakPersistentHandle dart::AllocateWeakPersistentHandle (Thread *T, Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
static Dart_FinalizableHandle dart::AllocateFinalizableHandle (Thread *thread, const Object &ref, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
static Dart_FinalizableHandle dart::AllocateFinalizableHandle (Thread *T, Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
DART_EXPORT Dart_WeakPersistentHandle dart::Dart_NewWeakPersistentHandle (Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
DART_EXPORT Dart_FinalizableHandle dart::Dart_NewFinalizableHandle (Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
DART_EXPORT void dart::Dart_DeletePersistentHandle (Dart_PersistentHandle object)
 
DART_EXPORT void dart::Dart_DeleteWeakPersistentHandle (Dart_WeakPersistentHandle object)
 
DART_EXPORT void dart::Dart_DeleteFinalizableHandle (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object)
 
DART_EXPORT const char * dart::Dart_VersionString ()
 
DART_EXPORT char * dart::Dart_Initialize (Dart_InitializeParams *params)
 
DART_EXPORT char * dart::Dart_Cleanup ()
 
DART_EXPORT char * dart::Dart_SetVMFlags (int argc, const char **argv)
 
DART_EXPORT bool dart::Dart_IsVMFlagSet (const char *flag_name)
 
static Dart_Isolate dart::CreateIsolate (IsolateGroup *group, bool is_new_group, const char *name, void *isolate_data, char **error)
 
Isolate * dart::CreateWithinExistingIsolateGroup (IsolateGroup *group, const char *name, char **error)
 
DART_EXPORT void dart::Dart_IsolateFlagsInitialize (Dart_IsolateFlags *flags)
 
DART_EXPORT Dart_Isolate dart::Dart_CreateIsolateGroup (const char *script_uri, const char *name, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions, Dart_IsolateFlags *flags, void *isolate_group_data, void *isolate_data, char **error)
 
DART_EXPORT Dart_Isolate dart::Dart_CreateIsolateGroupFromKernel (const char *script_uri, const char *name, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size, Dart_IsolateFlags *flags, void *isolate_group_data, void *isolate_data, char **error)
 
DART_EXPORT Dart_Isolate dart::Dart_CreateIsolateInGroup (Dart_Isolate group_member, const char *name, Dart_IsolateShutdownCallback shutdown_callback, Dart_IsolateCleanupCallback cleanup_callback, void *child_isolate_data, char **error)
 
DART_EXPORT void dart::Dart_ShutdownIsolate ()
 
DART_EXPORT Dart_Isolate dart::Dart_CurrentIsolate ()
 
DART_EXPORT void * dart::Dart_CurrentIsolateData ()
 
DART_EXPORT void * dart::Dart_IsolateData (Dart_Isolate isolate)
 
DART_EXPORT Dart_IsolateGroup dart::Dart_CurrentIsolateGroup ()
 
DART_EXPORT void * dart::Dart_CurrentIsolateGroupData ()
 
DART_EXPORT Dart_IsolateGroupId dart::Dart_CurrentIsolateGroupId ()
 
DART_EXPORT void * dart::Dart_IsolateGroupData (Dart_Isolate isolate)
 
DART_EXPORT Dart_Handle dart::Dart_DebugName ()
 
DART_EXPORT const char * dart::Dart_DebugNameToCString ()
 
DART_EXPORT const char * dart::Dart_IsolateServiceId (Dart_Isolate isolate)
 
DART_EXPORT void dart::Dart_EnterIsolate (Dart_Isolate isolate)
 
DART_EXPORT void dart::Dart_StartProfiling ()
 
DART_EXPORT void dart::Dart_StopProfiling ()
 
DART_EXPORT void dart::Dart_ThreadDisableProfiling ()
 
DART_EXPORT void dart::Dart_ThreadEnableProfiling ()
 
DART_EXPORT void dart::Dart_AddSymbols (const char *dso_name, void *buffer, intptr_t buffer_size)
 
DART_EXPORT bool dart::Dart_WriteProfileToTimeline (Dart_Port main_port, char **error)
 
DART_EXPORT bool dart::Dart_ShouldPauseOnStart ()
 
DART_EXPORT void dart::Dart_SetShouldPauseOnStart (bool should_pause)
 
DART_EXPORT bool dart::Dart_IsPausedOnStart ()
 
DART_EXPORT void dart::Dart_SetPausedOnStart (bool paused)
 
DART_EXPORT bool dart::Dart_ShouldPauseOnExit ()
 
DART_EXPORT void dart::Dart_SetShouldPauseOnExit (bool should_pause)
 
DART_EXPORT bool dart::Dart_IsPausedOnExit ()
 
DART_EXPORT void dart::Dart_SetPausedOnExit (bool paused)
 
DART_EXPORT void dart::Dart_SetStickyError (Dart_Handle error)
 
DART_EXPORT bool dart::Dart_HasStickyError ()
 
DART_EXPORT Dart_Handle dart::Dart_GetStickyError ()
 
DART_EXPORT void dart::Dart_NotifyIdle (int64_t deadline)
 
DART_EXPORT void dart::Dart_NotifyDestroyed ()
 
DART_EXPORT void dart::Dart_EnableHeapSampling ()
 
DART_EXPORT void dart::Dart_DisableHeapSampling ()
 
DART_EXPORT void dart::Dart_RegisterHeapSamplingCallback (Dart_HeapSamplingCreateCallback create_callback, Dart_HeapSamplingDeleteCallback delete_callback)
 
DART_EXPORT void dart::Dart_ReportSurvivingAllocations (Dart_HeapSamplingReportCallback callback, void *context, bool force_gc)
 
DART_EXPORT void dart::Dart_SetHeapSamplingPeriod (intptr_t bytes)
 
DART_EXPORT void dart::Dart_NotifyLowMemory ()
 
DART_EXPORT Dart_PerformanceMode dart::Dart_SetPerformanceMode (Dart_PerformanceMode mode)
 
DART_EXPORT void dart::Dart_ExitIsolate ()
 
DART_EXPORT Dart_Handle dart::Dart_CreateSnapshot (uint8_t **vm_snapshot_data_buffer, intptr_t *vm_snapshot_data_size, uint8_t **isolate_snapshot_data_buffer, intptr_t *isolate_snapshot_data_size, bool is_core)
 
DART_EXPORT bool dart::Dart_IsKernel (const uint8_t *buffer, intptr_t buffer_size)
 
DART_EXPORT char * dart::Dart_IsolateMakeRunnable (Dart_Isolate isolate)
 
DART_EXPORT void dart::Dart_SetMessageNotifyCallback (Dart_MessageNotifyCallback message_notify_callback)
 
DART_EXPORT Dart_MessageNotifyCallback dart::Dart_GetMessageNotifyCallback ()
 
static void dart::RunLoopDone (uword param)
 
DART_EXPORT Dart_Handle dart::Dart_RunLoop ()
 
DART_EXPORT bool dart::Dart_RunLoopAsync (bool errors_are_fatal, Dart_Port on_error_port, Dart_Port on_exit_port, char **error)
 
DART_EXPORT Dart_Handle dart::Dart_HandleMessage ()
 
DART_EXPORT bool dart::Dart_HandleServiceMessages ()
 
DART_EXPORT bool dart::Dart_HasServiceMessages ()
 
DART_EXPORT bool dart::Dart_HasLivePorts ()
 
DART_EXPORT bool dart::Dart_Post (Dart_Port port_id, Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_NewSendPort (Dart_Port port_id)
 
DART_EXPORT Dart_Handle dart::Dart_NewSendPortEx (Dart_PortEx portex_id)
 
DART_EXPORT Dart_Handle dart::Dart_SendPortGetId (Dart_Handle port, Dart_Port *port_id)
 
DART_EXPORT Dart_Handle dart::Dart_SendPortGetIdEx (Dart_Handle port, Dart_PortEx *portex_id)
 
DART_EXPORT Dart_Port dart::Dart_GetMainPortId ()
 
DART_EXPORT void dart::Dart_EnterScope ()
 
DART_EXPORT void dart::Dart_ExitScope ()
 
DART_EXPORT uint8_t * dart::Dart_ScopeAllocate (intptr_t size)
 
DART_EXPORT Dart_Handle dart::Dart_Null ()
 
DART_EXPORT bool dart::Dart_IsNull (Dart_Handle object)
 
DART_EXPORT Dart_Handle dart::Dart_EmptyString ()
 
DART_EXPORT Dart_Handle dart::Dart_TypeDynamic ()
 
DART_EXPORT Dart_Handle dart::Dart_TypeVoid ()
 
DART_EXPORT Dart_Handle dart::Dart_TypeNever ()
 
DART_EXPORT Dart_Handle dart::Dart_ObjectEquals (Dart_Handle obj1, Dart_Handle obj2, bool *value)
 
static bool dart::InstanceIsType (const Thread *thread, const Instance &instance, const Type &type)
 
DART_EXPORT Dart_Handle dart::Dart_ObjectIsType (Dart_Handle object, Dart_Handle type, bool *value)
 
DART_EXPORT bool dart::Dart_IsInstance (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsNumber (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsInteger (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsDouble (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsBoolean (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsString (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsStringLatin1 (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsList (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsMap (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsLibrary (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsType (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsFunction (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsVariable (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsTypeVariable (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsClosure (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsTearOff (Dart_Handle object)
 
DART_EXPORT bool dart::Dart_IsTypedData (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsByteBuffer (Dart_Handle handle)
 
DART_EXPORT bool dart::Dart_IsFuture (Dart_Handle handle)
 
DART_EXPORT Dart_Handle dart::Dart_InstanceGetType (Dart_Handle instance)
 
DART_EXPORT Dart_Handle dart::Dart_FunctionName (Dart_Handle function)
 
DART_EXPORT Dart_Handle dart::Dart_ClassName (Dart_Handle cls_type)
 
DART_EXPORT Dart_Handle dart::Dart_FunctionOwner (Dart_Handle function)
 
DART_EXPORT Dart_Handle dart::Dart_FunctionIsStatic (Dart_Handle function, bool *is_static)
 
DART_EXPORT Dart_Handle dart::Dart_ClosureFunction (Dart_Handle closure)
 
DART_EXPORT Dart_Handle dart::Dart_ClassLibrary (Dart_Handle cls_type)
 
DART_EXPORT Dart_Handle dart::Dart_IntegerFitsIntoInt64 (Dart_Handle integer, bool *fits)
 
DART_EXPORT Dart_Handle dart::Dart_IntegerFitsIntoUint64 (Dart_Handle integer, bool *fits)
 
DART_EXPORT Dart_Handle dart::Dart_NewInteger (int64_t value)
 
DART_EXPORT Dart_Handle dart::Dart_NewIntegerFromUint64 (uint64_t value)
 
DART_EXPORT Dart_Handle dart::Dart_NewIntegerFromHexCString (const char *str)
 
DART_EXPORT Dart_Handle dart::Dart_IntegerToInt64 (Dart_Handle integer, int64_t *value)
 
DART_EXPORT Dart_Handle dart::Dart_IntegerToUint64 (Dart_Handle integer, uint64_t *value)
 
DART_EXPORT Dart_Handle dart::Dart_IntegerToHexCString (Dart_Handle integer, const char **value)
 
DART_EXPORT Dart_Handle dart::Dart_NewDouble (double value)
 
DART_EXPORT Dart_Handle dart::Dart_DoubleValue (Dart_Handle double_obj, double *value)
 
DART_EXPORT Dart_Handle dart::Dart_GetStaticMethodClosure (Dart_Handle library, Dart_Handle cls_type, Dart_Handle function_name)
 
DART_EXPORT Dart_Handle dart::Dart_True ()
 
DART_EXPORT Dart_Handle dart::Dart_False ()
 
DART_EXPORT Dart_Handle dart::Dart_NewBoolean (bool value)
 
DART_EXPORT Dart_Handle dart::Dart_BooleanValue (Dart_Handle boolean_obj, bool *value)
 
DART_EXPORT Dart_Handle dart::Dart_StringLength (Dart_Handle str, intptr_t *len)
 
DART_EXPORT Dart_Handle dart::Dart_StringUTF8Length (Dart_Handle str, intptr_t *len)
 
DART_EXPORT Dart_Handle dart::Dart_NewStringFromCString (const char *str)
 
DART_EXPORT Dart_Handle dart::Dart_NewStringFromUTF8 (const uint8_t *utf8_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_NewStringFromUTF16 (const uint16_t *utf16_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_NewStringFromUTF32 (const int32_t *utf32_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_StringToCString (Dart_Handle object, const char **cstr)
 
DART_EXPORT Dart_Handle dart::Dart_StringToUTF8 (Dart_Handle str, uint8_t **utf8_array, intptr_t *length)
 
DART_EXPORT Dart_Handle dart::Dart_CopyUTF8EncodingOfString (Dart_Handle str, uint8_t *utf8_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_StringToLatin1 (Dart_Handle str, uint8_t *latin1_array, intptr_t *length)
 
DART_EXPORT Dart_Handle dart::Dart_StringToUTF16 (Dart_Handle str, uint16_t *utf16_array, intptr_t *length)
 
DART_EXPORT Dart_Handle dart::Dart_StringStorageSize (Dart_Handle str, intptr_t *size)
 
DART_EXPORT Dart_Handle dart::Dart_StringGetProperties (Dart_Handle object, intptr_t *char_size, intptr_t *str_len, void **peer)
 
DART_EXPORT Dart_Handle dart::Dart_NewList (intptr_t length)
 
static bool dart::CanTypeContainNull (const Type &type)
 
DART_EXPORT Dart_Handle dart::Dart_NewListOfType (Dart_Handle element_type, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_NewListOfTypeFilled (Dart_Handle element_type, Dart_Handle fill_object, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_ListLength (Dart_Handle list, intptr_t *len)
 
DART_EXPORT Dart_Handle dart::Dart_ListGetAt (Dart_Handle list, intptr_t index)
 
DART_EXPORT Dart_Handle dart::Dart_ListGetRange (Dart_Handle list, intptr_t offset, intptr_t length, Dart_Handle *result)
 
DART_EXPORT Dart_Handle dart::Dart_ListSetAt (Dart_Handle list, intptr_t index, Dart_Handle value)
 
static ObjectPtr dart::ResolveConstructor (const char *current_func, const Class &cls, const String &class_name, const String &dotted_name, int num_args)
 
static ObjectPtr dart::ThrowArgumentError (const char *exception_message)
 
DART_EXPORT Dart_Handle dart::Dart_ListGetAsBytes (Dart_Handle list, intptr_t offset, uint8_t *native_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_ListSetAsBytes (Dart_Handle list, intptr_t offset, const uint8_t *native_array, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_MapGetAt (Dart_Handle map, Dart_Handle key)
 
DART_EXPORT Dart_Handle dart::Dart_MapContainsKey (Dart_Handle map, Dart_Handle key)
 
DART_EXPORT Dart_Handle dart::Dart_MapKeys (Dart_Handle map)
 
static Dart_TypedData_Type dart::GetType (intptr_t class_id)
 
DART_EXPORT Dart_TypedData_Type dart::Dart_GetTypeOfTypedData (Dart_Handle object)
 
DART_EXPORT Dart_TypedData_Type dart::Dart_GetTypeOfExternalTypedData (Dart_Handle object)
 
static Dart_Handle dart::NewByteData (Thread *thread, intptr_t length)
 
static Dart_Handle dart::NewTypedData (Thread *thread, intptr_t cid, intptr_t length)
 
static Dart_Handle dart::NewExternalTypedData (Thread *thread, intptr_t cid, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback, bool unmodifiable)
 
static Dart_Handle dart::NewExternalByteData (Thread *thread, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback, bool unmodifiable)
 
DART_EXPORT Dart_Handle dart::Dart_NewTypedData (Dart_TypedData_Type type, intptr_t length)
 
static Dart_Handle dart::NewExternalTypedDataWithFinalizer (Dart_TypedData_Type type, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback, bool unmodifiable)
 
DART_EXPORT Dart_Handle dart::Dart_NewExternalTypedData (Dart_TypedData_Type type, void *data, intptr_t length)
 
DART_EXPORT Dart_Handle dart::Dart_NewExternalTypedDataWithFinalizer (Dart_TypedData_Type type, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
DART_EXPORT Dart_Handle dart::Dart_NewUnmodifiableExternalTypedDataWithFinalizer (Dart_TypedData_Type type, const void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
 
static ObjectPtr dart::GetByteBufferConstructor (Thread *thread, const String &class_name, const String &constructor_name, intptr_t num_args)
 
DART_EXPORT Dart_Handle dart::Dart_NewByteBuffer (Dart_Handle typed_data)
 
DART_EXPORT Dart_Handle dart::Dart_TypedDataAcquireData (Dart_Handle object, Dart_TypedData_Type *type, void **data, intptr_t *len)
 
DART_EXPORT Dart_Handle dart::Dart_TypedDataReleaseData (Dart_Handle object)
 
DART_EXPORT Dart_Handle dart::Dart_GetDataFromByteBuffer (Dart_Handle object)
 
DART_EXPORT Dart_Handle dart::Dart_New (Dart_Handle type, Dart_Handle constructor_name, int number_of_arguments, Dart_Handle *arguments)
 
static InstancePtr dart::AllocateObject (Thread *thread, const Class &cls)
 
DART_EXPORT Dart_Handle dart::Dart_Allocate (Dart_Handle type)
 
DART_EXPORT Dart_Handle dart::Dart_AllocateWithNativeFields (Dart_Handle type, intptr_t num_native_fields, const intptr_t *native_fields)
 
static Dart_Handle dart::SetupArguments (Thread *thread, int num_args, Dart_Handle *arguments, int extra_args, Array *args)
 
DART_EXPORT Dart_Handle dart::Dart_InvokeConstructor (Dart_Handle object, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
 
DART_EXPORT Dart_Handle dart::Dart_Invoke (Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
 
DART_EXPORT Dart_Handle dart::Dart_InvokeClosure (Dart_Handle closure, int number_of_arguments, Dart_Handle *arguments)
 
DART_EXPORT Dart_Handle dart::Dart_GetField (Dart_Handle container, Dart_Handle name)
 
DART_EXPORT Dart_Handle dart::Dart_SetField (Dart_Handle container, Dart_Handle name, Dart_Handle value)
 
DART_EXPORT Dart_Handle dart::Dart_ThrowException (Dart_Handle exception)
 
DART_EXPORT Dart_Handle dart::Dart_ReThrowException (Dart_Handle exception, Dart_Handle stacktrace)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeInstanceFieldCount (Dart_Handle obj, int *count)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeInstanceField (Dart_Handle obj, int index, intptr_t *value)
 
DART_EXPORT Dart_Handle dart::Dart_SetNativeInstanceField (Dart_Handle obj, int index, intptr_t value)
 
DART_EXPORT void * dart::Dart_GetNativeIsolateGroupData (Dart_NativeArguments args)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeArguments (Dart_NativeArguments args, int num_arguments, const Dart_NativeArgument_Descriptor *argument_descriptors, Dart_NativeArgument_Value *arg_values)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeArgument (Dart_NativeArguments args, int index)
 
DART_EXPORT int dart::Dart_GetNativeArgumentCount (Dart_NativeArguments args)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeFieldsOfArgument (Dart_NativeArguments args, int arg_index, int num_fields, intptr_t *field_values)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeReceiver (Dart_NativeArguments args, intptr_t *value)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeStringArgument (Dart_NativeArguments args, int arg_index, void **peer)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeIntegerArgument (Dart_NativeArguments args, int index, int64_t *value)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeBooleanArgument (Dart_NativeArguments args, int index, bool *value)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeDoubleArgument (Dart_NativeArguments args, int index, double *value)
 
DART_EXPORT void dart::Dart_SetReturnValue (Dart_NativeArguments args, Dart_Handle retval)
 
DART_EXPORT void dart::Dart_SetWeakHandleReturnValue (Dart_NativeArguments args, Dart_WeakPersistentHandle rval)
 
DART_EXPORT Dart_Handle dart::Dart_SetEnvironmentCallback (Dart_EnvironmentCallback callback)
 
DART_EXPORT void dart::Dart_SetBooleanReturnValue (Dart_NativeArguments args, bool retval)
 
DART_EXPORT void dart::Dart_SetIntegerReturnValue (Dart_NativeArguments args, int64_t retval)
 
DART_EXPORT void dart::Dart_SetDoubleReturnValue (Dart_NativeArguments args, double retval)
 
DART_EXPORT Dart_Handle dart::Dart_SetLibraryTagHandler (Dart_LibraryTagHandler handler)
 
DART_EXPORT Dart_Handle dart::Dart_SetDeferredLoadHandler (Dart_DeferredLoadHandler handler)
 
DART_EXPORT Dart_Handle dart::Dart_LoadScriptFromKernel (const uint8_t *buffer, intptr_t buffer_size)
 
DART_EXPORT Dart_Handle dart::Dart_RootLibrary ()
 
DART_EXPORT Dart_Handle dart::Dart_SetRootLibrary (Dart_Handle library)
 
DART_EXPORT Dart_Handle dart::Dart_GetClass (Dart_Handle library, Dart_Handle class_name)
 
static Dart_Handle dart::GetTypeCommon (Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments, Nullability nullability)
 
DART_EXPORT Dart_Handle dart::Dart_GetType (Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments)
 
DART_EXPORT Dart_Handle dart::Dart_GetNullableType (Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments)
 
DART_EXPORT Dart_Handle dart::Dart_GetNonNullableType (Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments)
 
static Dart_Handle dart::TypeToHelper (Dart_Handle type, Nullability nullability)
 
DART_EXPORT Dart_Handle dart::Dart_TypeToNullableType (Dart_Handle type)
 
DART_EXPORT Dart_Handle dart::Dart_TypeToNonNullableType (Dart_Handle type)
 
static Dart_Handle dart::IsOfTypeNullabilityHelper (Dart_Handle type, Nullability nullability, bool *result)
 
DART_EXPORT Dart_Handle dart::Dart_IsNullableType (Dart_Handle type, bool *result)
 
DART_EXPORT Dart_Handle dart::Dart_IsNonNullableType (Dart_Handle type, bool *result)
 
DART_EXPORT Dart_Handle dart::Dart_LibraryUrl (Dart_Handle library)
 
DART_EXPORT Dart_Handle dart::Dart_LibraryResolvedUrl (Dart_Handle library)
 
DART_EXPORT Dart_Handle dart::Dart_GetLoadedLibraries ()
 
DART_EXPORT Dart_Handle dart::Dart_LookupLibrary (Dart_Handle url)
 
DART_EXPORT Dart_Handle dart::Dart_LibraryHandleError (Dart_Handle library_in, Dart_Handle error_in)
 
static Dart_Handle dart::LoadLibrary (Thread *T, const ExternalTypedData &td)
 
DART_EXPORT Dart_Handle dart::Dart_LoadLibraryFromKernel (const uint8_t *buffer, intptr_t buffer_size)
 
DART_EXPORT Dart_Handle dart::Dart_LoadLibrary (Dart_Handle kernel_buffer)
 
DART_EXPORT Dart_Handle dart::Dart_FinalizeLoading (bool complete_futures)
 
static Dart_Handle dart::DeferredLoadComplete (intptr_t loading_unit_id, bool error, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions, const char *error_message, bool transient_error)
 
DART_EXPORT Dart_Handle dart::Dart_DeferredLoadComplete (intptr_t loading_unit_id, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions)
 
DART_EXPORT Dart_Handle dart::Dart_DeferredLoadCompleteError (intptr_t loading_unit_id, const char *error_message, bool transient)
 
DART_EXPORT Dart_Handle dart::Dart_SetNativeResolver (Dart_Handle library, Dart_NativeEntryResolver resolver, Dart_NativeEntrySymbol symbol)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeResolver (Dart_Handle library, Dart_NativeEntryResolver *resolver)
 
DART_EXPORT Dart_Handle dart::Dart_GetNativeSymbol (Dart_Handle library, Dart_NativeEntrySymbol *resolver)
 
DART_EXPORT Dart_Handle dart::Dart_SetFfiNativeResolver (Dart_Handle library, Dart_FfiNativeResolver resolver)
 
DART_EXPORT void dart::Dart_InitializeNativeAssetsResolver (NativeAssetsApi *native_assets_api)
 
DART_EXPORT Dart_Handle dart::Dart_GetPeer (Dart_Handle object, void **peer)
 
DART_EXPORT Dart_Handle dart::Dart_SetPeer (Dart_Handle object, void *peer)
 
DART_EXPORT bool dart::Dart_IsKernelIsolate (Dart_Isolate isolate)
 
DART_EXPORT bool dart::Dart_KernelIsolateIsRunning ()
 
DART_EXPORT Dart_Port dart::Dart_KernelPort ()
 
DART_EXPORT Dart_KernelCompilationResult dart::Dart_CompileToKernel (const char *script_uri, const uint8_t *platform_kernel, intptr_t platform_kernel_size, bool incremental_compile, bool for_snapshot, bool embed_sources, const char *package_config, Dart_KernelCompilationVerbosityLevel verbosity)
 
DART_EXPORT Dart_KernelCompilationResult dart::Dart_KernelListDependencies ()
 
DART_EXPORT void dart::Dart_SetDartLibrarySourcesKernel (const uint8_t *platform_kernel, const intptr_t platform_kernel_size)
 
DART_EXPORT bool dart::Dart_DetectNullSafety (const char *script_uri, const char *package_config, const char *original_working_directory, const uint8_t *snapshot_data, const uint8_t *snapshot_instructions, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
 
DART_EXPORT bool dart::Dart_IsServiceIsolate (Dart_Isolate isolate)
 
DART_EXPORT void dart::Dart_RegisterIsolateServiceRequestCallback (const char *name, Dart_ServiceRequestCallback callback, void *user_data)
 
DART_EXPORT void dart::Dart_RegisterRootServiceRequestCallback (const char *name, Dart_ServiceRequestCallback callback, void *user_data)
 
DART_EXPORT void dart::Dart_SetEmbedderInformationCallback (Dart_EmbedderInformationCallback callback)
 
DART_EXPORT char * dart::Dart_SetServiceStreamCallbacks (Dart_ServiceStreamListenCallback listen_callback, Dart_ServiceStreamCancelCallback cancel_callback)
 
DART_EXPORT char * dart::Dart_ServiceSendDataEvent (const char *stream_id, const char *event_kind, const uint8_t *bytes, intptr_t bytes_length)
 
DART_EXPORT void dart::Dart_SetDwarfStackTraceFootnoteCallback (Dart_DwarfStackTraceFootnoteCallback callback)
 
DART_EXPORT char * dart::Dart_SetFileModifiedCallback (Dart_FileModifiedCallback file_modified_callback)
 
DART_EXPORT bool dart::Dart_IsReloading ()
 
DART_EXPORT bool dart::Dart_SetEnabledTimelineCategory (const char *categories)
 
DART_EXPORT int64_t dart::Dart_TimelineGetMicros ()
 
DART_EXPORT int64_t dart::Dart_TimelineGetTicks ()
 
DART_EXPORT int64_t dart::Dart_TimelineGetTicksFrequency ()
 
DART_EXPORT void dart::Dart_RecordTimelineEvent (const char *label, int64_t timestamp0, int64_t timestamp1_or_id, intptr_t flow_id_count, const int64_t *flow_ids, Dart_Timeline_Event_Type type, intptr_t argument_count, const char **argument_names, const char **argument_values)
 
DART_EXPORT void dart::Dart_SetTimelineRecorderCallback (Dart_TimelineRecorderCallback callback)
 
DART_EXPORT void dart::Dart_SetThreadName (const char *name)
 
DART_EXPORT Dart_Handle dart::Dart_SortClasses ()
 
DART_EXPORT Dart_Handle dart::Dart_Precompile ()
 
DART_EXPORT Dart_Handle dart::Dart_CreateAppAOTSnapshotAsAssembly (Dart_StreamingWriteCallback callback, void *callback_data, bool strip, void *debug_callback_data)
 
DART_EXPORT Dart_Handle dart::Dart_CreateAppAOTSnapshotAsAssemblies (Dart_CreateLoadingUnitCallback next_callback, void *next_callback_data, bool strip, Dart_StreamingWriteCallback write_callback, Dart_StreamingCloseCallback close_callback)
 
DART_EXPORT Dart_Handle dart::Dart_CreateVMAOTSnapshotAsAssembly (Dart_StreamingWriteCallback callback, void *callback_data)
 
DART_EXPORT Dart_Handle dart::Dart_CreateAppAOTSnapshotAsElf (Dart_StreamingWriteCallback callback, void *callback_data, bool strip, void *debug_callback_data)
 
DART_EXPORT Dart_Handle dart::Dart_CreateAppAOTSnapshotAsElfs (Dart_CreateLoadingUnitCallback next_callback, void *next_callback_data, bool strip, Dart_StreamingWriteCallback write_callback, Dart_StreamingCloseCallback close_callback)
 
DART_EXPORT Dart_Handle dart::Dart_LoadingUnitLibraryUris (intptr_t loading_unit_id)
 
static void dart::DropRegExpMatchCode (Zone *zone)
 
static void dart::KillNonMainIsolatesSlow (Thread *thread, Isolate *main_isolate)
 
DART_EXPORT Dart_Handle dart::Dart_CreateAppJITSnapshotAsBlobs (uint8_t **isolate_snapshot_data_buffer, intptr_t *isolate_snapshot_data_size, uint8_t **isolate_snapshot_instructions_buffer, intptr_t *isolate_snapshot_instructions_size)
 
DART_EXPORT Dart_Handle dart::Dart_GetObfuscationMap (uint8_t **buffer, intptr_t *buffer_length)
 
DART_EXPORT bool dart::Dart_IsPrecompiledRuntime ()
 
DART_EXPORT void dart::Dart_DumpNativeStackTrace (void *context)
 
DART_EXPORT void dart::Dart_PrepareToAbort ()
 
DART_EXPORT Dart_Handle dart::Dart_GetCurrentUserTag ()
 
DART_EXPORT Dart_Handle dart::Dart_GetDefaultUserTag ()
 
DART_EXPORT Dart_Handle dart::Dart_NewUserTag (const char *label)
 
DART_EXPORT Dart_Handle dart::Dart_SetCurrentUserTag (Dart_Handle user_tag)
 
DART_EXPORT char * dart::Dart_GetUserTagLabel (Dart_Handle user_tag)
 
DART_EXPORT char * dart::Dart_WriteHeapSnapshot (Dart_HeapSnapshotWriteChunkCallback write, void *context)
 

Macro Definition Documentation

◆ CHECK_ERROR_HANDLE

#define CHECK_ERROR_HANDLE (   error)
Value:
{ \
ErrorPtr err = (error); \
if (err != Error::null()) { \
return Api::NewHandle(T, err); \
} \
}
const uint8_t uint32_t uint32_t GError ** error
#define T
Definition: precompiler.cc:65

Definition at line 91 of file dart_api_impl.cc.

◆ DEFINE_UNWRAP

#define DEFINE_UNWRAP (   type)
Value:
const type& Api::Unwrap##type##Handle(Zone* zone, Dart_Handle dart_handle) { \
const Object& obj = Object::Handle(zone, Api::UnwrapHandle(dart_handle)); \
if (obj.Is##type()) { \
return type::Cast(obj); \
} \
return type::Handle(zone); \
}
GLenum type
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258

Definition at line 387 of file dart_api_impl.cc.

◆ GET_LIST_ELEMENT

#define GET_LIST_ELEMENT (   thread,
  type,
  obj,
  index 
)
Value:
const type& array_obj = type::Cast(obj); \
if ((index >= 0) && (index < array_obj.Length())) { \
return Api::NewHandle(thread, array_obj.At(index)); \
} \
return Api::NewError("Invalid index passed into access list element");

Definition at line 3196 of file dart_api_impl.cc.

◆ GET_LIST_ELEMENT_AS_BYTES

#define GET_LIST_ELEMENT_AS_BYTES (   type,
  obj,
  native_array,
  offset,
  length 
)
Value:
const type& array = type::Cast(obj); \
if (Utils::RangeCheck(offset, length, array.Length())) { \
Object& element = Object::Handle(Z); \
for (int i = 0; i < length; i++) { \
element = array.At(offset + i); \
if (!element.IsInteger()) { \
return Api::NewHandle( \
T, ThrowArgumentError("List contains non-int elements")); \
} \
const Integer& integer = Integer::Cast(element); \
native_array[i] = static_cast<uint8_t>(integer.AsInt64Value() & 0xff); \
ASSERT(integer.AsInt64Value() <= 0xff); \
} \
return Api::Success(); \
} \
return Api::NewError("Invalid length passed into access array elements");
#define Z
size_t length
static ObjectPtr ThrowArgumentError(const char *exception_message)
SeparatedVector2 offset

Definition at line 3390 of file dart_api_impl.cc.

◆ GET_LIST_LENGTH

#define GET_LIST_LENGTH (   zone,
  type,
  obj,
  len 
)
Value:
type& array = type::Handle(zone); \
array ^= obj.ptr(); \
*len = array.Length(); \
return Api::Success();

Definition at line 3145 of file dart_api_impl.cc.

◆ GET_LIST_RANGE

#define GET_LIST_RANGE (   thread,
  type,
  obj,
  offset,
  length 
)
Value:
const type& array_obj = type::Cast(obj); \
if ((offset >= 0) && (offset + length <= array_obj.Length())) { \
for (intptr_t index = 0; index < length; ++index) { \
result[index] = Api::NewHandle(thread, array_obj.At(index + offset)); \
} \
return Api::Success(); \
} \
return Api::NewError("Invalid offset/length passed into access list");

Definition at line 3226 of file dart_api_impl.cc.

◆ ISOLATE_GROUP_METRIC_API

#define ISOLATE_GROUP_METRIC_API (   type,
  variable,
  name,
  unit 
)
Value:
DART_EXPORT int64_t Dart_IsolateGroup##variable##Metric( \
Dart_IsolateGroup isolate_group) { \
if (isolate_group == nullptr) { \
FATAL("%s expects argument 'isolate_group' to be non-null.", \
} \
IsolateGroup* group = reinterpret_cast<IsolateGroup*>(isolate_group); \
return group->Get##variable##Metric()->Value(); \
}
struct _Dart_IsolateGroup * Dart_IsolateGroup
Definition: dart_api.h:89
#define CURRENT_FUNC
Definition: dart_api_impl.h:28
#define DART_EXPORT

Definition at line 1193 of file dart_api_impl.cc.

◆ ISOLATE_METRIC_API

#define ISOLATE_METRIC_API (   type,
  variable,
  name,
  unit 
)
Value:
DART_EXPORT int64_t Dart_Isolate##variable##Metric(Dart_Isolate isolate) { \
if (isolate == nullptr) { \
FATAL("%s expects argument 'isolate' to be non-null.", CURRENT_FUNC); \
} \
Isolate* iso = reinterpret_cast<Isolate*>(isolate); \
return iso->Get##variable##Metric()->Value(); \
}
struct _Dart_Isolate * Dart_Isolate
Definition: dart_api.h:88

Definition at line 1207 of file dart_api_impl.cc.

◆ SET_LIST_ELEMENT

#define SET_LIST_ELEMENT (   type,
  obj,
  index,
  value 
)
Value:
const type& array = type::Cast(obj); \
const Object& value_obj = Object::Handle(Z, Api::UnwrapHandle(value)); \
if (!value_obj.IsNull() && !value_obj.IsInstance()) { \
RETURN_TYPE_ERROR(Z, value, Instance); \
} \
if ((index >= 0) && (index < array.Length())) { \
array.SetAt(index, value_obj); \
return Api::Success(); \
} \
return Api::NewError("Invalid index passed into set list element");
uint8_t value

Definition at line 3277 of file dart_api_impl.cc.

◆ SET_LIST_ELEMENT_AS_BYTES

#define SET_LIST_ELEMENT_AS_BYTES (   type,
  obj,
  native_array,
  offset,
  length 
)
Value:
const type& array = type::Cast(obj); \
Integer& integer = Integer::Handle(Z); \
if (Utils::RangeCheck(offset, length, array.Length())) { \
for (int i = 0; i < length; i++) { \
integer = Integer::New(native_array[i]); \
array.SetAt(offset + i, integer); \
} \
return Api::Success(); \
} \
return Api::NewError("Invalid length passed into set array elements");

Definition at line 3475 of file dart_api_impl.cc.

◆ Z

#define Z   (T->zone())

Definition at line 67 of file dart_api_impl.cc.