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