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

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

Issue 1330703002: Do not emit coverage/callsite info for implicit closure functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix test Created 5 years, 3 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 | « runtime/observatory/tests/service/coverage_test.dart ('k') | no next file » | 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/coverage_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698