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

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

Issue 2882973002: [coverage] Block coverage with support for IfStatements (Closed)
Patch Set: Comment nit 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/interpreter-generator.cc
diff --git a/src/interpreter/interpreter-generator.cc b/src/interpreter/interpreter-generator.cc
index a9e5233909baebf58df92ca16a2e432fb5f8d69d..f25f99d28da2076114a2d6def849cafb141292dc 100644
--- a/src/interpreter/interpreter-generator.cc
+++ b/src/interpreter/interpreter-generator.cc
@@ -3143,6 +3143,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* feedback_vector = LoadFeedbackVector();
+ Node* slot = BytecodeOperandImmSmi(0);
rmcilroy 2017/05/18 14:17:59 nit - slot -> coverage_array_slot (to avoid confus
jgruber 2017/05/22 09:43:32 Done.
+ Node* context = GetContext();
+
+ CallRuntime(Runtime::kIncBlockCounter, context, feedback_vector, slot);
+
+ Dispatch();
+}
+
class InterpreterForInPrepareAssembler : public InterpreterAssembler {
public:
InterpreterForInPrepareAssembler(CodeAssemblerState* state, Bytecode bytecode,

Powered by Google App Engine
This is Rietveld 408576698