| 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.h" | 5 #include "vm/flow_graph.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 parsed_function_(*builder.parsed_function()), | 26 parsed_function_(*builder.parsed_function()), |
| 27 num_copied_params_(builder.num_copied_params()), | 27 num_copied_params_(builder.num_copied_params()), |
| 28 num_non_copied_params_(builder.num_non_copied_params()), | 28 num_non_copied_params_(builder.num_non_copied_params()), |
| 29 num_stack_locals_(builder.num_stack_locals()), | 29 num_stack_locals_(builder.num_stack_locals()), |
| 30 graph_entry_(graph_entry), | 30 graph_entry_(graph_entry), |
| 31 preorder_(), | 31 preorder_(), |
| 32 postorder_(), | 32 postorder_(), |
| 33 reverse_postorder_(), | 33 reverse_postorder_(), |
| 34 block_effects_(NULL), | 34 block_effects_(NULL), |
| 35 licm_allowed_(true), | 35 licm_allowed_(true), |
| 36 use_far_branches_(false), |
| 36 loop_headers_(NULL), | 37 loop_headers_(NULL), |
| 37 loop_invariant_loads_(NULL) { | 38 loop_invariant_loads_(NULL) { |
| 38 DiscoverBlocks(); | 39 DiscoverBlocks(); |
| 39 } | 40 } |
| 40 | 41 |
| 41 | 42 |
| 42 ConstantInstr* FlowGraph::GetConstant(const Object& object) { | 43 ConstantInstr* FlowGraph::GetConstant(const Object& object) { |
| 43 // Check if the constant is already in the pool. | 44 // Check if the constant is already in the pool. |
| 44 GrowableArray<Definition*>* pool = graph_entry_->initial_definitions(); | 45 GrowableArray<Definition*>* pool = graph_entry_->initial_definitions(); |
| 45 for (intptr_t i = 0; i < pool->length(); ++i) { | 46 for (intptr_t i = 0; i < pool->length(); ++i) { |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 } | 1144 } |
| 1144 | 1145 |
| 1145 | 1146 |
| 1146 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, | 1147 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, |
| 1147 BlockEntryInstr* to) const { | 1148 BlockEntryInstr* to) const { |
| 1148 return available_at_[to->postorder_number()]->Contains( | 1149 return available_at_[to->postorder_number()]->Contains( |
| 1149 from->postorder_number()); | 1150 from->postorder_number()); |
| 1150 } | 1151 } |
| 1151 | 1152 |
| 1152 } // namespace dart | 1153 } // namespace dart |
| OLD | NEW |