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

Unified Diff: src/interpreter/bytecode-generator.h

Issue 2882973002: [coverage] Block coverage with support for IfStatements (Closed)
Patch Set: Two fixes Created 3 years, 7 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
Index: src/interpreter/bytecode-generator.h
diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h
index 579365952b9fae9bd4fc51e4c902c0b8bd0c4133..97e7f1b9314c3f716bb8eb8c930da2cf5883ef27 100644
--- a/src/interpreter/bytecode-generator.h
+++ b/src/interpreter/bytecode-generator.h
@@ -51,6 +51,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
class ExpressionResultScope;
class EffectResultScope;
class GlobalDeclarationsBuilder;
+ class BlockCoverageBuilder;
class RegisterAllocationScope;
class TestResultScope;
class ValueResultScope;
@@ -236,6 +237,9 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
inline LanguageMode language_mode() const;
int feedback_index(FeedbackSlot slot) const;
+ int AllocateBlockCoverageSlot(SourceRange range);
+ void IncBlockCounter(int coverage_array_slot);
rmcilroy 2017/06/02 09:35:59 nit - move above "getters" (maybe below BuildLoadP
jgruber 2017/06/02 11:38:49 Done.
+
Zone* zone_;
BytecodeArrayBuilder* builder_;
CompilationInfo* info_;
@@ -244,6 +248,7 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
Scope* current_scope_;
GlobalDeclarationsBuilder* globals_builder_;
+ BlockCoverageBuilder* block_coverage_builder_;
ZoneVector<GlobalDeclarationsBuilder*> global_declarations_;
ZoneVector<std::pair<FunctionLiteral*, size_t>> function_literals_;
ZoneVector<std::pair<NativeFunctionLiteral*, size_t>>

Powered by Google App Engine
This is Rietveld 408576698