| 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/ast.h" | |
| 6 #include "src/ast-numbering.h" | |
| 7 #include "src/compiler/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/ast-graph-builder.h" | 6 #include "src/compiler/ast-graph-builder.h" |
| 9 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
| 11 #include "src/compiler/graph-inl.h" | 9 #include "src/compiler/graph-inl.h" |
| 12 #include "src/compiler/graph-visualizer.h" | 10 #include "src/compiler/graph-visualizer.h" |
| 13 #include "src/compiler/js-inlining.h" | 11 #include "src/compiler/js-inlining.h" |
| 14 #include "src/compiler/js-intrinsic-builder.h" | 12 #include "src/compiler/js-intrinsic-builder.h" |
| 15 #include "src/compiler/js-operator.h" | 13 #include "src/compiler/js-operator.h" |
| 16 #include "src/compiler/node-aux-data-inl.h" | 14 #include "src/compiler/node-aux-data-inl.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 jsgraph_->graph()->VisitNodeInputsFromEnd(&visitor); | 56 jsgraph_->graph()->VisitNodeInputsFromEnd(&visitor); |
| 59 } | 57 } |
| 60 | 58 |
| 61 | 59 |
| 62 // TODO(sigurds) Find a home for this function and reuse it everywhere (esp. in | 60 // TODO(sigurds) Find a home for this function and reuse it everywhere (esp. in |
| 63 // test cases, where similar code is currently duplicated). | 61 // test cases, where similar code is currently duplicated). |
| 64 static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) { | 62 static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) { |
| 65 CHECK(Parser::Parse(info)); | 63 CHECK(Parser::Parse(info)); |
| 66 CHECK(Rewriter::Rewrite(info)); | 64 CHECK(Rewriter::Rewrite(info)); |
| 67 CHECK(Scope::Analyze(info)); | 65 CHECK(Scope::Analyze(info)); |
| 68 CHECK(AstNumbering::Renumber(info->function(), info->zone())); | |
| 69 CHECK(Compiler::EnsureDeoptimizationSupport(info)); | 66 CHECK(Compiler::EnsureDeoptimizationSupport(info)); |
| 70 } | 67 } |
| 71 | 68 |
| 72 | 69 |
| 73 // A facade on a JSFunction's graph to facilitate inlining. It assumes the | 70 // A facade on a JSFunction's graph to facilitate inlining. It assumes the |
| 74 // that the function graph has only one return statement, and provides | 71 // that the function graph has only one return statement, and provides |
| 75 // {UnifyReturn} to convert a function graph to that end. | 72 // {UnifyReturn} to convert a function graph to that end. |
| 76 class Inlinee { | 73 class Inlinee { |
| 77 public: | 74 public: |
| 78 Inlinee(Node* start, Node* end) : start_(start), end_(end) {} | 75 Inlinee(Node* start, Node* end) : start_(start), end_(end) {} |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 info_->shared_info()->DebugName()->ToCString().get()); | 495 info_->shared_info()->DebugName()->ToCString().get()); |
| 499 } | 496 } |
| 500 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); | 497 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); |
| 501 call_node->RemoveAllInputs(); | 498 call_node->RemoveAllInputs(); |
| 502 DCHECK_EQ(0, call_node->UseCount()); | 499 DCHECK_EQ(0, call_node->UseCount()); |
| 503 } | 500 } |
| 504 } | 501 } |
| 505 } | 502 } |
| 506 } | 503 } |
| 507 } // namespace v8::internal::compiler | 504 } // namespace v8::internal::compiler |
| OLD | NEW |