Index: src/compiler/js-operator.cc |
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc |
index 26212ce3e522b7935765e14bc618596db194b2b9..ef9dc8808fa0048e9e0a50cb3229f53eb174a345 100644 |
--- a/src/compiler/js-operator.cc |
+++ b/src/compiler/js-operator.cc |
@@ -246,6 +246,29 @@ CreateFunctionContextParameters const& CreateFunctionContextParametersOf( |
return OpParameter<CreateFunctionContextParameters>(op); |
} |
+bool operator==(DataPropertyParameters const& lhs, |
+ DataPropertyParameters const& rhs) { |
+ return lhs.feedback() == rhs.feedback(); |
+} |
+ |
+bool operator!=(DataPropertyParameters const& lhs, |
+ DataPropertyParameters const& rhs) { |
+ return !(lhs == rhs); |
+} |
+ |
+size_t hash_value(DataPropertyParameters const& p) { |
+ return base::hash_combine(p.feedback()); |
+} |
+ |
+std::ostream& operator<<(std::ostream& os, DataPropertyParameters const& p) { |
+ return os; |
+} |
+ |
+DataPropertyParameters const& DataPropertyParametersOf(const Operator* op) { |
+ DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral); |
+ return OpParameter<DataPropertyParameters>(op); |
+} |
+ |
bool operator==(NamedAccess const& lhs, NamedAccess const& rhs) { |
return lhs.name().location() == rhs.name().location() && |
lhs.language_mode() == rhs.language_mode() && |
@@ -511,8 +534,7 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) { |
V(StoreMessage, Operator::kNoThrow, 1, 0) \ |
V(GeneratorRestoreContinuation, Operator::kNoThrow, 1, 1) \ |
V(StackCheck, Operator::kNoWrite, 0, 0) \ |
- V(GetSuperConstructor, Operator::kNoWrite, 1, 1) \ |
- V(StoreDataPropertyInLiteral, Operator::kNoProperties, 4, 0) |
+ V(GetSuperConstructor, Operator::kNoWrite, 1, 1) |
#define BINARY_OP_LIST(V) \ |
V(BitwiseOr) \ |
@@ -651,6 +673,17 @@ BINARY_OP_LIST(BINARY_OP) |
COMPARE_OP_LIST(COMPARE_OP) |
#undef COMPARE_OP |
+const Operator* JSOperatorBuilder::StoreDataPropertyInLiteral( |
+ const VectorSlotPair& feedback) { |
+ DataPropertyParameters parameters(feedback); |
+ return new (zone()) Operator1<DataPropertyParameters>( // -- |
+ IrOpcode::kJSStoreDataPropertyInLiteral, |
+ Operator::kNoThrow, // opcode |
+ "JSStoreDataPropertyInLiteral", // name |
+ 4, 1, 1, 0, 1, 0, // counts |
+ parameters); // parameter |
+} |
+ |
const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) { |
// TODO(turbofan): Cache most important versions of this operator. |
return new (zone()) Operator1<ToBooleanHints>( //-- |