| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // We stay within this loop while we are seeing functions from the same | 168 // We stay within this loop while we are seeing functions from the same |
| 169 // source URI. | 169 // source URI. |
| 170 while (i < functions.Length()) { | 170 while (i < functions.Length()) { |
| 171 function ^= functions.At(i); | 171 function ^= functions.At(i); |
| 172 script = function.script(); | 172 script = function.script(); |
| 173 url = script.url(); | 173 url = script.url(); |
| 174 if (!url.Equals(saved_url)) { | 174 if (!url.Equals(saved_url)) { |
| 175 pos_to_line.Clear(); | 175 pos_to_line.Clear(); |
| 176 break; | 176 break; |
| 177 } | 177 } |
| 178 if (!filter->ShouldOutputCoverageFor(lib, saved_url, cls, function)) { |
| 179 i++; |
| 180 continue; |
| 181 } |
| 178 CompileAndAdd(function, hits_arr, pos_to_line); | 182 CompileAndAdd(function, hits_arr, pos_to_line); |
| 179 if (function.HasImplicitClosureFunction()) { | 183 if (function.HasImplicitClosureFunction()) { |
| 180 function = function.ImplicitClosureFunction(); | 184 function = function.ImplicitClosureFunction(); |
| 181 CompileAndAdd(function, hits_arr, pos_to_line); | 185 CompileAndAdd(function, hits_arr, pos_to_line); |
| 182 } | 186 } |
| 183 i++; | 187 i++; |
| 184 } | 188 } |
| 185 } | 189 } |
| 186 | 190 |
| 187 GrowableObjectArray& closures = | 191 GrowableObjectArray& closures = |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 cls = it.GetNextClass(); | 283 cls = it.GetNextClass(); |
| 280 ASSERT(!cls.IsNull()); | 284 ASSERT(!cls.IsNull()); |
| 281 PrintClass(lib, cls, jsarr, filter); | 285 PrintClass(lib, cls, jsarr, filter); |
| 282 } | 286 } |
| 283 } | 287 } |
| 284 } | 288 } |
| 285 } | 289 } |
| 286 | 290 |
| 287 | 291 |
| 288 } // namespace dart | 292 } // namespace dart |
| OLD | NEW |