5#ifndef RUNTIME_BIN_SNAPSHOT_UTILS_H_
6#define RUNTIME_BIN_SNAPSHOT_UTILS_H_
19 const uint8_t** vm_instructions_buffer,
20 const uint8_t** isolate_data_buffer,
21 const uint8_t** isolate_instructions_buffer) = 0;
44 const char* script_name,
45 const char* package_config);
49#if defined(DART_TARGET_OS_MACOS)
50 static bool IsMachOFormattedBinary(
const char* container_path);
52#if defined(DART_TARGET_OS_WINDOWS)
53 static bool IsPEFormattedBinary(
const char* container_path);
58 const char* script_uri,
59 bool force_load_elf_from_memory =
false,
60 bool decode_uri =
true);
62 uint8_t* isolate_data_buffer,
63 intptr_t isolate_data_size,
64 uint8_t* isolate_instructions_buffer,
65 intptr_t isolate_instructions_size);
68#if defined(DART_TARGET_OS_MACOS)
69 static AppSnapshot* TryReadAppendedAppSnapshotElfFromMachO(
70 const char* container_path);
72#if defined(DART_TARGET_OS_WINDOWS)
73 static AppSnapshot* TryReadAppendedAppSnapshotElfFromPE(
74 const char* container_path);
77 DISALLOW_ALLOCATION();
78 DISALLOW_IMPLICIT_CONSTRUCTORS(
Snapshot);
AppSnapshot(DartUtils::MagicNumber num)
virtual void SetBuffers(const uint8_t **vm_data_buffer, const uint8_t **vm_instructions_buffer, const uint8_t **isolate_data_buffer, const uint8_t **isolate_instructions_buffer)=0
bool IsKernelList() const
static bool IsAotMagicNumber(MagicNumber number)
static void WriteAppSnapshot(const char *filename, uint8_t *isolate_data_buffer, intptr_t isolate_data_size, uint8_t *isolate_instructions_buffer, intptr_t isolate_instructions_size)
static void GenerateAppAOTAsAssembly(const char *snapshot_filename)
static AppSnapshot * TryReadAppSnapshot(const char *script_uri, bool force_load_elf_from_memory=false, bool decode_uri=true)
static AppSnapshot * TryReadAppendedAppSnapshotElf(const char *container_path)
static void GenerateKernel(const char *snapshot_filename, const char *script_name, const char *package_config)
static void GenerateAppJIT(const char *snapshot_filename)