| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 url = script.url(); | 178 url = script.url(); |
| 179 if (!url.Equals(saved_url)) { | 179 if (!url.Equals(saved_url)) { |
| 180 pos_to_line.Clear(); | 180 pos_to_line.Clear(); |
| 181 break; | 181 break; |
| 182 } | 182 } |
| 183 if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) { | 183 if (!filter->ShouldOutputCoverageFor(lib, script, cls, function)) { |
| 184 i++; | 184 i++; |
| 185 continue; | 185 continue; |
| 186 } | 186 } |
| 187 CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites); | 187 CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites); |
| 188 if (function.HasImplicitClosureFunction()) { | |
| 189 function = function.ImplicitClosureFunction(); | |
| 190 CompileAndAdd(function, hits_or_sites, pos_to_line, as_call_sites); | |
| 191 } | |
| 192 i++; | 188 i++; |
| 193 } | 189 } |
| 194 } | 190 } |
| 195 | 191 |
| 196 GrowableObjectArray& closures = | 192 GrowableObjectArray& closures = |
| 197 GrowableObjectArray::Handle(cls.closures()); | 193 GrowableObjectArray::Handle(cls.closures()); |
| 198 if (!closures.IsNull()) { | 194 if (!closures.IsNull()) { |
| 199 i = 0; | 195 i = 0; |
| 200 pos_to_line.Clear(); | 196 pos_to_line.Clear(); |
| 201 // We need to keep rechecking the length of the closures array, as handling | 197 // We need to keep rechecking the length of the closures array, as handling |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 cls = it.GetNextClass(); | 284 cls = it.GetNextClass(); |
| 289 ASSERT(!cls.IsNull()); | 285 ASSERT(!cls.IsNull()); |
| 290 PrintClass(lib, cls, jsarr, filter, as_call_sites); | 286 PrintClass(lib, cls, jsarr, filter, as_call_sites); |
| 291 } | 287 } |
| 292 } | 288 } |
| 293 } | 289 } |
| 294 } | 290 } |
| 295 | 291 |
| 296 | 292 |
| 297 } // namespace dart | 293 } // namespace dart |
| OLD | NEW |