Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions | Variables
dartutils.cc File Reference
#include "bin/dartutils.h"
#include "bin/crypto.h"
#include "bin/directory.h"
#include "bin/file.h"
#include "bin/io_buffer.h"
#include "bin/typed_data_utils.h"
#include "bin/utils.h"
#include "include/dart_api.h"
#include "include/dart_native_api.h"
#include "platform/assert.h"
#include "platform/globals.h"
#include "platform/utils.h"

Go to the source code of this file.

Namespaces

namespace  dart
 
namespace  dart::bin
 

Macros

#define RETURN_IF_ERROR(handle)
 
#define SET_ERROR_MSG(error_msg, format, ...)
 

Functions

static bool dart::bin::IsWindowsHost ()
 
static Dart_Handle dart::bin::SingleArgDart_Invoke (Dart_Handle lib, const char *method, Dart_Handle arg)
 
static uint8_t * dart::bin::ReadFileFully (const char *filename, intptr_t *file_len, const char **error_msg)
 
static bool dart::bin::CheckMagicNumber (const uint8_t *buffer, intptr_t buffer_length, const MagicNumberData &magic_number)
 

Variables

MagicNumberData dart::bin::appjit_magic_number = {8, {0xdc, 0xdc, 0xf6, 0xf6, 0, 0, 0, 0}}
 
MagicNumberData dart::bin::aotelf_magic_number = {4, {0x7F, 0x45, 0x4C, 0x46, 0x0}}
 
MagicNumberData dart::bin::aotmacho32_magic_number = {4, {0xFE, 0xED, 0xFA, 0xCE}}
 
MagicNumberData dart::bin::aotmacho64_magic_number = {4, {0xFE, 0xED, 0xFA, 0xCF}}
 
MagicNumberData dart::bin::aotmacho64_arm64_magic_number = {4, {0xCF, 0xFA, 0xED, 0xFE}}
 
MagicNumberData dart::bin::aotcoff_arm32_magic_number = {2, {0x01, 0xC0}}
 
MagicNumberData dart::bin::aotcoff_arm64_magic_number = {2, {0xAA, 0x64}}
 
MagicNumberData dart::bin::aotcoff_riscv32_magic_number = {2, {0x50, 0x32}}
 
MagicNumberData dart::bin::aotcoff_riscv64_magic_number = {2, {0x50, 0x64}}
 
MagicNumberData dart::bin::kernel_magic_number = {4, {0x90, 0xab, 0xcd, 0xef}}
 
MagicNumberData dart::bin::kernel_list_magic_number
 
MagicNumberData dart::bin::gzip_magic_number = {2, {0x1f, 0x8b, 0, 0}}
 
CObject CObject::null_ & dart::bin::api_null_
 
CObject CObject::true_ & dart::bin::api_true_
 
CObject CObject::false_ & dart::bin::api_false_
 

Macro Definition Documentation

◆ RETURN_IF_ERROR

#define RETURN_IF_ERROR (   handle)
Value:
{ \
Dart_Handle __handle = handle; \
if (Dart_IsError((__handle))) { \
return __handle; \
} \
}
DART_EXPORT bool Dart_IsError(Dart_Handle handle)

Definition at line 20 of file dartutils.cc.

◆ SET_ERROR_MSG

#define SET_ERROR_MSG (   error_msg,
  format,
  ... 
)
Value:
intptr_t len = snprintf(nullptr, 0, format, __VA_ARGS__); \
char* msg = reinterpret_cast<char*>(malloc(len + 1)); \
snprintf(msg, len + 1, format, __VA_ARGS__); \
*error_msg = msg
uint32_t uint32_t * format
void * malloc(size_t size)
Definition: allocation.cc:19

Definition at line 323 of file dartutils.cc.