| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| 11 #include "src/compiler/node-matchers.h" | 11 #include "src/compiler/node-matchers.h" |
| 12 #include "src/compiler/node-properties-inl.h" | 12 #include "src/compiler/node-properties-inl.h" |
| 13 #include "src/compiler/node-properties.h" | 13 #include "src/compiler/node-properties.h" |
| 14 #include "src/full-codegen.h" | 14 #include "src/full-codegen.h" |
| 15 #include "src/parser.h" | 15 #include "src/parser.h" |
| 16 #include "src/scopes.h" | 16 #include "src/scopes.h" |
| 17 | 17 |
| 18 namespace v8 { | 18 namespace v8 { |
| 19 namespace internal { | 19 namespace internal { |
| 20 namespace compiler { | 20 namespace compiler { |
| 21 | 21 |
| 22 AstGraphBuilder::AstGraphBuilder(Zone* local_zone, CompilationInfo* info, | 22 AstGraphBuilder::AstGraphBuilder(Zone* local_zone, CompilationInfo* info, |
| 23 JSGraph* jsgraph, LoopAssignmentAnalysis* loop) | 23 JSGraph* jsgraph, LoopAssignmentAnalysis* loop) |
| 24 : StructuredGraphBuilder(local_zone, jsgraph->graph(), jsgraph->common()), | 24 : StructuredGraphBuilder(jsgraph->isolate(), local_zone, jsgraph->graph(), |
| 25 jsgraph->common()), |
| 25 info_(info), | 26 info_(info), |
| 26 jsgraph_(jsgraph), | 27 jsgraph_(jsgraph), |
| 27 globals_(0, local_zone), | 28 globals_(0, local_zone), |
| 28 breakable_(NULL), | 29 breakable_(NULL), |
| 29 execution_context_(NULL), | 30 execution_context_(NULL), |
| 30 loop_assignment_analysis_(loop) { | 31 loop_assignment_analysis_(loop) { |
| 31 InitializeAstVisitor(local_zone); | 32 InitializeAstVisitor(info->isolate(), local_zone); |
| 32 } | 33 } |
| 33 | 34 |
| 34 | 35 |
| 35 Node* AstGraphBuilder::GetFunctionClosure() { | 36 Node* AstGraphBuilder::GetFunctionClosure() { |
| 36 if (!function_closure_.is_set()) { | 37 if (!function_closure_.is_set()) { |
| 37 // Parameter -1 is special for the function closure | 38 // Parameter -1 is special for the function closure |
| 38 const Operator* op = common()->Parameter(-1); | 39 const Operator* op = common()->Parameter(-1); |
| 39 Node* node = NewNode(op, graph()->start()); | 40 Node* node = NewNode(op, graph()->start()); |
| 40 function_closure_.set(node); | 41 function_closure_.set(node); |
| 41 } | 42 } |
| (...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2431 | 2432 |
| 2432 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2433 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
| 2433 IterationStatement* stmt) { | 2434 IterationStatement* stmt) { |
| 2434 if (loop_assignment_analysis_ == NULL) return NULL; | 2435 if (loop_assignment_analysis_ == NULL) return NULL; |
| 2435 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2436 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
| 2436 } | 2437 } |
| 2437 | 2438 |
| 2438 } // namespace compiler | 2439 } // namespace compiler |
| 2439 } // namespace internal | 2440 } // namespace internal |
| 2440 } // namespace v8 | 2441 } // namespace v8 |
| OLD | NEW |