Index: src/compiler/js-operator.cc |
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc |
index c486e02855d6f733e3012c7923c450116eff8268..975ca0c5b18be8009b049ef43ebac92bb2c56803 100644 |
--- a/src/compiler/js-operator.cc |
+++ b/src/compiler/js-operator.cc |
@@ -391,6 +391,28 @@ const StorePropertyParameters& StorePropertyParametersOf(const Operator* op) { |
} |
+bool operator==(CreateArgumentsParameters const& lhs, |
+ CreateArgumentsParameters const& rhs) { |
+ return lhs.type() == rhs.type() && lhs.start_index() == rhs.start_index(); |
+} |
+ |
+ |
+bool operator!=(CreateArgumentsParameters const& lhs, |
+ CreateArgumentsParameters const& rhs) { |
+ return !(lhs == rhs); |
+} |
+ |
+ |
+size_t hash_value(CreateArgumentsParameters const& p) { |
+ return base::hash_combine(p.type(), p.start_index()); |
+} |
+ |
+ |
+std::ostream& operator<<(std::ostream& os, CreateArgumentsParameters const& p) { |
+ return os << p.type() << ", " << p.start_index(); |
+} |
+ |
+ |
bool operator==(CreateClosureParameters const& lhs, |
CreateClosureParameters const& rhs) { |
return lhs.pretenure() == rhs.pretenure() && |
@@ -705,6 +727,18 @@ const Operator* JSOperatorBuilder::LoadDynamicContext( |
} |
+const Operator* JSOperatorBuilder::CreateArguments( |
+ CreateArgumentsParameters::Type type, int start_index) { |
+ DCHECK_IMPLIES(start_index, type == CreateArgumentsParameters::kRestArray); |
+ CreateArgumentsParameters parameters(type, start_index); |
+ return new (zone()) Operator1<CreateArgumentsParameters>( // -- |
+ IrOpcode::kJSCreateArguments, Operator::kNoThrow, // opcode |
+ "JSCreateArguments", // name |
+ 1, 1, 1, 1, 1, 0, // counts |
+ parameters); // parameter |
+} |
+ |
+ |
const Operator* JSOperatorBuilder::CreateClosure( |
Handle<SharedFunctionInfo> shared_info, PretenureFlag pretenure) { |
CreateClosureParameters parameters(shared_info, pretenure); |