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 "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 intptr_t loop_depth() const { return loop_depth_; } | 171 intptr_t loop_depth() const { return loop_depth_; } |
172 | 172 |
173 // Manage the currently active try index. | 173 // Manage the currently active try index. |
174 void set_try_index(intptr_t value) { try_index_ = value; } | 174 void set_try_index(intptr_t value) { try_index_ = value; } |
175 intptr_t try_index() const { return try_index_; } | 175 intptr_t try_index() const { return try_index_; } |
176 | 176 |
177 // Manage the currently active catch-handler try index. | 177 // Manage the currently active catch-handler try index. |
178 void set_catch_try_index(intptr_t value) { catch_try_index_ = value; } | 178 void set_catch_try_index(intptr_t value) { catch_try_index_ = value; } |
179 intptr_t catch_try_index() const { return catch_try_index_; } | 179 intptr_t catch_try_index() const { return catch_try_index_; } |
180 | 180 |
181 intptr_t next_await_counter() { return jump_cnt_++; } | 181 intptr_t next_await_counter() { return jump_count_++; } |
182 | 182 |
183 ZoneGrowableArray<intptr_t>* await_levels() const { return await_levels_; } | 183 ZoneGrowableArray<intptr_t>* await_levels() const { return await_levels_; } |
184 ZoneGrowableArray<JoinEntryInstr*>* await_joins() const { | 184 ZoneGrowableArray<JoinEntryInstr*>* await_joins() const { |
185 return await_joins_; | 185 return await_joins_; |
186 } | 186 } |
187 | 187 |
188 void AddCatchEntry(CatchBlockEntryInstr* entry); | 188 void AddCatchEntry(CatchBlockEntryInstr* entry); |
189 | 189 |
190 intptr_t num_copied_params() const { | 190 intptr_t num_copied_params() const { |
191 return num_copied_params_; | 191 return num_copied_params_; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // Outgoing argument stack height. | 261 // Outgoing argument stack height. |
262 intptr_t args_pushed_; | 262 intptr_t args_pushed_; |
263 | 263 |
264 // A stack of enclosing nested statements. | 264 // A stack of enclosing nested statements. |
265 NestedStatement* nesting_stack_; | 265 NestedStatement* nesting_stack_; |
266 | 266 |
267 // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling | 267 // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling |
268 // for OSR. | 268 // for OSR. |
269 const intptr_t osr_id_; | 269 const intptr_t osr_id_; |
270 | 270 |
271 intptr_t jump_cnt_; | 271 intptr_t jump_count_; |
272 ZoneGrowableArray<JoinEntryInstr*>* await_joins_; | 272 ZoneGrowableArray<JoinEntryInstr*>* await_joins_; |
273 ZoneGrowableArray<intptr_t>* await_levels_; | 273 ZoneGrowableArray<intptr_t>* await_levels_; |
274 | 274 |
275 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); | 275 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
276 }; | 276 }; |
277 | 277 |
278 | 278 |
279 // Translate an AstNode to a control-flow graph fragment for its effects | 279 // Translate an AstNode to a control-flow graph fragment for its effects |
280 // (e.g., a statement or an expression in an effect context). Implements a | 280 // (e.g., a statement or an expression in an effect context). Implements a |
281 // function from an AstNode and next temporary index to a graph fragment | 281 // function from an AstNode and next temporary index to a graph fragment |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 // Output parameters. | 598 // Output parameters. |
599 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 599 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
600 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 600 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
601 | 601 |
602 intptr_t condition_token_pos_; | 602 intptr_t condition_token_pos_; |
603 }; | 603 }; |
604 | 604 |
605 } // namespace dart | 605 } // namespace dart |
606 | 606 |
607 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 607 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
OLD | NEW |