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

Unified Diff: runtime/vm/coverage.h

Issue 351373002: Coverage API revamp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/coverage.cc » ('j') | runtime/vm/coverage.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/coverage.h
diff --git a/runtime/vm/coverage.h b/runtime/vm/coverage.h
index 72c639ae01844c7b531516fc877034e66619e72c..12c4023fa882ec2e55d0bcc48cdef1c5c49ea0a6 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 GetCoverage(const Library& lib,
Michael Lippautz (Google) 2014/06/27 00:16:48 Performance of using only one filter function (and
Cutch 2014/06/27 15:07:19 Maybe rename to "ShouldOutputCoverageFor" Also, m
Michael Lippautz (Google) 2014/06/27 17:12:24 Done.
+ const Script& script,
+ const Class& cls,
+ const Function& func) = 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);
« no previous file with comments | « no previous file | runtime/vm/coverage.cc » ('j') | runtime/vm/coverage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698