| 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 #ifndef VM_FLOW_GRAPH_H_ | 5 #ifndef VM_FLOW_GRAPH_H_ |
| 6 #define VM_FLOW_GRAPH_H_ | 6 #define VM_FLOW_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/parser.h" | 9 #include "vm/parser.h" |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 } | 99 } |
| 100 | 100 |
| 101 ZoneGrowableArray<ReturnInstr*>* exits() const { return exits_; } | 101 ZoneGrowableArray<ReturnInstr*>* exits() const { return exits_; } |
| 102 void set_exits(ZoneGrowableArray<ReturnInstr*>* exits) { exits_ = exits; } | 102 void set_exits(ZoneGrowableArray<ReturnInstr*>* exits) { exits_ = exits; } |
| 103 | 103 |
| 104 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } | 104 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } |
| 105 | 105 |
| 106 intptr_t InstructionCount() const; | 106 intptr_t InstructionCount() const; |
| 107 | 107 |
| 108 ConstantInstr* AddConstantToInitialDefinitions(const Object& object); | 108 ConstantInstr* AddConstantToInitialDefinitions(const Object& object); |
| 109 void AddToInitialDefinitions(Definition* defn); |
| 109 | 110 |
| 110 // Operations on the flow graph. | 111 // Operations on the flow graph. |
| 111 void ComputeSSA(intptr_t next_virtual_register_number, | 112 void ComputeSSA(intptr_t next_virtual_register_number, |
| 112 GrowableArray<Definition*>* inlining_parameters); | 113 GrowableArray<Definition*>* inlining_parameters); |
| 113 void ComputeUseLists(); | 114 void ComputeUseLists(); |
| 114 | 115 |
| 115 // Finds natural loops in the flow graph and attaches a list of loop | 116 // Finds natural loops in the flow graph and attaches a list of loop |
| 116 // body blocks for each loop header. | 117 // body blocks for each loop header. |
| 117 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers); | 118 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers); |
| 118 | 119 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 GrowableArray<BlockEntryInstr*> preorder_; | 177 GrowableArray<BlockEntryInstr*> preorder_; |
| 177 GrowableArray<BlockEntryInstr*> postorder_; | 178 GrowableArray<BlockEntryInstr*> postorder_; |
| 178 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 179 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 179 ZoneGrowableArray<ReturnInstr*>* exits_; | 180 ZoneGrowableArray<ReturnInstr*>* exits_; |
| 180 bool invalid_dominator_tree_; | 181 bool invalid_dominator_tree_; |
| 181 }; | 182 }; |
| 182 | 183 |
| 183 } // namespace dart | 184 } // namespace dart |
| 184 | 185 |
| 185 #endif // VM_FLOW_GRAPH_H_ | 186 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |