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..509336bdf3772554842c79b56804e706e1c276bd 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 index) { |
rmcilroy
2016/02/03 14:00:56
/s/index/rest_index
mythria
2016/02/03 15:56:15
Done.
|
FrameStateBeforeAndAfter states(this); |
- const Operator* op = javascript()->CreateArguments(type, 0); |
+ const Operator* op = javascript()->CreateArguments(type, 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) { |