Update the Dart VM and wire in the extra kDataSnapshot symbol for the precompiler

This commit is contained in:
Chinmay Garde 2016-02-19 16:48:28 -08:00
parent 05f3324b8d
commit ab145b1fa9
3 changed files with 15 additions and 5 deletions

2
DEPS
View File

@ -26,7 +26,7 @@ vars = {
# Note: When updating the Dart revision, ensure that all entries that are
# dependencies of dart are also updated
'dart_revision': 'a5db38467e2ea7658c1b15a33d9b8405ec6c0cb7',
'dart_revision': '5322692506e0f1af4e5c83ea8ae994498342466a',
'dart_observatory_packages_revision': 'cf90eb9077177d3d6b3fd5e8289477c2385c026a',
'dart_root_certificates_revision': 'c3a41df63afacec62fcb8135196177e35fe72f71',

View File

@ -218,6 +218,7 @@ static void ServiceStreamCancelCallback(const char* stream_id) {
const char* kDartVmIsolateSnapshotBufferName = "kDartVmIsolateSnapshotBuffer";
const char* kDartIsolateSnapshotBufferName = "kDartIsolateSnapshotBuffer";
const char* kInstructionsSnapshotName = "kInstructionsSnapshot";
const char* kDataSnapshotName = "kDataSnapshot";
const char* kDartApplicationLibraryPath =
"FlutterApplication.framework/FlutterApplication";
@ -261,6 +262,10 @@ static const uint8_t* PrecompiledInstructionsSymbolIfPresent() {
return reinterpret_cast<uint8_t*>(DART_SYMBOL(kInstructionsSnapshot));
}
static const uint8_t* PrecompiledDataSnapshotSymbolIfPresent() {
return reinterpret_cast<uint8_t*>(DART_SYMBOL(kDataSnapshot));
}
bool IsRunningPrecompiledCode() {
TRACE_EVENT0("flutter", __func__);
return PrecompiledInstructionsSymbolIfPresent() != nullptr;
@ -272,6 +277,10 @@ static const uint8_t* PrecompiledInstructionsSymbolIfPresent() {
return nullptr;
}
static const uint8_t* PrecompiledDataSnapshotSymbolIfPresent() {
return nullptr;
}
bool IsRunningPrecompiledCode() {
return false;
}
@ -327,6 +336,7 @@ void InitDartVM() {
CHECK(Dart_Initialize(reinterpret_cast<uint8_t*>(
DART_SYMBOL(kDartVmIsolateSnapshotBuffer)),
PrecompiledInstructionsSymbolIfPresent(),
PrecompiledDataSnapshotSymbolIfPresent(),
IsolateCreateCallback,
nullptr, // Isolate interrupt callback.
nullptr,

View File

@ -20,10 +20,10 @@ static const char* kDartArgs[] = {
void InitDartVM() {
CHECK(Dart_SetVMFlags(arraysize(kDartArgs), kDartArgs));
CHECK(
Dart_Initialize(reinterpret_cast<uint8_t*>(&kDartVmIsolateSnapshotBuffer),
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr) == nullptr);
CHECK(Dart_Initialize(
reinterpret_cast<uint8_t*>(&kDartVmIsolateSnapshotBuffer), nullptr,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr) == nullptr);
}
Dart_Isolate CreateDartIsolate() {