| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 explicit FlowGraphBuilder(const ParsedFunction& parsed_function); | 22 explicit FlowGraphBuilder(const ParsedFunction& parsed_function); |
| 23 | 23 |
| 24 enum InliningContext { | 24 enum InliningContext { |
| 25 kNotInlining, | 25 kNotInlining, |
| 26 kValueContext, | 26 kValueContext, |
| 27 kEffectContext, | 27 kEffectContext, |
| 28 kTestContext | 28 kTestContext |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 FlowGraph* BuildGraph(); | 31 FlowGraph* BuildGraph(InliningContext context); |
| 32 FlowGraph* BuildGraphForInlining(InliningContext context); | |
| 33 | 32 |
| 34 const ParsedFunction& parsed_function() const { return parsed_function_; } | 33 const ParsedFunction& parsed_function() const { return parsed_function_; } |
| 35 | 34 |
| 36 void Bailout(const char* reason); | 35 void Bailout(const char* reason); |
| 37 | 36 |
| 38 void set_context_level(intptr_t value) { context_level_ = value; } | 37 void set_context_level(intptr_t value) { context_level_ = value; } |
| 39 intptr_t context_level() const { return context_level_; } | 38 intptr_t context_level() const { return context_level_; } |
| 40 | 39 |
| 41 // Each try in this function gets its own try index. | 40 // Each try in this function gets its own try index. |
| 42 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } | 41 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // Output parameters. | 388 // Output parameters. |
| 390 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 389 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 391 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 390 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 392 | 391 |
| 393 intptr_t condition_token_pos_; | 392 intptr_t condition_token_pos_; |
| 394 }; | 393 }; |
| 395 | 394 |
| 396 } // namespace dart | 395 } // namespace dart |
| 397 | 396 |
| 398 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 397 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |