| 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/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/hash_map.h" | 10 #include "vm/hash_map.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 // Function properties. | 94 // Function properties. |
| 95 ParsedFunction& parsed_function() const { | 95 ParsedFunction& parsed_function() const { |
| 96 return parsed_function_; | 96 return parsed_function_; |
| 97 } | 97 } |
| 98 intptr_t parameter_count() const { | 98 intptr_t parameter_count() const { |
| 99 return num_copied_params_ + num_non_copied_params_; | 99 return num_copied_params_ + num_non_copied_params_; |
| 100 } | 100 } |
| 101 intptr_t variable_count() const { | 101 intptr_t variable_count() const { |
| 102 return parameter_count() + num_stack_locals_; | 102 return parameter_count() + num_stack_locals(); |
| 103 } | 103 } |
| 104 intptr_t num_stack_locals() const { | 104 intptr_t num_stack_locals() const { |
| 105 return num_stack_locals_; | 105 return parsed_function().num_stack_locals(); |
| 106 } | 106 } |
| 107 intptr_t num_copied_params() const { | 107 intptr_t num_copied_params() const { |
| 108 return num_copied_params_; | 108 return num_copied_params_; |
| 109 } | 109 } |
| 110 intptr_t num_non_copied_params() const { | 110 intptr_t num_non_copied_params() const { |
| 111 return num_non_copied_params_; | 111 return num_non_copied_params_; |
| 112 } | 112 } |
| 113 | 113 |
| 114 LocalVariable* CurrentContextVar() const { | 114 LocalVariable* CurrentContextVar() const { |
| 115 return parsed_function().current_context_var(); | 115 return parsed_function().current_context_var(); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 GrowableArray<BitVector*> assigned_vars_; | 332 GrowableArray<BitVector*> assigned_vars_; |
| 333 | 333 |
| 334 intptr_t current_ssa_temp_index_; | 334 intptr_t current_ssa_temp_index_; |
| 335 intptr_t max_block_id_; | 335 intptr_t max_block_id_; |
| 336 | 336 |
| 337 // Flow graph fields. | 337 // Flow graph fields. |
| 338 const FlowGraphBuilder& builder_; | 338 const FlowGraphBuilder& builder_; |
| 339 ParsedFunction& parsed_function_; | 339 ParsedFunction& parsed_function_; |
| 340 const intptr_t num_copied_params_; | 340 const intptr_t num_copied_params_; |
| 341 const intptr_t num_non_copied_params_; | 341 const intptr_t num_non_copied_params_; |
| 342 const intptr_t num_stack_locals_; | |
| 343 GraphEntryInstr* graph_entry_; | 342 GraphEntryInstr* graph_entry_; |
| 344 GrowableArray<BlockEntryInstr*> preorder_; | 343 GrowableArray<BlockEntryInstr*> preorder_; |
| 345 GrowableArray<BlockEntryInstr*> postorder_; | 344 GrowableArray<BlockEntryInstr*> postorder_; |
| 346 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 345 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 347 GrowableArray<BlockEntryInstr*> optimized_block_order_; | 346 GrowableArray<BlockEntryInstr*> optimized_block_order_; |
| 348 ConstantInstr* constant_null_; | 347 ConstantInstr* constant_null_; |
| 349 ConstantInstr* constant_dead_; | 348 ConstantInstr* constant_dead_; |
| 350 ConstantInstr* constant_empty_context_; | 349 ConstantInstr* constant_empty_context_; |
| 351 | 350 |
| 352 BlockEffects* block_effects_; | 351 BlockEffects* block_effects_; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 505 |
| 507 private: | 506 private: |
| 508 GrowableArray<Definition*> defs_; | 507 GrowableArray<Definition*> defs_; |
| 509 BitVector* contains_vector_; | 508 BitVector* contains_vector_; |
| 510 }; | 509 }; |
| 511 | 510 |
| 512 | 511 |
| 513 } // namespace dart | 512 } // namespace dart |
| 514 | 513 |
| 515 #endif // VM_FLOW_GRAPH_H_ | 514 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |