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

Unified Diff: runtime/vm/dart.cc

Issue 2720123004: VM: Make Dart::FeaturesString respect isolate flags controlling asserts and type checks. (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
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/kernel_isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 83b1055b308621580006287e09e58a33d60212dd..7b1be662e0f0b399c4837556c4bc0fcbede894a8 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,12 @@ 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;
+ buffer.AddString(asserts ? " asserts" : " no-asserts");
+ buffer.AddString(type_checks ? " type-checks" : " no-type-checks");
// Generated code must match the host architecture and ABI.
#if defined(TARGET_ARCH_ARM)
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/kernel_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698