OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |