| 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 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/generic-node-inl.h" | 7 #include "src/compiler/generic-node-inl.h" |
| 8 #include "src/compiler/graph-inl.h" | 8 #include "src/compiler/graph-inl.h" |
| 9 #include "src/compiler/graph-visualizer.h" | 9 #include "src/compiler/graph-visualizer.h" |
| 10 #include "src/compiler/js-inlining.h" | 10 #include "src/compiler/js-inlining.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 if (FLAG_trace_turbo_inlining) { | 305 if (FLAG_trace_turbo_inlining) { |
| 306 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); | 306 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); |
| 307 PrintF("Inlining %s into %s\n", name.get(), | 307 PrintF("Inlining %s into %s\n", name.get(), |
| 308 info_->shared_info()->DebugName()->ToCString().get()); | 308 info_->shared_info()->DebugName()->ToCString().get()); |
| 309 } | 309 } |
| 310 | 310 |
| 311 Graph graph(info_->zone()); | 311 Graph graph(info_->zone()); |
| 312 graph.SetNextNodeId(jsgraph_->graph()->NextNodeID()); | 312 graph.SetNextNodeId(jsgraph_->graph()->NextNodeID()); |
| 313 | 313 |
| 314 Typer typer(info_->zone()); | |
| 315 CommonOperatorBuilder common(info_->zone()); | 314 CommonOperatorBuilder common(info_->zone()); |
| 316 JSGraph jsgraph(&graph, &common, &typer); | 315 JSGraph jsgraph(&graph, &common); |
| 317 | 316 |
| 318 AstGraphBuilder graph_builder(&info, &jsgraph); | 317 AstGraphBuilder graph_builder(&info, &jsgraph); |
| 319 graph_builder.CreateGraph(); | 318 graph_builder.CreateGraph(); |
| 320 | 319 |
| 321 Inlinee inlinee(&jsgraph); | 320 Inlinee inlinee(&jsgraph); |
| 322 inlinee.UnifyReturn(); | 321 inlinee.UnifyReturn(); |
| 323 inlinee.InlineAtCall(jsgraph_, node); | 322 inlinee.InlineAtCall(jsgraph_, node); |
| 324 | 323 |
| 325 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); | 324 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); |
| 326 } | 325 } |
| 327 } | 326 } |
| 328 } | 327 } |
| 329 } // namespace v8::internal::compiler | 328 } // namespace v8::internal::compiler |
| OLD | NEW |