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

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

Issue 823403004: Begin migrating the vm service from a rest-style interface to a json-rpc style interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove old-style standalone tests. Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/observatory/test/inbound_references_test.dart ('k') | runtime/vm/debugger.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/coverage.h" 5 #include "vm/coverage.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 CoverageFilterAll default_filter; 264 CoverageFilterAll default_filter;
265 if (filter == NULL) { 265 if (filter == NULL) {
266 filter = &default_filter; 266 filter = &default_filter;
267 } 267 }
268 const GrowableObjectArray& libs = GrowableObjectArray::Handle( 268 const GrowableObjectArray& libs = GrowableObjectArray::Handle(
269 isolate, isolate->object_store()->libraries()); 269 isolate, isolate->object_store()->libraries());
270 Library& lib = Library::Handle(); 270 Library& lib = Library::Handle();
271 Class& cls = Class::Handle(); 271 Class& cls = Class::Handle();
272 JSONObject coverage(stream); 272 JSONObject coverage(stream);
273 coverage.AddProperty("type", "CodeCoverage"); 273 coverage.AddProperty("type", "CodeCoverage");
274 coverage.AddProperty("id", "coverage");
275 { 274 {
276 JSONArray jsarr(&coverage, "coverage"); 275 JSONArray jsarr(&coverage, "coverage");
277 for (int i = 0; i < libs.Length(); i++) { 276 for (int i = 0; i < libs.Length(); i++) {
278 lib ^= libs.At(i); 277 lib ^= libs.At(i);
279 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate); 278 ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
280 while (it.HasNext()) { 279 while (it.HasNext()) {
281 cls = it.GetNextClass(); 280 cls = it.GetNextClass();
282 ASSERT(!cls.IsNull()); 281 ASSERT(!cls.IsNull());
283 PrintClass(lib, cls, jsarr, filter); 282 PrintClass(lib, cls, jsarr, filter);
284 } 283 }
285 } 284 }
286 } 285 }
287 } 286 }
288 287
289 288
290 } // namespace dart 289 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/test/inbound_references_test.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698