| 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 22 matching lines...) Expand all Loading... |
| 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 }; | 39 }; |
| 40 | 40 |
| 41 | 41 |
| 42 // Class to incapsulate the construction and manipulation of the flow graph. | 42 // Class to incapsulate the construction and manipulation of the flow graph. |
| 43 class FlowGraph: public ZoneAllocated { | 43 class FlowGraph : public ZoneAllocated { |
| 44 public: | 44 public: |
| 45 FlowGraph(const FlowGraphBuilder& builder, GraphEntryInstr* graph_entry); | 45 FlowGraph(const FlowGraphBuilder& builder, GraphEntryInstr* graph_entry); |
| 46 | 46 |
| 47 // Function properties. | 47 // Function properties. |
| 48 const ParsedFunction& parsed_function() const { | 48 const ParsedFunction& parsed_function() const { |
| 49 return parsed_function_; | 49 return parsed_function_; |
| 50 } | 50 } |
| 51 intptr_t parameter_count() const { | 51 intptr_t parameter_count() const { |
| 52 return num_copied_params_ + num_non_copied_params_; | 52 return num_copied_params_ + num_non_copied_params_; |
| 53 } | 53 } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 GraphEntryInstr* graph_entry_; | 160 GraphEntryInstr* graph_entry_; |
| 161 GrowableArray<BlockEntryInstr*> preorder_; | 161 GrowableArray<BlockEntryInstr*> preorder_; |
| 162 GrowableArray<BlockEntryInstr*> postorder_; | 162 GrowableArray<BlockEntryInstr*> postorder_; |
| 163 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 163 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 164 ZoneGrowableArray<ReturnInstr*>* exits_; | 164 ZoneGrowableArray<ReturnInstr*>* exits_; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace dart | 167 } // namespace dart |
| 168 | 168 |
| 169 #endif // VM_FLOW_GRAPH_H_ | 169 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |