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

Unified Diff: src/interpreter/interpreter-generator.cc

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/interpreter/bytecodes.h ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-generator.cc
diff --git a/src/interpreter/interpreter-generator.cc b/src/interpreter/interpreter-generator.cc
index 85a15b2389b9cff57452cd0957b7e6be093fdd1a..cea72208c4a0427a5a8c3ea2f3bd3c5b6bf039a8 100644
--- a/src/interpreter/interpreter-generator.cc
+++ b/src/interpreter/interpreter-generator.cc
@@ -3438,6 +3438,20 @@ IGNITION_HANDLER(Debugger, InterpreterAssembler) {
DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK);
#undef DEBUG_BREAK
+// IncBlockCounter <slot>
+//
+// Increment the execution count for the given slot. Used for block code
+// coverage.
+IGNITION_HANDLER(IncBlockCounter, InterpreterAssembler) {
+ Node* closure = LoadRegister(Register::function_closure());
+ Node* coverage_array_slot = BytecodeOperandIdxSmi(0);
+ Node* context = GetContext();
+
+ CallRuntime(Runtime::kIncBlockCounter, context, closure, coverage_array_slot);
+
+ Dispatch();
+}
+
class InterpreterForInPrepareAssembler : public InterpreterAssembler {
public:
InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode,
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698