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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
6 #include "src/compiler/ast-graph-builder.h" | 6 #include "src/compiler/ast-graph-builder.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
9 #include "src/compiler/graph-inl.h" | 9 #include "src/compiler/graph-inl.h" |
10 #include "src/compiler/graph-visualizer.h" | 10 #include "src/compiler/graph-visualizer.h" |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 return; | 403 return; |
404 } | 404 } |
405 | 405 |
406 if (FLAG_trace_turbo_inlining) { | 406 if (FLAG_trace_turbo_inlining) { |
407 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); | 407 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); |
408 PrintF("Inlining %s into %s\n", name.get(), | 408 PrintF("Inlining %s into %s\n", name.get(), |
409 info_->shared_info()->DebugName()->ToCString().get()); | 409 info_->shared_info()->DebugName()->ToCString().get()); |
410 } | 410 } |
411 | 411 |
412 Graph graph(info.zone()); | 412 Graph graph(info.zone()); |
413 Typer typer(info.zone()); | 413 JSGraph jsgraph(&graph, jsgraph_->common(), jsgraph_->javascript(), |
414 JSGraph jsgraph(&graph, jsgraph_->common(), jsgraph_->javascript(), &typer, | |
415 jsgraph_->machine()); | 414 jsgraph_->machine()); |
416 | 415 |
417 AstGraphBuilder graph_builder(&info, &jsgraph); | 416 AstGraphBuilder graph_builder(&info, &jsgraph); |
418 graph_builder.CreateGraph(); | 417 graph_builder.CreateGraph(); |
419 Inlinee::UnifyReturn(&jsgraph); | 418 Inlinee::UnifyReturn(&jsgraph); |
420 | 419 |
421 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); | 420 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); |
422 visitor.CopyGraph(); | 421 visitor.CopyGraph(); |
423 | 422 |
424 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); | 423 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); |
(...skipping 12 matching lines...) Expand all Loading... |
437 AddClosureToFrameState(node, function); | 436 AddClosureToFrameState(node, function); |
438 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); | 437 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); |
439 } | 438 } |
440 } | 439 } |
441 | 440 |
442 inlinee.InlineAtCall(jsgraph_, call_node); | 441 inlinee.InlineAtCall(jsgraph_, call_node); |
443 } | 442 } |
444 } | 443 } |
445 } | 444 } |
446 } // namespace v8::internal::compiler | 445 } // namespace v8::internal::compiler |
OLD | NEW |