| 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 #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/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 current_++; | 29 current_++; |
| 30 } | 30 } |
| 31 | 31 |
| 32 bool Done() const { return current_ >= block_order_.length(); } | 32 bool Done() const { return current_ >= block_order_.length(); } |
| 33 | 33 |
| 34 BlockEntryInstr* Current() const { return block_order_[current_]; } | 34 BlockEntryInstr* Current() const { return block_order_[current_]; } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 const GrowableArray<BlockEntryInstr*>& block_order_; | 37 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 38 intptr_t current_; | 38 intptr_t current_; |
| 39 |
| 40 // Disallow operator=. Use public copy constructor for copying instead. |
| 41 BlockIterator& operator=(const BlockIterator& other); |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 | 44 |
| 42 // Class to incapsulate the construction and manipulation of the flow graph. | 45 // Class to incapsulate the construction and manipulation of the flow graph. |
| 43 class FlowGraph : public ZoneAllocated { | 46 class FlowGraph : public ZoneAllocated { |
| 44 public: | 47 public: |
| 45 FlowGraph(const FlowGraphBuilder& builder, | 48 FlowGraph(const FlowGraphBuilder& builder, |
| 46 GraphEntryInstr* graph_entry, | 49 GraphEntryInstr* graph_entry, |
| 47 intptr_t max_block_id); | 50 intptr_t max_block_id); |
| 48 | 51 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 GrowableArray<BlockEntryInstr*> preorder_; | 192 GrowableArray<BlockEntryInstr*> preorder_; |
| 190 GrowableArray<BlockEntryInstr*> postorder_; | 193 GrowableArray<BlockEntryInstr*> postorder_; |
| 191 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 194 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 192 bool invalid_dominator_tree_; | 195 bool invalid_dominator_tree_; |
| 193 ConstantInstr* constant_null_; | 196 ConstantInstr* constant_null_; |
| 194 }; | 197 }; |
| 195 | 198 |
| 196 } // namespace dart | 199 } // namespace dart |
| 197 | 200 |
| 198 #endif // VM_FLOW_GRAPH_H_ | 201 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |