#![no_std]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_Isolate {
_unused: [u8; 0],
}
pub type Dart_Isolate = *mut _Dart_Isolate;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_IsolateGroup {
_unused: [u8; 0],
}
pub type Dart_IsolateGroup = *mut _Dart_IsolateGroup;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_Handle {
_unused: [u8; 0],
}
pub type Dart_Handle = *mut _Dart_Handle;
pub type Dart_PersistentHandle = Dart_Handle;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_WeakPersistentHandle {
_unused: [u8; 0],
}
pub type Dart_WeakPersistentHandle = *mut _Dart_WeakPersistentHandle;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_FinalizableHandle {
_unused: [u8; 0],
}
pub type Dart_FinalizableHandle = *mut _Dart_FinalizableHandle;
pub type Dart_HandleFinalizer = ::core::option::Option<
unsafe extern "C" fn(isolate_callback_data: *mut libc::c_void, peer: *mut libc::c_void),
>;
extern "C" {
pub fn Dart_IsError(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsApiError(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsUnhandledExceptionError(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsCompilationError(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsFatalError(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_GetError(handle: Dart_Handle) -> *const libc::c_char;
}
extern "C" {
pub fn Dart_ErrorHasException(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_ErrorGetException(handle: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ErrorGetStackTrace(handle: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewApiError(error: *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewCompilationError(error: *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewUnhandledExceptionError(exception: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_PropagateError(handle: Dart_Handle);
}
extern "C" {
pub fn Dart_ToString(object: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IdentityEquals(obj1: Dart_Handle, obj2: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_HandleFromPersistent(object: Dart_PersistentHandle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_HandleFromWeakPersistent(object: Dart_WeakPersistentHandle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewPersistentHandle(object: Dart_Handle) -> Dart_PersistentHandle;
}
extern "C" {
pub fn Dart_SetPersistentHandle(obj1: Dart_PersistentHandle, obj2: Dart_Handle);
}
extern "C" {
pub fn Dart_DeletePersistentHandle(object: Dart_PersistentHandle);
}
extern "C" {
pub fn Dart_NewWeakPersistentHandle(
object: Dart_Handle,
peer: *mut libc::c_void,
external_allocation_size: isize,
callback: Dart_HandleFinalizer,
) -> Dart_WeakPersistentHandle;
}
extern "C" {
pub fn Dart_DeleteWeakPersistentHandle(object: Dart_WeakPersistentHandle);
}
extern "C" {
pub fn Dart_NewFinalizableHandle(
object: Dart_Handle,
peer: *mut libc::c_void,
external_allocation_size: isize,
callback: Dart_HandleFinalizer,
) -> Dart_FinalizableHandle;
}
extern "C" {
pub fn Dart_DeleteFinalizableHandle(
object: Dart_FinalizableHandle,
strong_ref_to_object: Dart_Handle,
);
}
extern "C" {
pub fn Dart_VersionString() -> *const libc::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_IsolateFlags {
pub version: i32,
pub enable_asserts: bool,
pub use_field_guards: bool,
pub use_osr: bool,
pub obfuscate: bool,
pub load_vmservice_library: bool,
pub null_safety: bool,
pub is_system_isolate: bool,
pub is_service_isolate: bool,
pub is_kernel_isolate: bool,
pub snapshot_is_dontneed_safe: bool,
pub branch_coverage: bool,
}
extern "C" {
pub fn Dart_IsolateFlagsInitialize(flags: *mut Dart_IsolateFlags);
}
pub type Dart_IsolateGroupCreateCallback = ::core::option::Option<
unsafe extern "C" fn(
script_uri: *const libc::c_char,
main: *const libc::c_char,
package_root: *const libc::c_char,
package_config: *const libc::c_char,
flags: *mut Dart_IsolateFlags,
isolate_data: *mut libc::c_void,
error: *mut *mut libc::c_char,
) -> Dart_Isolate,
>;
pub type Dart_InitializeIsolateCallback = ::core::option::Option<
unsafe extern "C" fn(
child_isolate_data: *mut *mut libc::c_void,
error: *mut *mut libc::c_char,
) -> bool,
>;
pub type Dart_IsolateShutdownCallback = ::core::option::Option<
unsafe extern "C" fn(isolate_group_data: *mut libc::c_void, isolate_data: *mut libc::c_void),
>;
pub type Dart_IsolateCleanupCallback = ::core::option::Option<
unsafe extern "C" fn(isolate_group_data: *mut libc::c_void, isolate_data: *mut libc::c_void),
>;
pub type Dart_IsolateGroupCleanupCallback =
::core::option::Option<unsafe extern "C" fn(isolate_group_data: *mut libc::c_void)>;
pub type Dart_ThreadStartCallback = ::core::option::Option<unsafe extern "C" fn()>;
pub type Dart_ThreadExitCallback = ::core::option::Option<unsafe extern "C" fn()>;
pub type Dart_FileOpenCallback = ::core::option::Option<
unsafe extern "C" fn(name: *const libc::c_char, write: bool) -> *mut libc::c_void,
>;
pub type Dart_FileReadCallback = ::core::option::Option<
unsafe extern "C" fn(data: *mut *mut u8, file_length: *mut isize, stream: *mut libc::c_void),
>;
pub type Dart_FileWriteCallback = ::core::option::Option<
unsafe extern "C" fn(data: *const libc::c_void, length: isize, stream: *mut libc::c_void),
>;
pub type Dart_FileCloseCallback =
::core::option::Option<unsafe extern "C" fn(stream: *mut libc::c_void)>;
pub type Dart_EntropySource =
::core::option::Option<unsafe extern "C" fn(buffer: *mut u8, length: isize) -> bool>;
pub type Dart_GetVMServiceAssetsArchive =
::core::option::Option<unsafe extern "C" fn() -> Dart_Handle>;
pub type Dart_OnNewCodeCallback = ::core::option::Option<
unsafe extern "C" fn(
observer: *mut Dart_CodeObserver,
name: *const libc::c_char,
base: usize,
size: usize,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_CodeObserver {
pub data: *mut libc::c_void,
pub on_new_code: Dart_OnNewCodeCallback,
}
pub type Dart_RegisterKernelBlobCallback = ::core::option::Option<
unsafe extern "C" fn(
kernel_buffer: *const u8,
kernel_buffer_size: isize,
) -> *const libc::c_char,
>;
pub type Dart_UnregisterKernelBlobCallback =
::core::option::Option<unsafe extern "C" fn(kernel_blob_uri: *const libc::c_char)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_InitializeParams {
pub version: i32,
pub vm_snapshot_data: *const u8,
pub vm_snapshot_instructions: *const u8,
pub create_group: Dart_IsolateGroupCreateCallback,
pub initialize_isolate: Dart_InitializeIsolateCallback,
pub shutdown_isolate: Dart_IsolateShutdownCallback,
pub cleanup_isolate: Dart_IsolateCleanupCallback,
pub cleanup_group: Dart_IsolateGroupCleanupCallback,
pub thread_start: Dart_ThreadStartCallback,
pub thread_exit: Dart_ThreadExitCallback,
pub file_open: Dart_FileOpenCallback,
pub file_read: Dart_FileReadCallback,
pub file_write: Dart_FileWriteCallback,
pub file_close: Dart_FileCloseCallback,
pub entropy_source: Dart_EntropySource,
pub get_service_assets: Dart_GetVMServiceAssetsArchive,
pub start_kernel_isolate: bool,
pub code_observer: *mut Dart_CodeObserver,
pub register_kernel_blob: Dart_RegisterKernelBlobCallback,
pub unregister_kernel_blob: Dart_UnregisterKernelBlobCallback,
}
extern "C" {
pub fn Dart_Initialize(params: *mut Dart_InitializeParams) -> *mut libc::c_char;
}
extern "C" {
pub fn Dart_Cleanup() -> *mut libc::c_char;
}
extern "C" {
pub fn Dart_SetVMFlags(argc: libc::c_int, argv: *mut *const libc::c_char) -> *mut libc::c_char;
}
extern "C" {
pub fn Dart_IsVMFlagSet(flag_name: *const libc::c_char) -> bool;
}
extern "C" {
pub fn Dart_CreateIsolateGroup(
script_uri: *const libc::c_char,
name: *const libc::c_char,
isolate_snapshot_data: *const u8,
isolate_snapshot_instructions: *const u8,
flags: *mut Dart_IsolateFlags,
isolate_group_data: *mut libc::c_void,
isolate_data: *mut libc::c_void,
error: *mut *mut libc::c_char,
) -> Dart_Isolate;
}
extern "C" {
pub fn Dart_CreateIsolateInGroup(
group_member: Dart_Isolate,
name: *const libc::c_char,
shutdown_callback: Dart_IsolateShutdownCallback,
cleanup_callback: Dart_IsolateCleanupCallback,
child_isolate_data: *mut libc::c_void,
error: *mut *mut libc::c_char,
) -> Dart_Isolate;
}
extern "C" {
pub fn Dart_CreateIsolateGroupFromKernel(
script_uri: *const libc::c_char,
name: *const libc::c_char,
kernel_buffer: *const u8,
kernel_buffer_size: isize,
flags: *mut Dart_IsolateFlags,
isolate_group_data: *mut libc::c_void,
isolate_data: *mut libc::c_void,
error: *mut *mut libc::c_char,
) -> Dart_Isolate;
}
extern "C" {
pub fn Dart_ShutdownIsolate();
}
extern "C" {
pub fn Dart_CurrentIsolate() -> Dart_Isolate;
}
extern "C" {
pub fn Dart_CurrentIsolateData() -> *mut libc::c_void;
}
extern "C" {
pub fn Dart_IsolateData(isolate: Dart_Isolate) -> *mut libc::c_void;
}
extern "C" {
pub fn Dart_CurrentIsolateGroup() -> Dart_IsolateGroup;
}
extern "C" {
pub fn Dart_CurrentIsolateGroupData() -> *mut libc::c_void;
}
pub type Dart_IsolateGroupId = i64;
extern "C" {
pub fn Dart_CurrentIsolateGroupId() -> Dart_IsolateGroupId;
}
extern "C" {
pub fn Dart_IsolateGroupData(isolate: Dart_Isolate) -> *mut libc::c_void;
}
extern "C" {
pub fn Dart_DebugName() -> Dart_Handle;
}
extern "C" {
pub fn Dart_DebugNameToCString() -> *const libc::c_char;
}
extern "C" {
pub fn Dart_IsolateServiceId(isolate: Dart_Isolate) -> *const libc::c_char;
}
extern "C" {
pub fn Dart_EnterIsolate(isolate: Dart_Isolate);
}
extern "C" {
pub fn Dart_KillIsolate(isolate: Dart_Isolate);
}
extern "C" {
pub fn Dart_NotifyIdle(deadline: i64);
}
pub type Dart_HeapSamplingReportCallback = ::core::option::Option<
unsafe extern "C" fn(context: *mut libc::c_void, data: *mut libc::c_void),
>;
pub type Dart_HeapSamplingCreateCallback = ::core::option::Option<
unsafe extern "C" fn(
isolate: Dart_Isolate,
isolate_group: Dart_IsolateGroup,
cls_name: *const libc::c_char,
allocation_size: isize,
) -> *mut libc::c_void,
>;
pub type Dart_HeapSamplingDeleteCallback =
::core::option::Option<unsafe extern "C" fn(data: *mut libc::c_void)>;
extern "C" {
pub fn Dart_EnableHeapSampling();
}
extern "C" {
pub fn Dart_DisableHeapSampling();
}
extern "C" {
pub fn Dart_RegisterHeapSamplingCallback(
create_callback: Dart_HeapSamplingCreateCallback,
delete_callback: Dart_HeapSamplingDeleteCallback,
);
}
extern "C" {
pub fn Dart_ReportSurvivingAllocations(
callback: Dart_HeapSamplingReportCallback,
context: *mut libc::c_void,
force_gc: bool,
);
}
extern "C" {
pub fn Dart_SetHeapSamplingPeriod(bytes: isize);
}
extern "C" {
pub fn Dart_NotifyDestroyed();
}
extern "C" {
pub fn Dart_NotifyLowMemory();
}
pub const Dart_PerformanceMode_Dart_PerformanceMode_Default: Dart_PerformanceMode = 0;
pub const Dart_PerformanceMode_Dart_PerformanceMode_Latency: Dart_PerformanceMode = 1;
pub const Dart_PerformanceMode_Dart_PerformanceMode_Throughput: Dart_PerformanceMode = 2;
pub const Dart_PerformanceMode_Dart_PerformanceMode_Memory: Dart_PerformanceMode = 3;
pub type Dart_PerformanceMode = libc::c_int;
extern "C" {
pub fn Dart_SetPerformanceMode(mode: Dart_PerformanceMode) -> Dart_PerformanceMode;
}
extern "C" {
pub fn Dart_StartProfiling();
}
extern "C" {
pub fn Dart_StopProfiling();
}
extern "C" {
pub fn Dart_ThreadDisableProfiling();
}
extern "C" {
pub fn Dart_ThreadEnableProfiling();
}
extern "C" {
pub fn Dart_AddSymbols(
dso_name: *const libc::c_char,
buffer: *mut libc::c_void,
buffer_size: isize,
);
}
extern "C" {
pub fn Dart_ExitIsolate();
}
extern "C" {
pub fn Dart_CreateSnapshot(
vm_snapshot_data_buffer: *mut *mut u8,
vm_snapshot_data_size: *mut isize,
isolate_snapshot_data_buffer: *mut *mut u8,
isolate_snapshot_data_size: *mut isize,
is_core: bool,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsKernel(buffer: *const u8, buffer_size: isize) -> bool;
}
extern "C" {
pub fn Dart_IsolateMakeRunnable(isolate: Dart_Isolate) -> *mut libc::c_char;
}
pub type Dart_Port = i64;
pub type Dart_MessageNotifyCallback =
::core::option::Option<unsafe extern "C" fn(destination_isolate: Dart_Isolate)>;
extern "C" {
pub fn Dart_SetMessageNotifyCallback(message_notify_callback: Dart_MessageNotifyCallback);
}
extern "C" {
pub fn Dart_GetMessageNotifyCallback() -> Dart_MessageNotifyCallback;
}
extern "C" {
pub fn Dart_ShouldPauseOnStart() -> bool;
}
extern "C" {
pub fn Dart_SetShouldPauseOnStart(should_pause: bool);
}
extern "C" {
pub fn Dart_IsPausedOnStart() -> bool;
}
extern "C" {
pub fn Dart_SetPausedOnStart(paused: bool);
}
extern "C" {
pub fn Dart_ShouldPauseOnExit() -> bool;
}
extern "C" {
pub fn Dart_SetShouldPauseOnExit(should_pause: bool);
}
extern "C" {
pub fn Dart_IsPausedOnExit() -> bool;
}
extern "C" {
pub fn Dart_SetPausedOnExit(paused: bool);
}
extern "C" {
pub fn Dart_SetStickyError(error: Dart_Handle);
}
extern "C" {
pub fn Dart_HasStickyError() -> bool;
}
extern "C" {
pub fn Dart_GetStickyError() -> Dart_Handle;
}
extern "C" {
pub fn Dart_HandleMessage() -> Dart_Handle;
}
extern "C" {
pub fn Dart_HandleServiceMessages() -> bool;
}
extern "C" {
pub fn Dart_HasServiceMessages() -> bool;
}
extern "C" {
pub fn Dart_RunLoop() -> Dart_Handle;
}
extern "C" {
pub fn Dart_RunLoopAsync(
errors_are_fatal: bool,
on_error_port: Dart_Port,
on_exit_port: Dart_Port,
error: *mut *mut libc::c_char,
) -> bool;
}
extern "C" {
pub fn Dart_GetMainPortId() -> Dart_Port;
}
extern "C" {
pub fn Dart_HasLivePorts() -> bool;
}
extern "C" {
pub fn Dart_Post(port_id: Dart_Port, object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_NewSendPort(port_id: Dart_Port) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SendPortGetId(port: Dart_Handle, port_id: *mut Dart_Port) -> Dart_Handle;
}
extern "C" {
pub fn Dart_EnterScope();
}
extern "C" {
pub fn Dart_ExitScope();
}
extern "C" {
pub fn Dart_ScopeAllocate(size: isize) -> *mut u8;
}
extern "C" {
pub fn Dart_Null() -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsNull(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_EmptyString() -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypeDynamic() -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypeVoid() -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypeNever() -> Dart_Handle;
}
extern "C" {
pub fn Dart_ObjectEquals(obj1: Dart_Handle, obj2: Dart_Handle, equal: *mut bool)
-> Dart_Handle;
}
extern "C" {
pub fn Dart_ObjectIsType(
object: Dart_Handle,
type_: Dart_Handle,
instanceof: *mut bool,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsInstance(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsNumber(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsInteger(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsDouble(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsBoolean(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsString(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsStringLatin1(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsList(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsMap(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsLibrary(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsType(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsFunction(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsVariable(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsTypeVariable(handle: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsClosure(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsTypedData(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsByteBuffer(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_IsFuture(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_InstanceGetType(instance: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ClassName(cls_type: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_FunctionName(function: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_FunctionOwner(function: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_FunctionIsStatic(function: Dart_Handle, is_static: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsTearOff(object: Dart_Handle) -> bool;
}
extern "C" {
pub fn Dart_ClosureFunction(closure: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ClassLibrary(cls_type: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IntegerFitsIntoInt64(integer: Dart_Handle, fits: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IntegerFitsIntoUint64(integer: Dart_Handle, fits: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewInteger(value: i64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewIntegerFromUint64(value: u64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewIntegerFromHexCString(value: *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IntegerToInt64(integer: Dart_Handle, value: *mut i64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IntegerToUint64(integer: Dart_Handle, value: *mut u64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IntegerToHexCString(
integer: Dart_Handle,
value: *mut *const libc::c_char,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewDouble(value: f64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_DoubleValue(double_obj: Dart_Handle, value: *mut f64) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetStaticMethodClosure(
library: Dart_Handle,
cls_type: Dart_Handle,
function_name: Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_True() -> Dart_Handle;
}
extern "C" {
pub fn Dart_False() -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewBoolean(value: bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_BooleanValue(boolean_obj: Dart_Handle, value: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringLength(str_: Dart_Handle, length: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringUTF8Length(str_: Dart_Handle, length: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewStringFromCString(str_: *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewStringFromUTF8(utf8_array: *const u8, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewStringFromUTF16(utf16_array: *const u16, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewStringFromUTF32(utf32_array: *const i32, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringToCString(str_: Dart_Handle, cstr: *mut *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringToUTF8(
str_: Dart_Handle,
utf8_array: *mut *mut u8,
length: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CopyUTF8EncodingOfString(
str_: Dart_Handle,
utf8_array: *mut u8,
length: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringToLatin1(
str_: Dart_Handle,
latin1_array: *mut u8,
length: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringToUTF16(
str_: Dart_Handle,
utf16_array: *mut u16,
length: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringStorageSize(str_: Dart_Handle, size: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_StringGetProperties(
str_: Dart_Handle,
char_size: *mut isize,
str_len: *mut isize,
peer: *mut *mut libc::c_void,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewList(length: isize) -> Dart_Handle;
}
pub const Dart_CoreType_Id_Dart_CoreType_Dynamic: Dart_CoreType_Id = 0;
pub const Dart_CoreType_Id_Dart_CoreType_Int: Dart_CoreType_Id = 1;
pub const Dart_CoreType_Id_Dart_CoreType_String: Dart_CoreType_Id = 2;
pub type Dart_CoreType_Id = libc::c_int;
extern "C" {
pub fn Dart_NewListOf(element_type_id: Dart_CoreType_Id, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewListOfType(element_type: Dart_Handle, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewListOfTypeFilled(
element_type: Dart_Handle,
fill_object: Dart_Handle,
length: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListLength(list: Dart_Handle, length: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListGetAt(list: Dart_Handle, index: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListGetRange(
list: Dart_Handle,
offset: isize,
length: isize,
result: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListSetAt(list: Dart_Handle, index: isize, value: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListGetAsBytes(
list: Dart_Handle,
offset: isize,
native_array: *mut u8,
length: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ListSetAsBytes(
list: Dart_Handle,
offset: isize,
native_array: *const u8,
length: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_MapGetAt(map: Dart_Handle, key: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_MapContainsKey(map: Dart_Handle, key: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_MapKeys(map: Dart_Handle) -> Dart_Handle;
}
pub const Dart_TypedData_Type_Dart_TypedData_kByteData: Dart_TypedData_Type = 0;
pub const Dart_TypedData_Type_Dart_TypedData_kInt8: Dart_TypedData_Type = 1;
pub const Dart_TypedData_Type_Dart_TypedData_kUint8: Dart_TypedData_Type = 2;
pub const Dart_TypedData_Type_Dart_TypedData_kUint8Clamped: Dart_TypedData_Type = 3;
pub const Dart_TypedData_Type_Dart_TypedData_kInt16: Dart_TypedData_Type = 4;
pub const Dart_TypedData_Type_Dart_TypedData_kUint16: Dart_TypedData_Type = 5;
pub const Dart_TypedData_Type_Dart_TypedData_kInt32: Dart_TypedData_Type = 6;
pub const Dart_TypedData_Type_Dart_TypedData_kUint32: Dart_TypedData_Type = 7;
pub const Dart_TypedData_Type_Dart_TypedData_kInt64: Dart_TypedData_Type = 8;
pub const Dart_TypedData_Type_Dart_TypedData_kUint64: Dart_TypedData_Type = 9;
pub const Dart_TypedData_Type_Dart_TypedData_kFloat32: Dart_TypedData_Type = 10;
pub const Dart_TypedData_Type_Dart_TypedData_kFloat64: Dart_TypedData_Type = 11;
pub const Dart_TypedData_Type_Dart_TypedData_kInt32x4: Dart_TypedData_Type = 12;
pub const Dart_TypedData_Type_Dart_TypedData_kFloat32x4: Dart_TypedData_Type = 13;
pub const Dart_TypedData_Type_Dart_TypedData_kFloat64x2: Dart_TypedData_Type = 14;
pub const Dart_TypedData_Type_Dart_TypedData_kInvalid: Dart_TypedData_Type = 15;
pub type Dart_TypedData_Type = libc::c_int;
extern "C" {
pub fn Dart_GetTypeOfTypedData(object: Dart_Handle) -> Dart_TypedData_Type;
}
extern "C" {
pub fn Dart_GetTypeOfExternalTypedData(object: Dart_Handle) -> Dart_TypedData_Type;
}
extern "C" {
pub fn Dart_NewTypedData(type_: Dart_TypedData_Type, length: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewExternalTypedData(
type_: Dart_TypedData_Type,
data: *mut libc::c_void,
length: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewExternalTypedDataWithFinalizer(
type_: Dart_TypedData_Type,
data: *mut libc::c_void,
length: isize,
peer: *mut libc::c_void,
external_allocation_size: isize,
callback: Dart_HandleFinalizer,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewUnmodifiableExternalTypedDataWithFinalizer(
type_: Dart_TypedData_Type,
data: *const libc::c_void,
length: isize,
peer: *mut libc::c_void,
external_allocation_size: isize,
callback: Dart_HandleFinalizer,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewByteBuffer(typed_data: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypedDataAcquireData(
object: Dart_Handle,
type_: *mut Dart_TypedData_Type,
data: *mut *mut libc::c_void,
len: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypedDataReleaseData(object: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetDataFromByteBuffer(byte_buffer: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_New(
type_: Dart_Handle,
constructor_name: Dart_Handle,
number_of_arguments: libc::c_int,
arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_Allocate(type_: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_AllocateWithNativeFields(
type_: Dart_Handle,
num_native_fields: isize,
native_fields: *const isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_Invoke(
target: Dart_Handle,
name: Dart_Handle,
number_of_arguments: libc::c_int,
arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_InvokeClosure(
closure: Dart_Handle,
number_of_arguments: libc::c_int,
arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_InvokeConstructor(
object: Dart_Handle,
name: Dart_Handle,
number_of_arguments: libc::c_int,
arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetField(container: Dart_Handle, name: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetField(
container: Dart_Handle,
name: Dart_Handle,
value: Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ThrowException(exception: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_ReThrowException(exception: Dart_Handle, stacktrace: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeInstanceFieldCount(
obj: Dart_Handle,
count: *mut libc::c_int,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeInstanceField(
obj: Dart_Handle,
index: libc::c_int,
value: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetNativeInstanceField(
obj: Dart_Handle,
index: libc::c_int,
value: isize,
) -> Dart_Handle;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_NativeArguments {
_unused: [u8; 0],
}
pub type Dart_NativeArguments = *mut _Dart_NativeArguments;
extern "C" {
pub fn Dart_GetNativeIsolateGroupData(args: Dart_NativeArguments) -> *mut libc::c_void;
}
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kBool: Dart_NativeArgument_Type = 0;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kInt32: Dart_NativeArgument_Type = 1;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kUint32: Dart_NativeArgument_Type = 2;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kInt64: Dart_NativeArgument_Type = 3;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kUint64: Dart_NativeArgument_Type = 4;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kDouble: Dart_NativeArgument_Type = 5;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kString: Dart_NativeArgument_Type = 6;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kInstance: Dart_NativeArgument_Type = 7;
pub const Dart_NativeArgument_Type_Dart_NativeArgument_kNativeFields: Dart_NativeArgument_Type = 8;
pub type Dart_NativeArgument_Type = libc::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_NativeArgument_Descriptor {
pub type_: u8,
pub index: u8,
}
pub type Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor;
#[repr(C)]
#[derive(Copy, Clone)]
pub union _Dart_NativeArgument_Value {
pub as_bool: bool,
pub as_int32: i32,
pub as_uint32: u32,
pub as_int64: i64,
pub as_uint64: u64,
pub as_double: f64,
pub as_string: _Dart_NativeArgument_Value__bindgen_ty_1,
pub as_native_fields: _Dart_NativeArgument_Value__bindgen_ty_2,
pub as_instance: Dart_Handle,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_NativeArgument_Value__bindgen_ty_1 {
pub dart_str: Dart_Handle,
pub peer: *mut libc::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_NativeArgument_Value__bindgen_ty_2 {
pub num_fields: isize,
pub values: *mut isize,
}
pub type Dart_NativeArgument_Value = _Dart_NativeArgument_Value;
extern "C" {
pub fn Dart_GetNativeArguments(
args: Dart_NativeArguments,
num_arguments: libc::c_int,
arg_descriptors: *const Dart_NativeArgument_Descriptor,
arg_values: *mut Dart_NativeArgument_Value,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeArgument(args: Dart_NativeArguments, index: libc::c_int) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeArgumentCount(args: Dart_NativeArguments) -> libc::c_int;
}
extern "C" {
pub fn Dart_GetNativeFieldsOfArgument(
args: Dart_NativeArguments,
arg_index: libc::c_int,
num_fields: libc::c_int,
field_values: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeReceiver(args: Dart_NativeArguments, value: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeStringArgument(
args: Dart_NativeArguments,
arg_index: libc::c_int,
peer: *mut *mut libc::c_void,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeIntegerArgument(
args: Dart_NativeArguments,
index: libc::c_int,
value: *mut i64,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeBooleanArgument(
args: Dart_NativeArguments,
index: libc::c_int,
value: *mut bool,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeDoubleArgument(
args: Dart_NativeArguments,
index: libc::c_int,
value: *mut f64,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetReturnValue(args: Dart_NativeArguments, retval: Dart_Handle);
}
extern "C" {
pub fn Dart_SetWeakHandleReturnValue(
args: Dart_NativeArguments,
rval: Dart_WeakPersistentHandle,
);
}
extern "C" {
pub fn Dart_SetBooleanReturnValue(args: Dart_NativeArguments, retval: bool);
}
extern "C" {
pub fn Dart_SetIntegerReturnValue(args: Dart_NativeArguments, retval: i64);
}
extern "C" {
pub fn Dart_SetDoubleReturnValue(args: Dart_NativeArguments, retval: f64);
}
pub type Dart_NativeFunction =
::core::option::Option<unsafe extern "C" fn(arguments: Dart_NativeArguments)>;
pub type Dart_NativeEntryResolver = ::core::option::Option<
unsafe extern "C" fn(
name: Dart_Handle,
num_of_arguments: libc::c_int,
auto_setup_scope: *mut bool,
) -> Dart_NativeFunction,
>;
pub type Dart_NativeEntrySymbol =
::core::option::Option<unsafe extern "C" fn(nf: Dart_NativeFunction) -> *const u8>;
pub type Dart_FfiNativeResolver = ::core::option::Option<
unsafe extern "C" fn(name: *const libc::c_char, args_n: usize) -> *mut libc::c_void,
>;
pub type Dart_EnvironmentCallback =
::core::option::Option<unsafe extern "C" fn(name: Dart_Handle) -> Dart_Handle>;
extern "C" {
pub fn Dart_SetEnvironmentCallback(callback: Dart_EnvironmentCallback) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetNativeResolver(
library: Dart_Handle,
resolver: Dart_NativeEntryResolver,
symbol: Dart_NativeEntrySymbol,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeResolver(
library: Dart_Handle,
resolver: *mut Dart_NativeEntryResolver,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNativeSymbol(
library: Dart_Handle,
resolver: *mut Dart_NativeEntrySymbol,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetFfiNativeResolver(
library: Dart_Handle,
resolver: Dart_FfiNativeResolver,
) -> Dart_Handle;
}
pub const Dart_LibraryTag_Dart_kCanonicalizeUrl: Dart_LibraryTag = 0;
pub const Dart_LibraryTag_Dart_kImportTag: Dart_LibraryTag = 1;
pub const Dart_LibraryTag_Dart_kKernelTag: Dart_LibraryTag = 2;
pub type Dart_LibraryTag = libc::c_int;
pub type Dart_LibraryTagHandler = ::core::option::Option<
unsafe extern "C" fn(
tag: Dart_LibraryTag,
library_or_package_map_url: Dart_Handle,
url: Dart_Handle,
) -> Dart_Handle,
>;
extern "C" {
pub fn Dart_SetLibraryTagHandler(handler: Dart_LibraryTagHandler) -> Dart_Handle;
}
pub type Dart_DeferredLoadHandler =
::core::option::Option<unsafe extern "C" fn(loading_unit_id: isize) -> Dart_Handle>;
extern "C" {
pub fn Dart_SetDeferredLoadHandler(handler: Dart_DeferredLoadHandler) -> Dart_Handle;
}
extern "C" {
pub fn Dart_DeferredLoadComplete(
loading_unit_id: isize,
snapshot_data: *const u8,
snapshot_instructions: *const u8,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_DeferredLoadCompleteError(
loading_unit_id: isize,
error_message: *const libc::c_char,
transient: bool,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_DefaultCanonicalizeUrl(base_url: Dart_Handle, url: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LoadScriptFromKernel(kernel_buffer: *const u8, kernel_size: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_RootLibrary() -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetRootLibrary(library: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetType(
library: Dart_Handle,
class_name: Dart_Handle,
number_of_type_arguments: isize,
type_arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNullableType(
library: Dart_Handle,
class_name: Dart_Handle,
number_of_type_arguments: isize,
type_arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetNonNullableType(
library: Dart_Handle,
class_name: Dart_Handle,
number_of_type_arguments: isize,
type_arguments: *mut Dart_Handle,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypeToNullableType(type_: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_TypeToNonNullableType(type_: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsNullableType(type_: Dart_Handle, result: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsNonNullableType(type_: Dart_Handle, result: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsLegacyType(type_: Dart_Handle, result: *mut bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetClass(library: Dart_Handle, class_name: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LibraryUrl(library: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LibraryResolvedUrl(library: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetLoadedLibraries() -> Dart_Handle;
}
extern "C" {
pub fn Dart_LookupLibrary(url: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LibraryHandleError(library: Dart_Handle, error: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LoadLibraryFromKernel(
kernel_buffer: *const u8,
kernel_buffer_size: isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_LoadLibrary(kernel_buffer: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_FinalizeLoading(complete_futures: bool) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetPeer(object: Dart_Handle, peer: *mut *mut libc::c_void) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetPeer(object: Dart_Handle, peer: *mut libc::c_void) -> Dart_Handle;
}
pub const Dart_KernelCompilationStatus_Dart_KernelCompilationStatus_Unknown:
Dart_KernelCompilationStatus = -1;
pub const Dart_KernelCompilationStatus_Dart_KernelCompilationStatus_Ok:
Dart_KernelCompilationStatus = 0;
pub const Dart_KernelCompilationStatus_Dart_KernelCompilationStatus_Error:
Dart_KernelCompilationStatus = 1;
pub const Dart_KernelCompilationStatus_Dart_KernelCompilationStatus_Crash:
Dart_KernelCompilationStatus = 2;
pub const Dart_KernelCompilationStatus_Dart_KernelCompilationStatus_MsgFailed:
Dart_KernelCompilationStatus = 3;
pub type Dart_KernelCompilationStatus = libc::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_KernelCompilationResult {
pub status: Dart_KernelCompilationStatus,
pub error: *mut libc::c_char,
pub kernel: *mut u8,
pub kernel_size: isize,
}
pub const Dart_KernelCompilationVerbosityLevel_Dart_KernelCompilationVerbosityLevel_Error:
Dart_KernelCompilationVerbosityLevel = 0;
pub const Dart_KernelCompilationVerbosityLevel_Dart_KernelCompilationVerbosityLevel_Warning:
Dart_KernelCompilationVerbosityLevel = 1;
pub const Dart_KernelCompilationVerbosityLevel_Dart_KernelCompilationVerbosityLevel_Info:
Dart_KernelCompilationVerbosityLevel = 2;
pub const Dart_KernelCompilationVerbosityLevel_Dart_KernelCompilationVerbosityLevel_All:
Dart_KernelCompilationVerbosityLevel = 3;
pub type Dart_KernelCompilationVerbosityLevel = libc::c_int;
extern "C" {
pub fn Dart_IsKernelIsolate(isolate: Dart_Isolate) -> bool;
}
extern "C" {
pub fn Dart_KernelIsolateIsRunning() -> bool;
}
extern "C" {
pub fn Dart_KernelPort() -> Dart_Port;
}
extern "C" {
pub fn Dart_CompileToKernel(
script_uri: *const libc::c_char,
platform_kernel: *const u8,
platform_kernel_size: isize,
incremental_compile: bool,
snapshot_compile: bool,
embed_sources: bool,
package_config: *const libc::c_char,
verbosity: Dart_KernelCompilationVerbosityLevel,
) -> Dart_KernelCompilationResult;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_SourceFile {
pub uri: *const libc::c_char,
pub source: *const libc::c_char,
}
extern "C" {
pub fn Dart_KernelListDependencies() -> Dart_KernelCompilationResult;
}
extern "C" {
pub fn Dart_SetDartLibrarySourcesKernel(
platform_kernel: *const u8,
platform_kernel_size: isize,
);
}
extern "C" {
pub fn Dart_DetectNullSafety(
script_uri: *const libc::c_char,
package_config: *const libc::c_char,
original_working_directory: *const libc::c_char,
snapshot_data: *const u8,
snapshot_instructions: *const u8,
kernel_buffer: *const u8,
kernel_buffer_size: isize,
) -> bool;
}
extern "C" {
pub fn Dart_IsServiceIsolate(isolate: Dart_Isolate) -> bool;
}
extern "C" {
pub fn Dart_WriteProfileToTimeline(main_port: Dart_Port, error: *mut *mut libc::c_char)
-> bool;
}
extern "C" {
pub fn Dart_Precompile() -> Dart_Handle;
}
pub type Dart_CreateLoadingUnitCallback = ::core::option::Option<
unsafe extern "C" fn(
callback_data: *mut libc::c_void,
loading_unit_id: isize,
write_callback_data: *mut *mut libc::c_void,
write_debug_callback_data: *mut *mut libc::c_void,
),
>;
pub type Dart_StreamingWriteCallback = ::core::option::Option<
unsafe extern "C" fn(callback_data: *mut libc::c_void, buffer: *const u8, size: isize),
>;
pub type Dart_StreamingCloseCallback =
::core::option::Option<unsafe extern "C" fn(callback_data: *mut libc::c_void)>;
extern "C" {
pub fn Dart_LoadingUnitLibraryUris(loading_unit_id: isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateAppAOTSnapshotAsAssembly(
callback: Dart_StreamingWriteCallback,
callback_data: *mut libc::c_void,
stripped: bool,
debug_callback_data: *mut libc::c_void,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateAppAOTSnapshotAsAssemblies(
next_callback: Dart_CreateLoadingUnitCallback,
next_callback_data: *mut libc::c_void,
stripped: bool,
write_callback: Dart_StreamingWriteCallback,
close_callback: Dart_StreamingCloseCallback,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateAppAOTSnapshotAsElf(
callback: Dart_StreamingWriteCallback,
callback_data: *mut libc::c_void,
stripped: bool,
debug_callback_data: *mut libc::c_void,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateAppAOTSnapshotAsElfs(
next_callback: Dart_CreateLoadingUnitCallback,
next_callback_data: *mut libc::c_void,
stripped: bool,
write_callback: Dart_StreamingWriteCallback,
close_callback: Dart_StreamingCloseCallback,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateVMAOTSnapshotAsAssembly(
callback: Dart_StreamingWriteCallback,
callback_data: *mut libc::c_void,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SortClasses() -> Dart_Handle;
}
extern "C" {
pub fn Dart_CreateAppJITSnapshotAsBlobs(
isolate_snapshot_data_buffer: *mut *mut u8,
isolate_snapshot_data_size: *mut isize,
isolate_snapshot_instructions_buffer: *mut *mut u8,
isolate_snapshot_instructions_size: *mut isize,
) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetObfuscationMap(buffer: *mut *mut u8, buffer_length: *mut isize) -> Dart_Handle;
}
extern "C" {
pub fn Dart_IsPrecompiledRuntime() -> bool;
}
extern "C" {
pub fn Dart_DumpNativeStackTrace(context: *mut libc::c_void);
}
extern "C" {
pub fn Dart_PrepareToAbort();
}
pub type Dart_DwarfStackTraceFootnoteCallback = ::core::option::Option<
unsafe extern "C" fn(addresses: *mut *mut libc::c_void, count: isize) -> *mut libc::c_char,
>;
extern "C" {
pub fn Dart_SetDwarfStackTraceFootnoteCallback(callback: Dart_DwarfStackTraceFootnoteCallback);
}
pub const Dart_CObject_Type_Dart_CObject_kNull: Dart_CObject_Type = 0;
pub const Dart_CObject_Type_Dart_CObject_kBool: Dart_CObject_Type = 1;
pub const Dart_CObject_Type_Dart_CObject_kInt32: Dart_CObject_Type = 2;
pub const Dart_CObject_Type_Dart_CObject_kInt64: Dart_CObject_Type = 3;
pub const Dart_CObject_Type_Dart_CObject_kDouble: Dart_CObject_Type = 4;
pub const Dart_CObject_Type_Dart_CObject_kString: Dart_CObject_Type = 5;
pub const Dart_CObject_Type_Dart_CObject_kArray: Dart_CObject_Type = 6;
pub const Dart_CObject_Type_Dart_CObject_kTypedData: Dart_CObject_Type = 7;
pub const Dart_CObject_Type_Dart_CObject_kExternalTypedData: Dart_CObject_Type = 8;
pub const Dart_CObject_Type_Dart_CObject_kSendPort: Dart_CObject_Type = 9;
pub const Dart_CObject_Type_Dart_CObject_kCapability: Dart_CObject_Type = 10;
pub const Dart_CObject_Type_Dart_CObject_kNativePointer: Dart_CObject_Type = 11;
pub const Dart_CObject_Type_Dart_CObject_kUnsupported: Dart_CObject_Type = 12;
pub const Dart_CObject_Type_Dart_CObject_kUnmodifiableExternalTypedData: Dart_CObject_Type = 13;
pub const Dart_CObject_Type_Dart_CObject_kNumberOfTypes: Dart_CObject_Type = 14;
pub type Dart_CObject_Type = libc::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _Dart_CObject {
pub type_: Dart_CObject_Type,
pub value: _Dart_CObject__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _Dart_CObject__bindgen_ty_1 {
pub as_bool: bool,
pub as_int32: i32,
pub as_int64: i64,
pub as_double: f64,
pub as_string: *const libc::c_char,
pub as_send_port: _Dart_CObject__bindgen_ty_1__bindgen_ty_1,
pub as_capability: _Dart_CObject__bindgen_ty_1__bindgen_ty_2,
pub as_array: _Dart_CObject__bindgen_ty_1__bindgen_ty_3,
pub as_typed_data: _Dart_CObject__bindgen_ty_1__bindgen_ty_4,
pub as_external_typed_data: _Dart_CObject__bindgen_ty_1__bindgen_ty_5,
pub as_native_pointer: _Dart_CObject__bindgen_ty_1__bindgen_ty_6,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_1 {
pub id: Dart_Port,
pub origin_id: Dart_Port,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_2 {
pub id: i64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_3 {
pub length: isize,
pub values: *mut *mut _Dart_CObject,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_4 {
pub type_: Dart_TypedData_Type,
pub length: isize,
pub values: *const u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_5 {
pub type_: Dart_TypedData_Type,
pub length: isize,
pub data: *mut u8,
pub peer: *mut libc::c_void,
pub callback: Dart_HandleFinalizer,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Dart_CObject__bindgen_ty_1__bindgen_ty_6 {
pub ptr: isize,
pub size: isize,
pub callback: Dart_HandleFinalizer,
}
pub type Dart_CObject = _Dart_CObject;
extern "C" {
pub fn Dart_PostCObject(port_id: Dart_Port, message: *mut Dart_CObject) -> bool;
}
extern "C" {
pub fn Dart_PostInteger(port_id: Dart_Port, message: i64) -> bool;
}
pub type Dart_NativeMessageHandler = ::core::option::Option<
unsafe extern "C" fn(dest_port_id: Dart_Port, message: *mut Dart_CObject),
>;
extern "C" {
pub fn Dart_NewNativePort(
name: *const libc::c_char,
handler: Dart_NativeMessageHandler,
handle_concurrently: bool,
) -> Dart_Port;
}
extern "C" {
pub fn Dart_CloseNativePort(native_port_id: Dart_Port) -> bool;
}
extern "C" {
pub fn Dart_CompileAll() -> Dart_Handle;
}
extern "C" {
pub fn Dart_FinalizeAllClasses() -> Dart_Handle;
}
extern "C" {
pub fn Dart_ExecuteInternalCommand(
command: *const libc::c_char,
arg: *mut libc::c_void,
) -> *mut libc::c_void;
}
pub type Dart_ServiceRequestCallback = ::core::option::Option<
unsafe extern "C" fn(
method: *const libc::c_char,
param_keys: *mut *const libc::c_char,
param_values: *mut *const libc::c_char,
num_params: isize,
user_data: *mut libc::c_void,
json_object: *mut *const libc::c_char,
) -> bool,
>;
extern "C" {
pub fn Dart_RegisterIsolateServiceRequestCallback(
method: *const libc::c_char,
callback: Dart_ServiceRequestCallback,
user_data: *mut libc::c_void,
);
}
extern "C" {
pub fn Dart_RegisterRootServiceRequestCallback(
method: *const libc::c_char,
callback: Dart_ServiceRequestCallback,
user_data: *mut libc::c_void,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_EmbedderInformation {
pub version: i32,
pub name: *const libc::c_char,
pub current_rss: i64,
pub max_rss: i64,
}
pub type Dart_EmbedderInformationCallback =
::core::option::Option<unsafe extern "C" fn(info: *mut Dart_EmbedderInformation)>;
extern "C" {
pub fn Dart_SetEmbedderInformationCallback(callback: Dart_EmbedderInformationCallback);
}
extern "C" {
pub fn Dart_InvokeVMServiceMethod(
request_json: *mut u8,
request_json_length: isize,
response_json: *mut *mut u8,
response_json_length: *mut isize,
error: *mut *mut libc::c_char,
) -> bool;
}
pub type Dart_ServiceStreamListenCallback =
::core::option::Option<unsafe extern "C" fn(stream_id: *const libc::c_char) -> bool>;
pub type Dart_ServiceStreamCancelCallback =
::core::option::Option<unsafe extern "C" fn(stream_id: *const libc::c_char)>;
extern "C" {
pub fn Dart_SetServiceStreamCallbacks(
listen_callback: Dart_ServiceStreamListenCallback,
cancel_callback: Dart_ServiceStreamCancelCallback,
) -> *mut libc::c_char;
}
extern "C" {
pub fn Dart_ServiceSendDataEvent(
stream_id: *const libc::c_char,
event_kind: *const libc::c_char,
bytes: *const u8,
bytes_length: isize,
) -> *mut libc::c_char;
}
pub type Dart_FileModifiedCallback =
::core::option::Option<unsafe extern "C" fn(url: *const libc::c_char, since: i64) -> bool>;
extern "C" {
pub fn Dart_SetFileModifiedCallback(
file_modified_callback: Dart_FileModifiedCallback,
) -> *mut libc::c_char;
}
extern "C" {
pub fn Dart_IsReloading() -> bool;
}
extern "C" {
pub fn Dart_SetEnabledTimelineCategory(categories: *const libc::c_char) -> bool;
}
extern "C" {
pub fn Dart_TimelineGetMicros() -> i64;
}
extern "C" {
pub fn Dart_TimelineGetTicks() -> i64;
}
extern "C" {
pub fn Dart_TimelineGetTicksFrequency() -> i64;
}
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Begin: Dart_Timeline_Event_Type = 0;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_End: Dart_Timeline_Event_Type = 1;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Instant: Dart_Timeline_Event_Type = 2;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Duration: Dart_Timeline_Event_Type = 3;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Async_Begin: Dart_Timeline_Event_Type = 4;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Async_End: Dart_Timeline_Event_Type = 5;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Async_Instant: Dart_Timeline_Event_Type = 6;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Counter: Dart_Timeline_Event_Type = 7;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Flow_Begin: Dart_Timeline_Event_Type = 8;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Flow_Step: Dart_Timeline_Event_Type = 9;
pub const Dart_Timeline_Event_Type_Dart_Timeline_Event_Flow_End: Dart_Timeline_Event_Type = 10;
pub type Dart_Timeline_Event_Type = libc::c_int;
extern "C" {
pub fn Dart_RecordTimelineEvent(
label: *const libc::c_char,
timestamp0: i64,
timestamp1_or_id: i64,
flow_id_count: isize,
flow_ids: *const i64,
type_: Dart_Timeline_Event_Type,
argument_count: isize,
argument_names: *mut *const libc::c_char,
argument_values: *mut *const libc::c_char,
);
}
extern "C" {
pub fn Dart_SetThreadName(name: *const libc::c_char);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_TimelineRecorderEvent_Argument {
pub name: *const libc::c_char,
pub value: *const libc::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Dart_TimelineRecorderEvent {
pub version: i32,
pub type_: Dart_Timeline_Event_Type,
pub timestamp0: i64,
pub timestamp1_or_id: i64,
pub isolate: Dart_Port,
pub isolate_group: Dart_IsolateGroupId,
pub isolate_data: *mut libc::c_void,
pub isolate_group_data: *mut libc::c_void,
pub label: *const libc::c_char,
pub stream: *const libc::c_char,
pub argument_count: isize,
pub arguments: *mut Dart_TimelineRecorderEvent_Argument,
}
pub type Dart_TimelineRecorderCallback =
::core::option::Option<unsafe extern "C" fn(event: *mut Dart_TimelineRecorderEvent)>;
extern "C" {
pub fn Dart_SetTimelineRecorderCallback(callback: Dart_TimelineRecorderCallback);
}
extern "C" {
pub fn Dart_IsolateGroupHeapOldUsedMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_IsolateGroupHeapOldCapacityMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_IsolateGroupHeapOldExternalMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_IsolateGroupHeapNewUsedMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_IsolateGroupHeapNewCapacityMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_IsolateGroupHeapNewExternalMetric(group: Dart_IsolateGroup) -> i64;
}
extern "C" {
pub fn Dart_GetCurrentUserTag() -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetDefaultUserTag() -> Dart_Handle;
}
extern "C" {
pub fn Dart_NewUserTag(label: *const libc::c_char) -> Dart_Handle;
}
extern "C" {
pub fn Dart_SetCurrentUserTag(user_tag: Dart_Handle) -> Dart_Handle;
}
extern "C" {
pub fn Dart_GetUserTagLabel(user_tag: Dart_Handle) -> *mut libc::c_char;
}
pub type Dart_HeapSnapshotWriteChunkCallback = ::core::option::Option<
unsafe extern "C" fn(context: *mut libc::c_void, buffer: *mut u8, size: isize, is_last: bool),
>;
extern "C" {
pub fn Dart_WriteHeapSnapshot(
write: Dart_HeapSnapshotWriteChunkCallback,
context: *mut libc::c_void,
) -> *mut libc::c_char;
}