Chromium Code Reviews| Index: src/compiler/ast-graph-builder.cc |
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
| index 3668ff8c01cdfe07d121b8eaa201ad2623b2fd57..870aaf41669e4f59254d24107adfc25dcedbd250 100644 |
| --- a/src/compiler/ast-graph-builder.cc |
| +++ b/src/compiler/ast-graph-builder.cc |
| @@ -506,7 +506,7 @@ AstGraphBuilder::AstGraphBuilder(Zone* local_zone, CompilationInfo* info, |
| Node* AstGraphBuilder::GetFunctionClosureForContext() { |
| - Scope* closure_scope = current_scope()->ClosureScope(); |
| + DeclarationScope* closure_scope = current_scope()->GetClosureScope(); |
| if (closure_scope->is_script_scope() || |
| closure_scope->is_module_scope()) { |
| // Contexts nested in the native context have a canonical empty function as |
| @@ -573,7 +573,7 @@ Node* AstGraphBuilder::GetEmptyFrameState() { |
| } |
| bool AstGraphBuilder::CreateGraph(bool stack_check) { |
| - Scope* scope = info()->scope(); |
| + DeclarationScope* scope = info()->scope(); |
| DCHECK_NOT_NULL(graph()); |
| // Set up the basic structure of the graph. Outputs for {Start} are the formal |
| @@ -633,7 +633,7 @@ bool AstGraphBuilder::CreateGraph(bool stack_check) { |
| void AstGraphBuilder::CreateGraphBody(bool stack_check) { |
| - Scope* scope = info()->scope(); |
| + DeclarationScope* scope = info()->scope(); |
| // Build the arguments object if it is used. |
| BuildArgumentsObject(scope->arguments()); |
| @@ -699,8 +699,8 @@ static BailoutId BeforeId(VariableProxy* proxy) { |
| : BailoutId::None(); |
| } |
| - |
| -static const char* GetDebugParameterName(Zone* zone, Scope* scope, int index) { |
| +static const char* GetDebugParameterName(Zone* zone, DeclarationScope* scope, |
| + int index) { |
| #if DEBUG |
| const AstRawString* name = scope->parameter(index)->raw_name(); |
| if (name && name->length() > 0) { |
| @@ -746,7 +746,8 @@ AstGraphBuilder::Environment::Environment(AstGraphBuilder* builder, |
| // (receiver is variable index -1 but {Parameter} node index 0 and located at |
| // index 0 in the environment). |
| for (int i = 0; i < scope->num_parameters(); ++i) { |
| - const char* debug_name = GetDebugParameterName(graph()->zone(), scope, i); |
| + const char* debug_name = |
| + GetDebugParameterName(graph()->zone(), scope->AsDeclarationScope(), i); |
|
Michael Starzinger
2016/08/03 13:02:19
nit: See comment above.
|
| const Operator* op = common()->Parameter(param_num++, debug_name); |
| Node* parameter = builder->graph()->NewNode(op, builder->graph()->start()); |
| values()->push_back(parameter); |
| @@ -3196,7 +3197,7 @@ Node* AstGraphBuilder::ProcessArguments(const Operator* op, int arity) { |
| Node* AstGraphBuilder::BuildLocalActivationContext(Node* context) { |
| - Scope* scope = info()->scope(); |
| + DeclarationScope* scope = info()->scope(); |
| // Allocate a new local context. |
| Node* local_context = scope->is_script_scope() |