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

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

Issue 2286273002: [interpreter] Make the comparison bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. 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 aa50271689788da3c0bcca20787295f3883cb0ab..704f4e91e33d16c9d1a4b08158d2a3207a7dfa47 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1123,7 +1123,9 @@ void BytecodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
// Perform label comparison as if via '===' with tag.
VisitForAccumulatorValue(clause->label());
- builder()->CompareOperation(Token::Value::EQ_STRICT, tag);
+ builder()->CompareOperation(
+ Token::Value::EQ_STRICT, tag,
+ feedback_index(clause->CompareOperationFeedbackSlot()));
switch_builder.Case(i);
}
@@ -3031,7 +3033,8 @@ void BytecodeGenerator::VisitCompareOperation(CompareOperation* expr) {
Register lhs = VisitForRegisterValue(expr->left());
VisitForAccumulatorValue(expr->right());
builder()->SetExpressionPosition(expr);
- builder()->CompareOperation(expr->op(), lhs);
+ FeedbackVectorSlot slot = expr->CompareOperationFeedbackSlot();
+ builder()->CompareOperation(expr->op(), lhs, feedback_index(slot));
execution_result()->SetResultInAccumulator();
}

Powered by Google App Engine
This is Rietveld 408576698