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

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

Issue 1562993003: Add the forceCompile param to _getSourceReport. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review 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 | « runtime/vm/service.cc ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/source_report.h" 5 #include "vm/source_report.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 JSONObject range(jsarr); 237 JSONObject range(jsarr);
238 range.AddProperty("scriptIndex", GetScriptIndex(script)); 238 range.AddProperty("scriptIndex", GetScriptIndex(script));
239 range.AddProperty("startPos", begin_pos); 239 range.AddProperty("startPos", begin_pos);
240 range.AddProperty("endPos", end_pos); 240 range.AddProperty("endPos", end_pos);
241 range.AddProperty("compiled", false); 241 range.AddProperty("compiled", false);
242 return; 242 return;
243 } 243 }
244 } 244 }
245 ASSERT(!code.IsNull()); 245 ASSERT(!code.IsNull());
246 246
247 // We skip compiled async functions. Once an async function has
248 // been compiled, there is another function with the same range which
249 // actually contains the user code.
250 if (func.IsAsyncFunction() ||
251 func.IsAsyncGenerator() ||
252 func.IsSyncGenerator()) {
253 return;
254 }
255
247 JSONObject range(jsarr); 256 JSONObject range(jsarr);
248 range.AddProperty("scriptIndex", GetScriptIndex(script)); 257 range.AddProperty("scriptIndex", GetScriptIndex(script));
249 range.AddProperty("startPos", begin_pos); 258 range.AddProperty("startPos", begin_pos);
250 range.AddProperty("endPos", end_pos); 259 range.AddProperty("endPos", end_pos);
251 range.AddProperty("compiled", true); 260 range.AddProperty("compiled", true);
252 261
253 if (IsReportRequested(kCallSites)) { 262 if (IsReportRequested(kCallSites)) {
254 PrintCallSitesData(&range, func, code); 263 PrintCallSitesData(&range, func, code);
255 } 264 }
256 if (IsReportRequested(kCoverage)) { 265 if (IsReportRequested(kCoverage)) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 VisitClosures(&ranges); 324 VisitClosures(&ranges);
316 } 325 }
317 326
318 // Print the script table. 327 // Print the script table.
319 JSONArray scripts(&report, "scripts"); 328 JSONArray scripts(&report, "scripts");
320 PrintScriptTable(&scripts); 329 PrintScriptTable(&scripts);
321 } 330 }
322 331
323 332
324 } // namespace dart 333 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698