| Index: src/compiler/bytecode-graph-builder.cc
|
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
|
| index 44b0d39d7f9740461630f7251fce1621ea8de3eb..8119b873e56235d7d0d1a46932f4bca82af57782 100644
|
| --- a/src/compiler/bytecode-graph-builder.cc
|
| +++ b/src/compiler/bytecode-graph-builder.cc
|
| @@ -1017,19 +1017,25 @@ void BytecodeGraphBuilder::VisitCreateClosure() {
|
| void BytecodeGraphBuilder::VisitCreateClosureWide() { VisitCreateClosure(); }
|
|
|
| void BytecodeGraphBuilder::BuildCreateArguments(
|
| - CreateArgumentsParameters::Type type) {
|
| + CreateArgumentsParameters::Type type, int rest_index) {
|
| FrameStateBeforeAndAfter states(this);
|
| - const Operator* op = javascript()->CreateArguments(type, 0);
|
| + const Operator* op = javascript()->CreateArguments(type, rest_index);
|
| Node* object = NewNode(op, GetFunctionClosure());
|
| environment()->BindAccumulator(object, &states);
|
| }
|
|
|
| void BytecodeGraphBuilder::VisitCreateMappedArguments() {
|
| - BuildCreateArguments(CreateArgumentsParameters::kMappedArguments);
|
| + BuildCreateArguments(CreateArgumentsParameters::kMappedArguments, 0);
|
| }
|
|
|
| void BytecodeGraphBuilder::VisitCreateUnmappedArguments() {
|
| - BuildCreateArguments(CreateArgumentsParameters::kUnmappedArguments);
|
| + BuildCreateArguments(CreateArgumentsParameters::kUnmappedArguments, 0);
|
| +}
|
| +
|
| +void BytecodeGraphBuilder::VisitCreateRestArguments() {
|
| + int index =
|
| + Smi::cast(*bytecode_iterator().GetConstantForIndexOperand(0))->value();
|
| + BuildCreateArguments(CreateArgumentsParameters::kRestArray, index);
|
| }
|
|
|
| void BytecodeGraphBuilder::BuildCreateLiteral(const Operator* op) {
|
|
|