| Index: runtime/vm/coverage.h
|
| diff --git a/runtime/vm/coverage.h b/runtime/vm/coverage.h
|
| index 72c639ae01844c7b531516fc877034e66619e72c..5cc1ec13b22b094aad6a0a0dd16ee30335a7afa7 100644
|
| --- a/runtime/vm/coverage.h
|
| +++ b/runtime/vm/coverage.h
|
| @@ -23,20 +23,27 @@ class Library;
|
| class Script;
|
| class String;
|
|
|
| +class CoverageFilter : public ValueObject {
|
| + public:
|
| + virtual bool ShouldOutputCoverageFor(const Library& lib,
|
| + const String& script_url,
|
| + const Class& cls,
|
| + const Function& func) const = 0;
|
| + virtual ~CoverageFilter() {}
|
| +};
|
| +
|
| class CodeCoverage : public AllStatic {
|
| public:
|
| static void Write(Isolate* isolate);
|
| - static void PrintJSON(Isolate* isolate, JSONStream* stream);
|
| -
|
| - static void PrintJSONForScript(const Script& script, JSONStream* stream);
|
| - static void PrintJSONForLibrary(
|
| - const Library& lib, const Script& script_filter, JSONStream* stream);
|
| - static void PrintJSONForClass(const Class& lib, JSONStream* stream);
|
| + static void PrintJSON(Isolate* isolate,
|
| + JSONStream* stream,
|
| + CoverageFilter* filter);
|
|
|
| private:
|
| - static void PrintClass(const Class& cls,
|
| + static void PrintClass(const Library& lib,
|
| + const Class& cls,
|
| const JSONArray& arr,
|
| - const Script& script_filter);
|
| + CoverageFilter* filter);
|
| static void CompileAndAdd(const Function& function,
|
| const JSONArray& hits_arr,
|
| const GrowableArray<intptr_t>& pos_to_line);
|
|
|