| 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/js-inlining.h" | 5 #include "src/compiler/js-inlining.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/compiler/all-nodes.h" | 10 #include "src/compiler/all-nodes.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 info_->shared_info()->DebugName()->ToCString().get()); | 344 info_->shared_info()->DebugName()->ToCString().get()); |
| 345 return NoChange(); | 345 return NoChange(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 TRACE("Inlining %s into %s\n", | 348 TRACE("Inlining %s into %s\n", |
| 349 function->shared()->DebugName()->ToCString().get(), | 349 function->shared()->DebugName()->ToCString().get(), |
| 350 info_->shared_info()->DebugName()->ToCString().get()); | 350 info_->shared_info()->DebugName()->ToCString().get()); |
| 351 | 351 |
| 352 Graph graph(info.zone()); | 352 Graph graph(info.zone()); |
| 353 JSGraph jsgraph(info.isolate(), &graph, jsgraph_->common(), | 353 JSGraph jsgraph(info.isolate(), &graph, jsgraph_->common(), |
| 354 jsgraph_->javascript(), jsgraph_->machine()); | 354 jsgraph_->javascript(), jsgraph_->simplified(), |
| 355 jsgraph_->machine()); |
| 355 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); | 356 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); |
| 356 graph_builder.CreateGraph(false); | 357 graph_builder.CreateGraph(false); |
| 357 | 358 |
| 358 // TODO(mstarzinger): Unify this with the Pipeline once JSInliner refactoring | 359 // TODO(mstarzinger): Unify this with the Pipeline once JSInliner refactoring |
| 359 // starts. | 360 // starts. |
| 360 if (info.is_native_context_specializing()) { | 361 if (info.is_native_context_specializing()) { |
| 361 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead()); | 362 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead()); |
| 362 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph, | 363 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph, |
| 363 jsgraph.common()); | 364 jsgraph.common()); |
| 364 CommonOperatorReducer common_reducer(&graph_reducer, &graph, | 365 CommonOperatorReducer common_reducer(&graph_reducer, &graph, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 404 |
| 404 // Remember that we inlined this function. | 405 // Remember that we inlined this function. |
| 405 info_->AddInlinedFunction(info.shared_info()); | 406 info_->AddInlinedFunction(info.shared_info()); |
| 406 | 407 |
| 407 return InlineCall(node, context, frame_state, start, end); | 408 return InlineCall(node, context, frame_state, start, end); |
| 408 } | 409 } |
| 409 | 410 |
| 410 } // namespace compiler | 411 } // namespace compiler |
| 411 } // namespace internal | 412 } // namespace internal |
| 412 } // namespace v8 | 413 } // namespace v8 |
| OLD | NEW |