Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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()) { | |
|
rmacnak
2016/01/07 18:08:43
Similar story with sync* and async* functions.
Is
turnidge
2016/01/07 19:25:17
Done.
| |
| 251 return; | |
| 252 } | |
| 253 | |
| 247 JSONObject range(jsarr); | 254 JSONObject range(jsarr); |
| 248 range.AddProperty("scriptIndex", GetScriptIndex(script)); | 255 range.AddProperty("scriptIndex", GetScriptIndex(script)); |
| 249 range.AddProperty("startPos", begin_pos); | 256 range.AddProperty("startPos", begin_pos); |
| 250 range.AddProperty("endPos", end_pos); | 257 range.AddProperty("endPos", end_pos); |
| 251 range.AddProperty("compiled", true); | 258 range.AddProperty("compiled", true); |
| 252 | 259 |
| 253 if (IsReportRequested(kCallSites)) { | 260 if (IsReportRequested(kCallSites)) { |
| 254 PrintCallSitesData(&range, func, code); | 261 PrintCallSitesData(&range, func, code); |
| 255 } | 262 } |
| 256 if (IsReportRequested(kCoverage)) { | 263 if (IsReportRequested(kCoverage)) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 VisitClosures(&ranges); | 322 VisitClosures(&ranges); |
| 316 } | 323 } |
| 317 | 324 |
| 318 // Print the script table. | 325 // Print the script table. |
| 319 JSONArray scripts(&report, "scripts"); | 326 JSONArray scripts(&report, "scripts"); |
| 320 PrintScriptTable(&scripts); | 327 PrintScriptTable(&scripts); |
| 321 } | 328 } |
| 322 | 329 |
| 323 | 330 |
| 324 } // namespace dart | 331 } // namespace dart |
| OLD | NEW |