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

Side by Side Diff: runtime/vm/flags.cc

Issue 2146713004: More changes to use #ifndef PRODUCT ... #endif explicitly instead of relying on compiler magic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flags.h ('k') | runtime/vm/gc_marker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flags.h" 5 #include "vm/flags.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 10
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 481
482 void Flags::PrintFlags() { 482 void Flags::PrintFlags() {
483 OS::Print("Flag settings:\n"); 483 OS::Print("Flag settings:\n");
484 for (intptr_t i = 0; i < num_flags_; ++i) { 484 for (intptr_t i = 0; i < num_flags_; ++i) {
485 flags_[i]->Print(); 485 flags_[i]->Print();
486 } 486 }
487 } 487 }
488 488
489 489
490 #ifndef PRODUCT
490 void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) { 491 void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) {
491 if (!FLAG_support_service) { 492 if (!FLAG_support_service) {
492 return; 493 return;
493 } 494 }
494 if (flag->IsUnrecognized() || flag->type_ == Flag::kFunc) { 495 if (flag->IsUnrecognized() || flag->type_ == Flag::kFunc) {
495 return; 496 return;
496 } 497 }
497 JSONObject jsflag(jsarr); 498 JSONObject jsflag(jsarr);
498 jsflag.AddProperty("name", flag->name_); 499 jsflag.AddProperty("name", flag->name_);
499 jsflag.AddProperty("comment", flag->comment_); 500 jsflag.AddProperty("comment", flag->comment_);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 if (!FLAG_support_service) { 536 if (!FLAG_support_service) {
536 return; 537 return;
537 } 538 }
538 JSONObject jsobj(js); 539 JSONObject jsobj(js);
539 jsobj.AddProperty("type", "FlagList"); 540 jsobj.AddProperty("type", "FlagList");
540 JSONArray jsarr(&jsobj, "flags"); 541 JSONArray jsarr(&jsobj, "flags");
541 for (intptr_t i = 0; i < num_flags_; ++i) { 542 for (intptr_t i = 0; i < num_flags_; ++i) {
542 PrintFlagToJSONArray(&jsarr, flags_[i]); 543 PrintFlagToJSONArray(&jsarr, flags_[i]);
543 } 544 }
544 } 545 }
546 #endif // !PRODUCT
545 547
546 } // namespace dart 548 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flags.h ('k') | runtime/vm/gc_marker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698