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

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

Issue 1533653003: Add SourceReport, a class for generating Dart source-level reports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | runtime/vm/object.h » ('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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } 184 }
185 if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) { 185 if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) {
186 i++; 186 i++;
187 continue; 187 continue;
188 } 188 }
189 CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites); 189 CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites);
190 i++; 190 i++;
191 } 191 }
192 } 192 }
193 193
194 // TODO(turnidge): This looks like it prints closures many, many times.
194 const GrowableObjectArray& closures = GrowableObjectArray::Handle( 195 const GrowableObjectArray& closures = GrowableObjectArray::Handle(
195 thread->isolate()->object_store()->closure_functions()); 196 thread->isolate()->object_store()->closure_functions());
196 pos_to_line.Clear(); 197 pos_to_line.Clear();
197 // We need to keep rechecking the length of the closures array, as handling 198 // We need to keep rechecking the length of the closures array, as handling
198 // a closure potentially adds new entries to the end. 199 // a closure potentially adds new entries to the end.
199 i = 0; 200 i = 0;
200 while (i < closures.Length()) { 201 while (i < closures.Length()) {
201 HANDLESCOPE(thread); 202 HANDLESCOPE(thread);
202 function ^= closures.At(i); 203 function ^= closures.At(i);
203 if (function.Owner() != cls.raw()) { 204 if (function.Owner() != cls.raw()) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 cls = it.GetNextClass(); 287 cls = it.GetNextClass();
287 ASSERT(!cls.IsNull()); 288 ASSERT(!cls.IsNull());
288 PrintClass(lib, cls, jsarr, filter, as_call_sites); 289 PrintClass(lib, cls, jsarr, filter, as_call_sites);
289 } 290 }
290 } 291 }
291 } 292 }
292 } 293 }
293 294
294 295
295 } // namespace dart 296 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698