30aa464f77
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap - Remove the executable dart_bootstrap and all uses of it - Remove bootstrap_nolib.cc and builtin_nocore.cc - Remove the Dart 1 code in core lib bootstrap path Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6 Reviewed-on: https://dart-review.googlesource.com/c/77241 Commit-Queue: Siva Annamalai <asiva@google.com> Reviewed-by: Zach Anderson <zra@google.com>
60 lines
2.0 KiB
C++
60 lines
2.0 KiB
C++
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_BIN_SNAPSHOT_UTILS_H_
|
|
#define RUNTIME_BIN_SNAPSHOT_UTILS_H_
|
|
|
|
#include "platform/globals.h"
|
|
|
|
namespace dart {
|
|
namespace bin {
|
|
|
|
class AppSnapshot {
|
|
public:
|
|
virtual ~AppSnapshot() {}
|
|
|
|
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;
|
|
|
|
protected:
|
|
AppSnapshot() {}
|
|
|
|
private:
|
|
DISALLOW_COPY_AND_ASSIGN(AppSnapshot);
|
|
};
|
|
|
|
class Snapshot {
|
|
public:
|
|
static void GenerateKernel(const char* snapshot_filename,
|
|
const char* script_name,
|
|
const char* package_config);
|
|
static void GenerateAppJIT(const char* snapshot_filename);
|
|
static void GenerateAppAOTAsBlobs(const char* snapshot_filename,
|
|
const uint8_t* shared_data,
|
|
const uint8_t* shared_instructions);
|
|
static void GenerateAppAOTAsAssembly(const char* snapshot_filename);
|
|
|
|
static AppSnapshot* TryReadAppSnapshot(const char* script_name);
|
|
static void WriteAppSnapshot(const char* filename,
|
|
uint8_t* vm_data_buffer,
|
|
intptr_t vm_data_size,
|
|
uint8_t* vm_instructions_buffer,
|
|
intptr_t vm_instructions_size,
|
|
uint8_t* isolate_data_buffer,
|
|
intptr_t isolate_data_size,
|
|
uint8_t* isolate_instructions_buffer,
|
|
intptr_t isolate_instructions_size);
|
|
|
|
private:
|
|
DISALLOW_ALLOCATION();
|
|
DISALLOW_IMPLICIT_CONSTRUCTORS(Snapshot);
|
|
};
|
|
|
|
} // namespace bin
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_BIN_SNAPSHOT_UTILS_H_
|