| 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 16 matching lines...) Expand all Loading... |
| 27 kEffectContext, | 27 kEffectContext, |
| 28 kTestContext | 28 kTestContext |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 FlowGraph* BuildGraph(InliningContext context); | 31 FlowGraph* BuildGraph(InliningContext context); |
| 32 | 32 |
| 33 const ParsedFunction& parsed_function() const { return parsed_function_; } | 33 const ParsedFunction& parsed_function() const { return parsed_function_; } |
| 34 | 34 |
| 35 void Bailout(const char* reason); | 35 void Bailout(const char* reason); |
| 36 | 36 |
| 37 intptr_t AllocateBlockId() { return ++last_used_block_id_; } |
| 38 |
| 37 void set_context_level(intptr_t value) { context_level_ = value; } | 39 void set_context_level(intptr_t value) { context_level_ = value; } |
| 38 intptr_t context_level() const { return context_level_; } | 40 intptr_t context_level() const { return context_level_; } |
| 39 | 41 |
| 40 // Each try in this function gets its own try index. | 42 // Each try in this function gets its own try index. |
| 41 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } | 43 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } |
| 42 | 44 |
| 43 // Manage the currently active try index. | 45 // Manage the currently active try index. |
| 44 void set_try_index(intptr_t value) { try_index_ = value; } | 46 void set_try_index(intptr_t value) { try_index_ = value; } |
| 45 intptr_t try_index() const { return try_index_; } | 47 intptr_t try_index() const { return try_index_; } |
| 46 | 48 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 71 intptr_t variable_count() const { | 73 intptr_t variable_count() const { |
| 72 return parameter_count() + num_stack_locals_; | 74 return parameter_count() + num_stack_locals_; |
| 73 } | 75 } |
| 74 | 76 |
| 75 const ParsedFunction& parsed_function_; | 77 const ParsedFunction& parsed_function_; |
| 76 | 78 |
| 77 const intptr_t num_copied_params_; | 79 const intptr_t num_copied_params_; |
| 78 const intptr_t num_non_copied_params_; | 80 const intptr_t num_non_copied_params_; |
| 79 const intptr_t num_stack_locals_; // Does not include any parameters. | 81 const intptr_t num_stack_locals_; // Does not include any parameters. |
| 80 | 82 |
| 83 intptr_t last_used_block_id_; |
| 81 intptr_t context_level_; | 84 intptr_t context_level_; |
| 82 intptr_t last_used_try_index_; | 85 intptr_t last_used_try_index_; |
| 83 intptr_t try_index_; | 86 intptr_t try_index_; |
| 84 GraphEntryInstr* graph_entry_; | 87 GraphEntryInstr* graph_entry_; |
| 85 InliningContext inlining_context_; | 88 InliningContext inlining_context_; |
| 86 ZoneGrowableArray<ReturnInstr*>* exits_; | 89 ZoneGrowableArray<ReturnInstr*>* exits_; |
| 87 | 90 |
| 88 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); | 91 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
| 89 }; | 92 }; |
| 90 | 93 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // Output parameters. | 391 // Output parameters. |
| 389 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 392 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 390 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 393 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 391 | 394 |
| 392 intptr_t condition_token_pos_; | 395 intptr_t condition_token_pos_; |
| 393 }; | 396 }; |
| 394 | 397 |
| 395 } // namespace dart | 398 } // namespace dart |
| 396 | 399 |
| 397 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 400 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |