| OLD | NEW |
| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 default: | 456 default: |
| 457 UNREACHABLE(); | 457 UNREACHABLE(); |
| 458 break; | 458 break; |
| 459 } | 459 } |
| 460 } | 460 } |
| 461 | 461 |
| 462 | 462 |
| 463 void Flags::PrintJSON(JSONStream* js) { | 463 void Flags::PrintJSON(JSONStream* js) { |
| 464 JSONObject jsobj(js); | 464 JSONObject jsobj(js); |
| 465 jsobj.AddProperty("type", "FlagList"); | 465 jsobj.AddProperty("type", "FlagList"); |
| 466 jsobj.AddProperty("id", "flags"); | |
| 467 | |
| 468 { | 466 { |
| 469 JSONArray jsarr(&jsobj, "unmodifiedFlags"); | 467 JSONArray jsarr(&jsobj, "unmodifiedFlags"); |
| 470 for (intptr_t i = 0; i < num_flags_; ++i) { | 468 for (intptr_t i = 0; i < num_flags_; ++i) { |
| 471 Flag* flag = flags_[i]; | 469 Flag* flag = flags_[i]; |
| 472 if (!flag->changed_) { | 470 if (!flag->changed_) { |
| 473 PrintFlagToJSONArray(&jsarr, flag); | 471 PrintFlagToJSONArray(&jsarr, flag); |
| 474 } | 472 } |
| 475 } | 473 } |
| 476 } | 474 } |
| 477 { | 475 { |
| 478 JSONArray jsarr(&jsobj, "modifiedFlags"); | 476 JSONArray jsarr(&jsobj, "modifiedFlags"); |
| 479 for (intptr_t i = 0; i < num_flags_; ++i) { | 477 for (intptr_t i = 0; i < num_flags_; ++i) { |
| 480 Flag* flag = flags_[i]; | 478 Flag* flag = flags_[i]; |
| 481 if (flag->changed_) { | 479 if (flag->changed_) { |
| 482 PrintFlagToJSONArray(&jsarr, flag); | 480 PrintFlagToJSONArray(&jsarr, flag); |
| 483 } | 481 } |
| 484 } | 482 } |
| 485 } | 483 } |
| 486 } | 484 } |
| 487 | 485 |
| 488 } // namespace dart | 486 } // namespace dart |
| OLD | NEW |