forked from firka/flutter
Roll Dart VM. (flutter/engine#3167)
This commit is contained in:
4
DEPS
4
DEPS
@@ -27,8 +27,8 @@ vars = {
|
||||
|
||||
# Note: When updating the Dart revision, ensure that all entries that are
|
||||
# dependencies of dart are also updated
|
||||
'dart_revision': 'cfbf1a511e6e64d35789e34e161a7b10a88a439c',
|
||||
'dart_boringssl_gen_revision': 'de218d3e1b6d210e1d132ecc748e0125d1020ac9',
|
||||
'dart_revision': '9f0e4e1162298625c2d90213076c3dcac4dc41a5',
|
||||
'dart_boringssl_gen_revision': '62c20247d582444cb2804f9ea4e3abaa6e47f6a5',
|
||||
'dart_boringssl_revision': '8d343b44bbab829d1a28fdef650ca95f7db4412e',
|
||||
'dart_observatory_packages_revision': '26aad88f1c1915d39bbcbff3cad589e2402fdcf1',
|
||||
'dart_root_certificates_revision': 'aed07942ce98507d2be28cbd29e879525410c7fc',
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
// generated snapshot binary file for the vm isolate.
|
||||
// This string forms the content of the dart vm isolate snapshot which
|
||||
// is loaded into the vm isolate.
|
||||
const uint8_t kDartVmIsolateSnapshotBuffer[]
|
||||
const uint8_t kVmIsolateSnapshot[]
|
||||
__attribute__((visibility("default"), aligned(8), used)) = { %s };
|
||||
|
||||
// The string on the next line will be filled in with the contents of the
|
||||
// generated snapshot binary file for a regular dart isolate.
|
||||
// This string forms the content of a regular dart isolate snapshot which
|
||||
// is loaded into an isolate when it is created.
|
||||
const uint8_t kDartIsolateSnapshotBuffer[]
|
||||
const uint8_t kIsolateSnapshot[]
|
||||
__attribute__((visibility("default"), aligned(8), used)) = { %s };
|
||||
|
||||
@@ -137,7 +137,7 @@ void DartController::CreateIsolateFor(const std::string& script_uri,
|
||||
char* error = nullptr;
|
||||
Dart_Isolate isolate = Dart_CreateIsolate(
|
||||
script_uri.c_str(), "main",
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kDartIsolateSnapshotBuffer)),
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kIsolateSnapshot)),
|
||||
nullptr, static_cast<tonic::DartState*>(state.get()), &error);
|
||||
FTL_CHECK(isolate) << error;
|
||||
ui_dart_state_ = state.release();
|
||||
|
||||
@@ -210,7 +210,7 @@ Dart_Isolate ServiceIsolateCreateCallback(const char* script_uri,
|
||||
tonic::DartState* dart_state = new tonic::DartState();
|
||||
Dart_Isolate isolate = Dart_CreateIsolate(
|
||||
script_uri, "main",
|
||||
reinterpret_cast<const uint8_t*>(DART_SYMBOL(kDartIsolateSnapshotBuffer)),
|
||||
reinterpret_cast<const uint8_t*>(DART_SYMBOL(kIsolateSnapshot)),
|
||||
nullptr, dart_state, error);
|
||||
FTL_CHECK(isolate) << error;
|
||||
dart_state->SetIsolate(isolate);
|
||||
@@ -287,7 +287,7 @@ Dart_Isolate IsolateCreateCallback(const char* script_uri,
|
||||
|
||||
Dart_Isolate isolate = Dart_CreateIsolate(
|
||||
script_uri, main,
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kDartIsolateSnapshotBuffer)),
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kIsolateSnapshot)),
|
||||
nullptr, dart_state, error);
|
||||
FTL_CHECK(isolate) << error;
|
||||
dart_state->SetIsolate(isolate);
|
||||
@@ -384,9 +384,8 @@ DartJniIsolateData* GetDartJniDataForCurrentIsolate() {
|
||||
|
||||
#if DART_ALLOW_DYNAMIC_RESOLUTION
|
||||
|
||||
constexpr char kDartVmIsolateSnapshotBufferName[] =
|
||||
"kDartVmIsolateSnapshotBuffer";
|
||||
constexpr char kDartIsolateSnapshotBufferName[] = "kDartIsolateSnapshotBuffer";
|
||||
constexpr char kVmIsolateSnapshotName[] = "kVmIsolateSnapshot";
|
||||
constexpr char kIsolateSnapshotName[] = "kIsolateSnapshot";
|
||||
constexpr char kInstructionsSnapshotName[] = "kInstructionsSnapshot";
|
||||
constexpr char kDataSnapshotName[] = "kDataSnapshot";
|
||||
|
||||
@@ -441,9 +440,9 @@ struct SymbolAsset {
|
||||
};
|
||||
|
||||
static SymbolAsset g_symbol_assets[] = {
|
||||
{kDartVmIsolateSnapshotBufferName, "snapshot_aot_vmisolate", false,
|
||||
{kVmIsolateSnapshotName, "snapshot_aot_vmisolate", false,
|
||||
offsetof(Settings, aot_vm_isolate_snapshot_file_name)},
|
||||
{kDartIsolateSnapshotBufferName, "snapshot_aot_isolate", false,
|
||||
{kIsolateSnapshotName, "snapshot_aot_isolate", false,
|
||||
offsetof(Settings, aot_isolate_snapshot_file_name)},
|
||||
{kInstructionsSnapshotName, "snapshot_aot_instr", true,
|
||||
offsetof(Settings, aot_instructions_blob_file_name)},
|
||||
@@ -657,7 +656,7 @@ void InitDartVM() {
|
||||
Dart_InitializeParams params = {};
|
||||
params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION;
|
||||
params.vm_isolate_snapshot =
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kDartVmIsolateSnapshotBuffer));
|
||||
reinterpret_cast<uint8_t*>(DART_SYMBOL(kVmIsolateSnapshot));
|
||||
params.instructions_snapshot = PrecompiledInstructionsSymbolIfPresent();
|
||||
params.data_snapshot = PrecompiledDataSnapshotSymbolIfPresent();
|
||||
params.create = IsolateCreateCallback;
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace blink {
|
||||
|
||||
#if DART_ALLOW_DYNAMIC_RESOLUTION
|
||||
|
||||
extern const char kDartVmIsolateSnapshotBufferName[];
|
||||
extern const char kDartIsolateSnapshotBufferName[];
|
||||
extern const char kVmIsolateSnapshotName[];
|
||||
extern const char kIsolateSnapshotName[];
|
||||
extern const char kInstructionsSnapshotName[];
|
||||
extern const char kDataSnapshotName[];
|
||||
|
||||
@@ -30,8 +30,8 @@ void* _DartSymbolLookup(const char* symbol_name);
|
||||
#else // DART_ALLOW_DYNAMIC_RESOLUTION
|
||||
|
||||
extern "C" {
|
||||
extern void* kDartVmIsolateSnapshotBuffer;
|
||||
extern void* kDartIsolateSnapshotBuffer;
|
||||
extern void* kVmIsolateSnapshot;
|
||||
extern void* kIsolateSnapshot;
|
||||
}
|
||||
|
||||
#define DART_SYMBOL(symbol) (&symbol)
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "lib/tonic/file_loader/file_loader.h"
|
||||
|
||||
extern "C" {
|
||||
extern const uint8_t kDartVmIsolateSnapshotBuffer[];
|
||||
extern const uint8_t kDartIsolateSnapshotBuffer[];
|
||||
extern const uint8_t kVmIsolateSnapshot[];
|
||||
extern const uint8_t kIsolateSnapshot[];
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -89,7 +89,7 @@ void InitDartVM() {
|
||||
FTL_CHECK(Dart_SetVMFlags(arraysize(kDartArgs), kDartArgs));
|
||||
Dart_InitializeParams params = {};
|
||||
params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION;
|
||||
params.vm_isolate_snapshot = kDartVmIsolateSnapshotBuffer;
|
||||
params.vm_isolate_snapshot = kVmIsolateSnapshot;
|
||||
char* error = Dart_Initialize(¶ms);
|
||||
if (error)
|
||||
FTL_LOG(FATAL) << error;
|
||||
@@ -98,7 +98,7 @@ void InitDartVM() {
|
||||
Dart_Isolate CreateDartIsolate() {
|
||||
char* error = nullptr;
|
||||
Dart_Isolate isolate =
|
||||
Dart_CreateIsolate("dart:snapshot", "main", kDartIsolateSnapshotBuffer,
|
||||
Dart_CreateIsolate("dart:snapshot", "main", kIsolateSnapshot,
|
||||
nullptr, nullptr, &error);
|
||||
FTL_CHECK(isolate) << error;
|
||||
Dart_ExitIsolate();
|
||||
|
||||
Reference in New Issue
Block a user