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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 intptr_t max_block_id() const { | 94 intptr_t max_block_id() const { |
95 return max_block_id_; | 95 return max_block_id_; |
96 } | 96 } |
97 | 97 |
98 GraphEntryInstr* graph_entry() const { | 98 GraphEntryInstr* graph_entry() const { |
99 return graph_entry_; | 99 return graph_entry_; |
100 } | 100 } |
101 | 101 |
| 102 ConstantInstr* constant_null() const { |
| 103 return constant_null_; |
| 104 } |
| 105 |
102 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } | 106 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } |
103 | 107 |
104 intptr_t InstructionCount() const; | 108 intptr_t InstructionCount() const; |
105 | 109 |
106 ConstantInstr* AddConstantToInitialDefinitions(const Object& object); | 110 ConstantInstr* AddConstantToInitialDefinitions(const Object& object); |
107 void AddToInitialDefinitions(Definition* defn); | 111 void AddToInitialDefinitions(Definition* defn); |
108 | 112 |
109 // Operations on the flow graph. | 113 // Operations on the flow graph. |
110 void ComputeSSA(intptr_t next_virtual_register_number, | 114 void ComputeSSA(intptr_t next_virtual_register_number, |
111 GrowableArray<Definition*>* inlining_parameters); | 115 GrowableArray<Definition*>* inlining_parameters); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // Flow graph fields. | 175 // Flow graph fields. |
172 const ParsedFunction& parsed_function_; | 176 const ParsedFunction& parsed_function_; |
173 const intptr_t num_copied_params_; | 177 const intptr_t num_copied_params_; |
174 const intptr_t num_non_copied_params_; | 178 const intptr_t num_non_copied_params_; |
175 const intptr_t num_stack_locals_; | 179 const intptr_t num_stack_locals_; |
176 GraphEntryInstr* graph_entry_; | 180 GraphEntryInstr* graph_entry_; |
177 GrowableArray<BlockEntryInstr*> preorder_; | 181 GrowableArray<BlockEntryInstr*> preorder_; |
178 GrowableArray<BlockEntryInstr*> postorder_; | 182 GrowableArray<BlockEntryInstr*> postorder_; |
179 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 183 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
180 bool invalid_dominator_tree_; | 184 bool invalid_dominator_tree_; |
| 185 ConstantInstr* constant_null_; |
181 }; | 186 }; |
182 | 187 |
183 } // namespace dart | 188 } // namespace dart |
184 | 189 |
185 #endif // VM_FLOW_GRAPH_H_ | 190 #endif // VM_FLOW_GRAPH_H_ |
OLD | NEW |