Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index 345a2c5f88177cf2713b22f1e958b34ec8d99519..2c8af8d8cf48eaed7354e76b73b5e7b8d09fb203 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -331,6 +331,12 @@ NumberOperationHint NumberOperationHintOf(const Operator* op) { |
return OpParameter<NumberOperationHint>(op); |
} |
+int ParameterCountOf(const Operator* op) { |
+ DCHECK(op->opcode() == IrOpcode::kNewUnmappedArgumentsElements || |
+ op->opcode() == IrOpcode::kNewRestParameterElements); |
+ return OpParameter<int>(op); |
+} |
+ |
PretenureFlag PretenureFlagOf(const Operator* op) { |
DCHECK_EQ(IrOpcode::kAllocate, op->opcode()); |
return OpParameter<PretenureFlag>(op); |
@@ -737,6 +743,26 @@ const Operator* SimplifiedOperatorBuilder::TransitionElementsKind( |
transition); // parameter |
} |
+const Operator* SimplifiedOperatorBuilder::NewUnmappedArgumentsElements( |
+ int parameter_count) { |
+ return new (zone()) Operator1<int>( // -- |
+ IrOpcode::kNewUnmappedArgumentsElements, // opcode |
+ Operator::kEliminatable, // flags |
+ "NewUnmappedArgumentsElements", // name |
+ 0, 1, 0, 1, 1, 0, // counts |
+ parameter_count); // parameter |
+} |
+ |
+const Operator* SimplifiedOperatorBuilder::NewRestParameterElements( |
+ int parameter_count) { |
+ return new (zone()) Operator1<int>( // -- |
+ IrOpcode::kNewRestParameterElements, // opcode |
+ Operator::kEliminatable, // flags |
+ "NewRestParameterElements", // name |
+ 0, 1, 0, 1, 1, 0, // counts |
+ parameter_count); // parameter |
+} |
+ |
const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) { |
switch (pretenure) { |
case NOT_TENURED: |