| OLD | NEW | 
|---|
| 1 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #ifndef VM_COVERAGE_H_ | 5 #ifndef VM_COVERAGE_H_ | 
| 6 #define VM_COVERAGE_H_ | 6 #define VM_COVERAGE_H_ | 
| 7 | 7 | 
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" | 
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" | 
| 10 | 10 | 
| 11 namespace dart { | 11 namespace dart { | 
| 12 | 12 | 
| 13 DECLARE_FLAG(charp, coverage_dir); | 13 DECLARE_FLAG(charp, coverage_dir); | 
| 14 | 14 | 
| 15 // Forward declarations. | 15 // Forward declarations. | 
| 16 class Class; | 16 class Class; | 
| 17 class Function; | 17 class Function; | 
| 18 template <typename T> class GrowableArray; | 18 template <typename T> class GrowableArray; | 
| 19 class Isolate; | 19 class Isolate; | 
| 20 class JSONArray; | 20 class JSONArray; | 
| 21 class JSONStream; | 21 class JSONStream; | 
|  | 22 class Library; | 
|  | 23 class Script; | 
|  | 24 class String; | 
| 22 | 25 | 
| 23 class CodeCoverage : public AllStatic { | 26 class CodeCoverage : public AllStatic { | 
| 24  public: | 27  public: | 
| 25   static void Write(Isolate* isolate); | 28   static void Write(Isolate* isolate); | 
| 26   static void PrintJSON(Isolate* isolate, JSONStream* stream); | 29   static void PrintJSON(Isolate* isolate, JSONStream* stream); | 
| 27 | 30 | 
|  | 31   static void PrintJSONForScript(const Script& script, JSONStream* stream); | 
|  | 32   static void PrintJSONForLibrary( | 
|  | 33       const Library& lib, const Script& script_filter, JSONStream* stream); | 
|  | 34   static void PrintJSONForClass(const Class& lib, JSONStream* stream); | 
|  | 35 | 
| 28  private: | 36  private: | 
| 29   static void PrintClass(const Class& cls, const JSONArray& arr); | 37   static void PrintClass(const Class& cls, | 
|  | 38                          const JSONArray& arr, | 
|  | 39                          const Script& script_filter); | 
| 30   static void CompileAndAdd(const Function& function, | 40   static void CompileAndAdd(const Function& function, | 
| 31                             const JSONArray& hits_arr, | 41                             const JSONArray& hits_arr, | 
| 32                             const GrowableArray<intptr_t>& pos_to_line); | 42                             const GrowableArray<intptr_t>& pos_to_line); | 
| 33 }; | 43 }; | 
| 34 | 44 | 
| 35 }  // namespace dart | 45 }  // namespace dart | 
| 36 | 46 | 
| 37 #endif  // VM_COVERAGE_H_ | 47 #endif  // VM_COVERAGE_H_ | 
| OLD | NEW | 
|---|