| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const Array& ic_data_array() const { return ic_data_array_; } | 113 const Array& ic_data_array() const { return ic_data_array_; } |
| 114 | 114 |
| 115 void Bailout(const char* reason); | 115 void Bailout(const char* reason); |
| 116 | 116 |
| 117 intptr_t AllocateBlockId() { return ++last_used_block_id_; } | 117 intptr_t AllocateBlockId() { return ++last_used_block_id_; } |
| 118 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; } | 118 void SetInitialBlockId(intptr_t id) { last_used_block_id_ = id; } |
| 119 | 119 |
| 120 void set_context_level(intptr_t value) { context_level_ = value; } | 120 void set_context_level(intptr_t value) { context_level_ = value; } |
| 121 intptr_t context_level() const { return context_level_; } | 121 intptr_t context_level() const { return context_level_; } |
| 122 | 122 |
| 123 void IncrementLoopDepth() { ++loop_depth_; } |
| 124 void DecrementLoopDepth() { --loop_depth_; } |
| 125 intptr_t loop_depth() const { return loop_depth_; } |
| 126 |
| 123 // Each try in this function gets its own try index. | 127 // Each try in this function gets its own try index. |
| 124 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } | 128 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } |
| 125 | 129 |
| 126 // Manage the currently active try index. | 130 // Manage the currently active try index. |
| 127 void set_try_index(intptr_t value) { try_index_ = value; } | 131 void set_try_index(intptr_t value) { try_index_ = value; } |
| 128 intptr_t try_index() const { return try_index_; } | 132 intptr_t try_index() const { return try_index_; } |
| 129 | 133 |
| 130 void AddCatchEntry(CatchBlockEntryInstr* entry); | 134 void AddCatchEntry(CatchBlockEntryInstr* entry); |
| 131 | 135 |
| 132 intptr_t num_copied_params() const { | 136 intptr_t num_copied_params() const { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 162 | 166 |
| 163 const intptr_t num_copied_params_; | 167 const intptr_t num_copied_params_; |
| 164 const intptr_t num_non_copied_params_; | 168 const intptr_t num_non_copied_params_; |
| 165 const intptr_t num_stack_locals_; // Does not include any parameters. | 169 const intptr_t num_stack_locals_; // Does not include any parameters. |
| 166 InlineExitCollector* const exit_collector_; | 170 InlineExitCollector* const exit_collector_; |
| 167 | 171 |
| 168 intptr_t last_used_block_id_; | 172 intptr_t last_used_block_id_; |
| 169 intptr_t context_level_; | 173 intptr_t context_level_; |
| 170 intptr_t last_used_try_index_; | 174 intptr_t last_used_try_index_; |
| 171 intptr_t try_index_; | 175 intptr_t try_index_; |
| 176 intptr_t loop_depth_; |
| 172 GraphEntryInstr* graph_entry_; | 177 GraphEntryInstr* graph_entry_; |
| 173 | 178 |
| 174 // Outgoing argument stack height. | 179 // Outgoing argument stack height. |
| 175 intptr_t args_pushed_; | 180 intptr_t args_pushed_; |
| 176 | 181 |
| 177 // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling | 182 // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling |
| 178 // for OSR. | 183 // for OSR. |
| 179 const intptr_t osr_id_; | 184 const intptr_t osr_id_; |
| 180 | 185 |
| 181 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); | 186 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 // Output parameters. | 517 // Output parameters. |
| 513 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 518 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 514 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 519 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 515 | 520 |
| 516 intptr_t condition_token_pos_; | 521 intptr_t condition_token_pos_; |
| 517 }; | 522 }; |
| 518 | 523 |
| 519 } // namespace dart | 524 } // namespace dart |
| 520 | 525 |
| 521 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 526 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |