| Index: src/compiler/ast-graph-builder.cc
|
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
|
| index c04c378fcdde3e8275a7f952f892fbe52c9c8354..5227c7b3df96bfefc7dcb018b2996a727ba23c8b 100644
|
| --- a/src/compiler/ast-graph-builder.cc
|
| +++ b/src/compiler/ast-graph-builder.cc
|
| @@ -502,9 +502,10 @@ bool AstGraphBuilder::CreateGraph(bool constant_context, bool stack_check) {
|
| Scope* scope = info()->scope();
|
| DCHECK(graph() != NULL);
|
|
|
| - // Set up the basic structure of the graph.
|
| - int parameter_count = info()->num_parameters();
|
| - graph()->SetStart(graph()->NewNode(common()->Start(parameter_count)));
|
| + // Set up the basic structure of the graph. Outputs for {Start} are the formal
|
| + // parameters (including the receiver) plus context and closure.
|
| + int actual_parameter_count = info()->num_parameters_including_this() + 2;
|
| + graph()->SetStart(graph()->NewNode(common()->Start(actual_parameter_count)));
|
|
|
| // Initialize the top-level environment.
|
| Environment env(this, scope, graph()->start());
|
|
|