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

Unified Diff: src/compiler/js-operator.cc

Issue 2146293003: [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix IsComparisonOpcode Created 4 years, 5 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/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 92c9d37894bef26c1b80017feaae943ff1730c27..6cc78f1ab242eac4f4da0a1c8c63041491f77c52 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -399,7 +399,8 @@ const CompareOperationHints& CompareOperationHintsOf(const Operator* op) {
op->opcode() == IrOpcode::kJSLessThan ||
op->opcode() == IrOpcode::kJSGreaterThan ||
op->opcode() == IrOpcode::kJSLessThanOrEqual ||
- op->opcode() == IrOpcode::kJSGreaterThanOrEqual);
+ op->opcode() == IrOpcode::kJSGreaterThanOrEqual ||
+ op->opcode() == IrOpcode::kJSSameValueZero);
return OpParameter<CompareOperationHints>(op);
}
@@ -592,6 +593,14 @@ const Operator* JSOperatorBuilder::StrictNotEqual(CompareOperationHints hints) {
hints); // parameter
}
+const Operator* JSOperatorBuilder::SameValueZero(CompareOperationHints hints) {
+ return new (zone()) Operator1<CompareOperationHints>( //--
+ IrOpcode::kJSSameValueZero, Operator::kPure, // opcode
+ "JSSameValueZero", // name
+ 2, 0, 0, 1, 0, 0, // inputs/outputs
+ hints); // parameter
+}
+
const Operator* JSOperatorBuilder::LessThan(CompareOperationHints hints) {
// TODO(turbofan): Cache most important versions of this operator.
return new (zone()) Operator1<CompareOperationHints>( //--

Powered by Google App Engine
This is Rietveld 408576698