Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index e1bcb48a8d8d738ceb7ca40f7ca8a757668f4ac7..6a23812ae906566308e34373a9f4d98d59ef906c 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -587,7 +587,7 @@ void BytecodeGenerator::MakeBytecodeBody() { |
// Build rest arguments array if it is used. |
int rest_index; |
Variable* rest_parameter = scope()->rest_parameter(&rest_index); |
- VisitRestArgumentsArray(rest_parameter, rest_index); |
+ VisitRestArgumentsArray(rest_parameter); |
// Build assignment to {.this_function} variable if it is used. |
VisitThisFunctionVariable(scope()->this_function_var()); |
@@ -2604,12 +2604,12 @@ void BytecodeGenerator::VisitArgumentsObject(Variable* variable) { |
VisitVariableAssignment(variable, FeedbackVectorSlot::Invalid()); |
} |
-void BytecodeGenerator::VisitRestArgumentsArray(Variable* rest, int index) { |
+void BytecodeGenerator::VisitRestArgumentsArray(Variable* rest) { |
if (rest == nullptr) return; |
- // Allocate and initialize a new arguments object and assign to the {rest} |
+ // Allocate and initialize a new rest parameter and assign to the {rest} |
// variable. |
- builder()->CreateRestArguments(index); |
+ builder()->CreateArguments(CreateArgumentsType::kRestParameter); |
DCHECK(rest->IsContextSlot() || rest->IsStackAllocated()); |
VisitVariableAssignment(rest, FeedbackVectorSlot::Invalid()); |
} |