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

Unified Diff: runtime/vm/dart.cc

Issue 2728163002: VM: Make use_osr an Isolate flag, similar to how we made use_field_guards. (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/code_generator.cc ('k') | runtime/vm/debugger_api_impl_test.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 5a6a1b9fa3b8f138895727ab498b36c1871cc9b4..4c4a87d1438ff7132f882c6d467a78f0fd3122f1 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -669,15 +669,13 @@ const char* Dart::FeaturesString(Isolate* isolate, Snapshot::Kind kind) {
if (Snapshot::IncludesCode(kind)) {
// Checked mode affects deopt ids.
- 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");
+#define ADD_FLAG(name, isolate_flag, flag) \
+ do { \
+ const bool name = (isolate != NULL) ? isolate->name() : flag; \
+ buffer.AddString(name ? (" " #name) : (" no-" #name)); \
+ } while (0);
+ ISOLATE_FLAG_LIST(ADD_FLAG);
rmacnak 2017/03/03 17:45:15 The snapshot should still work even if FLAG_error_
+#undef ADD_FLAG
// Generated code must match the host architecture and ABI.
#if defined(TARGET_ARCH_ARM)
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698