| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 static_calls_.Clear(); | 207 static_calls_.Clear(); |
| 208 closure_calls_.Clear(); | 208 closure_calls_.Clear(); |
| 209 instance_calls_.Clear(); | 209 instance_calls_.Clear(); |
| 210 skip_static_call_deopt_ids_.Clear(); | 210 skip_static_call_deopt_ids_.Clear(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void FindCallSites(FlowGraph* graph) { | 213 void FindCallSites(FlowGraph* graph) { |
| 214 ASSERT(graph != NULL); | 214 ASSERT(graph != NULL); |
| 215 const Function& function = graph->parsed_function().function(); | 215 const Function& function = graph->parsed_function().function(); |
| 216 ASSERT(function.HasCode()); | 216 ASSERT(function.HasCode()); |
| 217 const Code& code = Code::Handle(function.CurrentCode()); | 217 const Code& code = Code::Handle(function.unoptimized_code()); |
| 218 skip_static_call_deopt_ids_.Clear(); | 218 skip_static_call_deopt_ids_.Clear(); |
| 219 code.ExtractUncalledStaticCallDeoptIds(&skip_static_call_deopt_ids_); | 219 code.ExtractUncalledStaticCallDeoptIds(&skip_static_call_deopt_ids_); |
| 220 for (BlockIterator block_it = graph->postorder_iterator(); | 220 for (BlockIterator block_it = graph->postorder_iterator(); |
| 221 !block_it.Done(); | 221 !block_it.Done(); |
| 222 block_it.Advance()) { | 222 block_it.Advance()) { |
| 223 for (ForwardInstructionIterator it(block_it.Current()); | 223 for (ForwardInstructionIterator it(block_it.Current()); |
| 224 !it.Done(); | 224 !it.Done(); |
| 225 it.Advance()) { | 225 it.Advance()) { |
| 226 it.Current()->Accept(this); | 226 it.Current()->Accept(this); |
| 227 } | 227 } |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 OS::Print("After Inlining of %s\n", flow_graph_-> | 800 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 801 parsed_function().function().ToFullyQualifiedCString()); | 801 parsed_function().function().ToFullyQualifiedCString()); |
| 802 FlowGraphPrinter printer(*flow_graph_); | 802 FlowGraphPrinter printer(*flow_graph_); |
| 803 printer.PrintBlocks(); | 803 printer.PrintBlocks(); |
| 804 } | 804 } |
| 805 } | 805 } |
| 806 } | 806 } |
| 807 } | 807 } |
| 808 | 808 |
| 809 } // namespace dart | 809 } // namespace dart |
| OLD | NEW |