Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: runtime/vm/dart.cc

Issue 2715213008: VM: Allow configuring use_field_guards on the per-isolate basis and include it into snapshot featur… (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 83b1055b308621580006287e09e58a33d60212dd..40dc4986a9a276036c299cfd109aa76055b0ae85 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -653,7 +653,7 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_data,
}
-const char* Dart::FeaturesString(Snapshot::Kind kind) {
+const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
TextBuffer buffer(64);
// Different fields are included for DEBUG/RELEASE/PRODUCT.
@@ -667,9 +667,15 @@ const char* Dart::FeaturesString(Snapshot::Kind kind) {
if (Snapshot::IncludesCode(kind)) {
// Checked mode affects deopt ids.
- buffer.AddString(FLAG_enable_asserts ? " asserts" : " no-asserts");
- buffer.AddString(FLAG_enable_type_checks ? " type-checks"
- : " no-type-checks");
+ const bool asserts =
+ (isolate != NULL) ? isolate->asserts() : FLAG_enable_asserts;
+ const bool type_checks =
+ (isolate != NULL) ? isolate->type_checks() : FLAG_enable_type_checks;
+ const bool field_guards =
+ (isolate != NULL) ? isolate->use_field_guards() : FLAG_use_field_guards;
+ buffer.AddString(asserts ? " asserts" : " no-asserts");
+ buffer.AddString(type_checks ? " type-checks" : " no-type-checks");
+ buffer.AddString(field_guards ? "field-guards" : "no-field-guards");
// Generated code must match the host architecture and ABI.
#if defined(TARGET_ARCH_ARM)

Powered by Google App Engine
This is Rietveld 408576698