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

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
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index d4f5129d4435839c8e2dc32c2325ef724f25634f..78a3c694b7a1e6b38f121a8518d09e243a93d9f1 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -2238,7 +2238,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());
}
@@ -2880,7 +2883,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);
@@ -2951,7 +2955,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();
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698