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

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

Issue 1053053002: Tidy up the service protocol. Begin improving the documentation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/observatory/test/call_site_data_test.dart ('k') | runtime/vm/isolate.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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « runtime/observatory/test/call_site_data_test.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698