| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // Append a computation with one use. Assumes this graph is open. | 110 // Append a computation with one use. Assumes this graph is open. |
| 111 UseVal* Bind(Computation* computation); | 111 UseVal* Bind(Computation* computation); |
| 112 // Append a computation with no uses. Assumes this graph is open. | 112 // Append a computation with no uses. Assumes this graph is open. |
| 113 void Do(Computation* computation); | 113 void Do(Computation* computation); |
| 114 // Append a single (non-Definition, non-Entry) instruction. Assumes this | 114 // Append a single (non-Definition, non-Entry) instruction. Assumes this |
| 115 // graph is open. | 115 // graph is open. |
| 116 void AddInstruction(Instruction* instruction); | 116 void AddInstruction(Instruction* instruction); |
| 117 // Append a Goto (unconditional control flow) instruction and close | 117 // Append a Goto (unconditional control flow) instruction and close |
| 118 // the graph fragment. Assumes this graph fragment is open. | 118 // the graph fragment. Assumes this graph fragment is open. |
| 119 void Goto(JoinEntryInstr* join); | 119 void Goto(JoinEntryInstr* join); |
| 120 // Build a computation for a constant value. | |
| 121 MaterializeComp* Constant(const Object& value); | |
| 122 | 120 |
| 123 // Append a 'diamond' branch and join to this graph, depending on which | 121 // Append a 'diamond' branch and join to this graph, depending on which |
| 124 // parts are reachable. Assumes this graph is open. | 122 // parts are reachable. Assumes this graph is open. |
| 125 void Join(const TestGraphVisitor& test_fragment, | 123 void Join(const TestGraphVisitor& test_fragment, |
| 126 const EffectGraphVisitor& true_fragment, | 124 const EffectGraphVisitor& true_fragment, |
| 127 const EffectGraphVisitor& false_fragment); | 125 const EffectGraphVisitor& false_fragment); |
| 128 | 126 |
| 129 // Append a 'while loop' test and back edge to this graph, depending on | 127 // Append a 'while loop' test and back edge to this graph, depending on |
| 130 // which parts are reachable. Afterward, the graph exit is the false | 128 // which parts are reachable. Afterward, the graph exit is the false |
| 131 // successor of the loop condition. | 129 // successor of the loop condition. |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // Output parameters. | 350 // Output parameters. |
| 353 TargetEntryInstr** true_successor_address_; | 351 TargetEntryInstr** true_successor_address_; |
| 354 TargetEntryInstr** false_successor_address_; | 352 TargetEntryInstr** false_successor_address_; |
| 355 | 353 |
| 356 intptr_t condition_token_pos_; | 354 intptr_t condition_token_pos_; |
| 357 }; | 355 }; |
| 358 | 356 |
| 359 } // namespace dart | 357 } // namespace dart |
| 360 | 358 |
| 361 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 359 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |