Index: src/compiler/js-operator.cc |
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc |
index 44a47d91e83f83dc40a158d73e8daacc5bb0dd48..5004841d4a9e5ba1e990f5fa63314f549543eacf 100644 |
--- a/src/compiler/js-operator.cc |
+++ b/src/compiler/js-operator.cc |
@@ -292,7 +292,8 @@ std::ostream& operator<<(std::ostream& os, FeedbackParameter const& p) { |
} |
FeedbackParameter const& FeedbackParameterOf(const Operator* op) { |
- DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral); |
+ DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral || |
+ op->opcode() == IrOpcode::kJSCollectTypeProfile); |
return OpParameter<FeedbackParameter>(op); |
} |
@@ -703,6 +704,17 @@ const Operator* JSOperatorBuilder::StoreDataPropertyInLiteral( |
parameters); // parameter |
} |
+const Operator* JSOperatorBuilder::CollectTypeProfile( |
+ const VectorSlotPair& feedback) { |
+ FeedbackParameter parameters(feedback); |
+ return new (zone()) Operator1<FeedbackParameter>( // -- |
+ IrOpcode::kJSCollectTypeProfile, |
+ Operator::kNoThrow, // opcode |
+ "JSCollectTypeProfile", // name |
+ 2, 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>( //-- |