| 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 | 39 |
| 40 // An class to collect the exits from an inlined function during graph | 40 // An class to collect the exits from an inlined function during graph |
| 41 // construction so they can be plugged into the caller's flow graph. | 41 // construction so they can be plugged into the caller's flow graph. |
| 42 class InlineExitCollector: public ZoneAllocated { | 42 class InlineExitCollector: public ZoneAllocated { |
| 43 public: | 43 public: |
| 44 InlineExitCollector(FlowGraph* caller_graph, Definition* call) | 44 InlineExitCollector(FlowGraph* caller_graph, Definition* call) |
| 45 : caller_graph_(caller_graph), call_(call), exits_(4) { } | 45 : caller_graph_(caller_graph), call_(call), exits_(4) { } |
| 46 | 46 |
| 47 void AddExit(ReturnInstr* exit); | 47 void AddExit(ReturnInstr* exit); |
| 48 | 48 |
| 49 void Union(const InlineExitCollector* other); |
| 50 |
| 49 // Before replacing a call with a graph, the outer environment needs to be | 51 // Before replacing a call with a graph, the outer environment needs to be |
| 50 // attached to each instruction in the callee graph and the caller graph | 52 // attached to each instruction in the callee graph and the caller graph |
| 51 // needs to have its block and instruction ID state updated. | 53 // needs to have its block and instruction ID state updated. |
| 52 void PrepareGraphs(FlowGraph* callee_graph); | 54 void PrepareGraphs(FlowGraph* callee_graph); |
| 53 | 55 |
| 54 // Inline a graph at a call site. | 56 // Inline a graph at a call site. |
| 55 // | 57 // |
| 56 // Assumes the callee is in SSA with a correct dominator tree and use | 58 // Assumes the callee is in SSA with a correct dominator tree and use |
| 57 // lists. | 59 // lists. |
| 58 // | 60 // |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 // Output parameters. | 481 // Output parameters. |
| 480 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 482 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 481 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 483 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 482 | 484 |
| 483 intptr_t condition_token_pos_; | 485 intptr_t condition_token_pos_; |
| 484 }; | 486 }; |
| 485 | 487 |
| 486 } // namespace dart | 488 } // namespace dart |
| 487 | 489 |
| 488 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 490 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |