| Index: runtime/vm/source_report.cc
|
| diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
|
| index 242957bae6aa1dc4d066f9bac05b401f865ddf91..4da21b6e8a350f7cbe4fc5e918b271d8af71d95c 100644
|
| --- a/runtime/vm/source_report.cc
|
| +++ b/runtime/vm/source_report.cc
|
| @@ -10,8 +10,8 @@
|
|
|
| namespace dart {
|
|
|
| -SourceReport::SourceReport(ReportKind report_kind, CompileMode compile_mode)
|
| - : report_kind_(report_kind),
|
| +SourceReport::SourceReport(intptr_t report_set, CompileMode compile_mode)
|
| + : report_set_(report_set),
|
| compile_mode_(compile_mode),
|
| thread_(NULL),
|
| script_(NULL),
|
| @@ -35,6 +35,11 @@ void SourceReport::Init(Thread* thread,
|
| }
|
|
|
|
|
| +bool SourceReport::IsReportRequested(ReportKind report_kind) {
|
| + return (report_set_ & report_kind) != 0;
|
| +}
|
| +
|
| +
|
| bool SourceReport::ShouldSkipFunction(const Function& func) {
|
| if (script_ != NULL && !script_->IsNull()) {
|
| if (func.script() != script_->raw()) {
|
| @@ -245,9 +250,10 @@ void SourceReport::VisitFunction(JSONArray* jsarr, const Function& func) {
|
| range.AddProperty("endPos", end_pos);
|
| range.AddProperty("compiled", true);
|
|
|
| - if (report_kind_ == kCallSites) {
|
| + if (IsReportRequested(kCallSites)) {
|
| PrintCallSitesData(&range, func, code);
|
| - } else if (report_kind_ == kCoverage) {
|
| + }
|
| + if (IsReportRequested(kCoverage)) {
|
| PrintCoverageData(&range, func, code);
|
| }
|
| }
|
|
|