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

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

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch. Created 4 years, 4 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.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 7a1a7a051154bf4c583f4a02460b1f61be3bc5fe..fcea634f0c4193429ed56ccc57e52f01c2bfec62 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2244,7 +2244,10 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
}
}
VisitForAccumulatorValue(expr->value());
- builder()->BinaryOperation(expr->binary_op(), old_value);
+ FeedbackVectorSlot slot =
+ expr->binary_operation()->BinaryOperationFeedbackSlot();
+ builder()->BinaryOperation(expr->binary_op(), old_value,
+ feedback_index(slot));
} else {
VisitForAccumulatorValue(expr->value());
}
@@ -2886,7 +2889,8 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
}
// Perform +1/-1 operation.
- builder()->CountOperation(expr->binary_op());
+ FeedbackVectorSlot slot = expr->CountBinaryOpFeedbackSlot();
+ builder()->CountOperation(expr->binary_op(), feedback_index(slot));
// Store the value.
builder()->SetExpressionPosition(expr);
@@ -2957,7 +2961,8 @@ void BytecodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) {
// +x and -x by the parser.
Register lhs = VisitForRegisterValue(expr->left());
VisitForAccumulatorValue(expr->right());
- builder()->BinaryOperation(expr->op(), lhs);
+ FeedbackVectorSlot slot = expr->BinaryOperationFeedbackSlot();
+ builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot));
execution_result()->SetResultInAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698