| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/block_scheduler.h" | 7 #include "vm/block_scheduler.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1330 InlineExitCollector* exit_collector = | 1330 InlineExitCollector* exit_collector = |
| 1331 new InlineExitCollector(owner_->caller_graph(), call_); | 1331 new InlineExitCollector(owner_->caller_graph(), call_); |
| 1332 | 1332 |
| 1333 ReturnInstr* result = | 1333 ReturnInstr* result = |
| 1334 new ReturnInstr(call_->instance_call()->token_pos(), | 1334 new ReturnInstr(call_->instance_call()->token_pos(), |
| 1335 new Value(last)); | 1335 new Value(last)); |
| 1336 owner_->caller_graph()->AppendTo( | 1336 owner_->caller_graph()->AppendTo( |
| 1337 last, | 1337 last, |
| 1338 result, | 1338 result, |
| 1339 call_->env(), // Return can become deoptimization target. | 1339 call_->env(), // Return can become deoptimization target. |
| 1340 Definition::kEffect); | 1340 FlowGraph::kEffect); |
| 1341 entry->set_last_instruction(result); | 1341 entry->set_last_instruction(result); |
| 1342 exit_collector->AddExit(result); | 1342 exit_collector->AddExit(result); |
| 1343 GraphEntryInstr* graph_entry = | 1343 GraphEntryInstr* graph_entry = |
| 1344 new GraphEntryInstr(NULL, // No parsed function. | 1344 new GraphEntryInstr(NULL, // No parsed function. |
| 1345 entry, | 1345 entry, |
| 1346 Isolate::kNoDeoptId); // No OSR id. | 1346 Isolate::kNoDeoptId); // No OSR id. |
| 1347 // Update polymorphic inliner state. | 1347 // Update polymorphic inliner state. |
| 1348 inlined_entries_.Add(graph_entry); | 1348 inlined_entries_.Add(graph_entry); |
| 1349 exit_collector_->Union(exit_collector); | 1349 exit_collector_->Union(exit_collector); |
| 1350 return true; | 1350 return true; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1675 OS::Print("After Inlining of %s\n", flow_graph_-> | 1675 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1676 parsed_function().function().ToFullyQualifiedCString()); | 1676 parsed_function().function().ToFullyQualifiedCString()); |
| 1677 FlowGraphPrinter printer(*flow_graph_); | 1677 FlowGraphPrinter printer(*flow_graph_); |
| 1678 printer.PrintBlocks(); | 1678 printer.PrintBlocks(); |
| 1679 } | 1679 } |
| 1680 } | 1680 } |
| 1681 } | 1681 } |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 } // namespace dart | 1684 } // namespace dart |
| OLD | NEW |