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

Unified Diff: src/compilation-info.h

Issue 2882973002: [coverage] Block coverage with support for IfStatements (Closed)
Patch Set: Address comments Created 3 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 | « src/ast/ast.h ('k') | src/compilation-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-info.h
diff --git a/src/compilation-info.h b/src/compilation-info.h
index bd05639aabfaf80316d2026ea26a43e1a278afd5..422826a592cb6d29fc26e827b60699830f8f2db6 100644
--- a/src/compilation-info.h
+++ b/src/compilation-info.h
@@ -19,6 +19,7 @@
namespace v8 {
namespace internal {
+class CoverageInfo;
class DeclarationScope;
class DeferredHandles;
class FunctionLiteral;
@@ -51,6 +52,7 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
kBailoutOnUninitialized = 1 << 14,
kOptimizeFromBytecode = 1 << 15,
kLoopPeelingEnabled = 1 << 16,
+ kBlockCoverageEnabled = 1 << 17,
};
CompilationInfo(Zone* zone, ParseInfo* parse_info, Isolate* isolate,
@@ -179,6 +181,12 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
bool is_loop_peeling_enabled() const { return GetFlag(kLoopPeelingEnabled); }
+ void MarkAsBlockCoverageEnabled() { SetFlag(kBlockCoverageEnabled); }
+
+ bool is_block_coverage_enabled() const {
+ return GetFlag(kBlockCoverageEnabled);
+ }
+
bool GeneratePreagedPrologue() const {
// Generate a pre-aged prologue if we are optimizing for size, which
// will make code old more aggressive. Only apply to Code::FUNCTION,
@@ -312,6 +320,12 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode() const;
+ bool has_coverage_info() const { return !coverage_info_.is_null(); }
+ Handle<CoverageInfo> coverage_info() const { return coverage_info_; }
+ void set_coverage_info(Handle<CoverageInfo> coverage_info) {
+ coverage_info_ = coverage_info;
+ }
+
private:
// Compilation mode.
// BASE is generated by the full codegen, optionally prepared for bailouts.
@@ -382,6 +396,10 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
Vector<const char> debug_name_;
+ // Encapsulates coverage information gathered by the bytecode generator.
+ // Needs to be stored on the shared function info once compilation completes.
+ Handle<CoverageInfo> coverage_info_;
+
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
};
« no previous file with comments | « src/ast/ast.h ('k') | src/compilation-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698