Index: src/compiler/js-operator.cc |
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc |
index 1e9d32dc0f9f2aa599f2c85e52279a5b386ded82..f48373f08520e1412b6805d2fa8109c950e96752 100644 |
--- a/src/compiler/js-operator.cc |
+++ b/src/compiler/js-operator.cc |
@@ -23,7 +23,8 @@ std::ostream& operator<<(std::ostream& os, CallFrequency f) { |
} |
CallFrequency CallFrequencyOf(Operator const* op) { |
- DCHECK_EQ(IrOpcode::kJSCallWithArrayLike, op->opcode()); |
+ DCHECK(op->opcode() == IrOpcode::kJSCallWithArrayLike || |
+ op->opcode() == IrOpcode::kJSConstructWithArrayLike); |
return OpParameter<CallFrequency>(op); |
} |
@@ -888,6 +889,16 @@ const Operator* JSOperatorBuilder::Construct(uint32_t arity, |
parameters); // parameter |
} |
+const Operator* JSOperatorBuilder::ConstructWithArrayLike( |
+ CallFrequency frequency) { |
+ return new (zone()) Operator1<CallFrequency>( // -- |
+ IrOpcode::kJSConstructWithArrayLike, // opcode |
+ Operator::kNoProperties, // properties |
+ "JSConstructWithArrayLike", // name |
+ 3, 1, 1, 1, 1, 2, // counts |
+ frequency); // parameter |
+} |
+ |
const Operator* JSOperatorBuilder::ConstructWithSpread(uint32_t arity) { |
SpreadWithArityParameter parameters(arity); |
return new (zone()) Operator1<SpreadWithArityParameter>( // -- |