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/graph-inl.h" | 10 #include "src/compiler/graph-inl.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 return; | 380 return; |
381 } | 381 } |
382 | 382 |
383 if (FLAG_trace_turbo_inlining) { | 383 if (FLAG_trace_turbo_inlining) { |
384 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); | 384 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); |
385 PrintF("Inlining %s into %s\n", name.get(), | 385 PrintF("Inlining %s into %s\n", name.get(), |
386 info_->shared_info()->DebugName()->ToCString().get()); | 386 info_->shared_info()->DebugName()->ToCString().get()); |
387 } | 387 } |
388 | 388 |
389 Graph graph(info.zone()); | 389 Graph graph(info.zone()); |
390 JSGraph jsgraph(&graph, jsgraph_->common(), jsgraph_->javascript(), | 390 JSGraph jsgraph(info.isolate(), &graph, jsgraph_->common(), |
391 jsgraph_->machine()); | 391 jsgraph_->javascript(), jsgraph_->machine()); |
392 | 392 |
393 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); | 393 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); |
394 graph_builder.CreateGraph(); | 394 graph_builder.CreateGraph(); |
395 Inlinee::UnifyReturn(&jsgraph); | 395 Inlinee::UnifyReturn(&jsgraph); |
396 | 396 |
397 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); | 397 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); |
398 visitor.CopyGraph(); | 398 visitor.CopyGraph(); |
399 | 399 |
400 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); | 400 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); |
401 | 401 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 info_->shared_info()->DebugName()->ToCString().get()); | 478 info_->shared_info()->DebugName()->ToCString().get()); |
479 } | 479 } |
480 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); | 480 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); |
481 call_node->RemoveAllInputs(); | 481 call_node->RemoveAllInputs(); |
482 DCHECK_EQ(0, call_node->UseCount()); | 482 DCHECK_EQ(0, call_node->UseCount()); |
483 } | 483 } |
484 } | 484 } |
485 } | 485 } |
486 } | 486 } |
487 } // namespace v8::internal::compiler | 487 } // namespace v8::internal::compiler |
OLD | NEW |