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

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: 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 58f6e7288dc9c71e5c37863e4c643c0dbbfafaa0..d8fb36b59eac1237f63b6b6476884d3cdf9223a9 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2210,7 +2210,10 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
}
}
VisitForAccumulatorValue(expr->value());
- builder()->BinaryOperation(expr->binary_op(), old_value);
+ int feedback_slot_index =
+ feedback_index(expr->binary_operation()->BinaryOperationFeedbackSlot());
rmcilroy 2016/08/03 16:04:30 nit - keep variable as "FeedbackVectorSlot slot" a
mythria 2016/08/05 07:08:15 Done.
+ builder()->BinaryOperation(expr->binary_op(), old_value,
+ feedback_slot_index);
} else {
VisitForAccumulatorValue(expr->value());
}
@@ -2852,7 +2855,8 @@ void BytecodeGenerator::VisitCountOperation(CountOperation* expr) {
}
// Perform +1/-1 operation.
- builder()->CountOperation(expr->binary_op());
+ int feedback_slot_index = feedback_index(expr->CountBinaryOpFeedbackSlot());
rmcilroy 2016/08/03 16:04:29 ditto
mythria 2016/08/05 07:08:14 Done.
+ builder()->CountOperation(expr->binary_op(), feedback_slot_index);
// Store the value.
builder()->SetExpressionPosition(expr);
@@ -2923,7 +2927,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);
+ int feedback_slot_index = feedback_index(expr->BinaryOperationFeedbackSlot());
rmcilroy 2016/08/03 16:04:30 ditto
mythria 2016/08/05 07:08:14 Done.
+ builder()->BinaryOperation(expr->op(), lhs, feedback_slot_index);
execution_result()->SetResultInAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698