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

Unified Diff: src/interpreter/interpreter.cc

Issue 2639883002: [turbofan] Add Receiver feedback for abstract/strict equality. (Closed)
Patch Set: Created 3 years, 11 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/globals.h ('k') | src/type-feedback-vector-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 60c5e595afa004eb8f1e4d1b5f1126492d376cee..bfec149a37703e5d6756f83d2a2e5ae5a44aad42 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1096,7 +1096,15 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
__ Goto(&gather_rhs_type);
__ Bind(&lhs_is_not_string);
- var_type_feedback.Bind(__ SmiConstant(CompareOperationFeedback::kAny));
+ if (Token::IsEqualityOp(compare_op)) {
+ var_type_feedback.Bind(__ SelectSmiConstant(
+ __ IsJSReceiverInstanceType(lhs_instance_type),
+ CompareOperationFeedback::kReceiver,
+ CompareOperationFeedback::kAny));
+ } else {
+ var_type_feedback.Bind(
+ __ SmiConstant(CompareOperationFeedback::kAny));
+ }
__ Goto(&gather_rhs_type);
}
}
@@ -1161,8 +1169,17 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op,
__ Goto(&update_feedback);
__ Bind(&rhs_is_not_string);
- var_type_feedback.Bind(
- __ SmiConstant(CompareOperationFeedback::kAny));
+ if (Token::IsEqualityOp(compare_op)) {
+ var_type_feedback.Bind(
+ __ SmiOr(var_type_feedback.value(),
+ __ SelectSmiConstant(
+ __ IsJSReceiverInstanceType(rhs_instance_type),
+ CompareOperationFeedback::kReceiver,
+ CompareOperationFeedback::kAny)));
+ } else {
+ var_type_feedback.Bind(
+ __ SmiConstant(CompareOperationFeedback::kAny));
+ }
__ Goto(&update_feedback);
}
}
« no previous file with comments | « src/globals.h ('k') | src/type-feedback-vector-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698