Skip to content

Commit b494309

Browse files
bkonyicommit-bot@chromium.org
authored andcommitted
[ VM / DartDev ] Spawn DartDev isolate with flags matching those used to
generate the snapshot Change-Id: Ieb7f88b545569887e16edce278561b20ce5e0a21 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155545 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Ben Konyi <[email protected]>
1 parent 8d8dbfc commit b494309

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

runtime/bin/dartdev_isolate.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,23 @@ void DartDevIsolate::DartDevRunner::DartDevResultCallback(
173173
void DartDevIsolate::DartDevRunner::RunCallback(uword args) {
174174
MonitorLocker locker_(DartDevRunner::monitor_);
175175
DartDevRunner* runner = reinterpret_cast<DartDevRunner*>(args);
176+
177+
// TODO(bkonyi): bring up DartDev from kernel instead of a app-jit snapshot.
178+
// See https://github.com/dart-lang/sdk/issues/42804
176179
const char* dartdev_path = DartDevIsolate::TryResolveDartDevSnapshotPath();
177180
if (dartdev_path == nullptr) {
178181
ProcessError("Failed to find DartDev snapshot.", kErrorExitCode);
179182
return;
180183
}
184+
185+
// Hardcode flags to match those used to generate the DartDev snapshot.
181186
Dart_IsolateFlags flags;
182187
Dart_IsolateFlagsInitialize(&flags);
188+
flags.enable_asserts = false;
189+
flags.null_safety = false;
190+
flags.use_field_guards = true;
191+
flags.use_osr = true;
192+
183193
char* error;
184194
Dart_Isolate dartdev_isolate = runner->create_isolate_(
185195
dartdev_path, "dartdev", nullptr, runner->packages_file_, &flags,

0 commit comments

Comments
 (0)