| 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_BUILDER_H_ | 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_ |
| 6 #define VM_FLOW_GRAPH_BUILDER_H_ | 6 #define VM_FLOW_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Manage the currently active try index. | 39 // Manage the currently active try index. |
| 40 void set_try_index(intptr_t value) { try_index_ = value; } | 40 void set_try_index(intptr_t value) { try_index_ = value; } |
| 41 intptr_t try_index() const { return try_index_; } | 41 intptr_t try_index() const { return try_index_; } |
| 42 | 42 |
| 43 void AddCatchEntry(TargetEntryInstr* entry); | 43 void AddCatchEntry(TargetEntryInstr* entry); |
| 44 | 44 |
| 45 intptr_t current_ssa_temp_index() const { | 45 intptr_t current_ssa_temp_index() const { |
| 46 return current_ssa_temp_index_; | 46 return current_ssa_temp_index_; |
| 47 } | 47 } |
| 48 | 48 |
| 49 intptr_t alloc_ssa_temp_index() { |
| 50 return current_ssa_temp_index_++; |
| 51 } |
| 52 |
| 49 private: | 53 private: |
| 50 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder, | 54 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder, |
| 51 GrowableArray<intptr_t>* parent, | 55 GrowableArray<intptr_t>* parent, |
| 52 GrowableArray<BitVector*>* dominance_frontier); | 56 GrowableArray<BitVector*>* dominance_frontier); |
| 53 | 57 |
| 54 void CompressPath(intptr_t start_index, | 58 void CompressPath(intptr_t start_index, |
| 55 intptr_t current_index, | 59 intptr_t current_index, |
| 56 GrowableArray<intptr_t>* parent, | 60 GrowableArray<intptr_t>* parent, |
| 57 GrowableArray<intptr_t>* label); | 61 GrowableArray<intptr_t>* label); |
| 58 | 62 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // Output parameters. | 328 // Output parameters. |
| 325 TargetEntryInstr** true_successor_address_; | 329 TargetEntryInstr** true_successor_address_; |
| 326 TargetEntryInstr** false_successor_address_; | 330 TargetEntryInstr** false_successor_address_; |
| 327 | 331 |
| 328 intptr_t condition_token_pos_; | 332 intptr_t condition_token_pos_; |
| 329 }; | 333 }; |
| 330 | 334 |
| 331 } // namespace dart | 335 } // namespace dart |
| 332 | 336 |
| 333 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 337 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |