| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // Moves parent context into the context register. | 151 // Moves parent context into the context register. |
| 152 void UnchainContext(); | 152 void UnchainContext(); |
| 153 | 153 |
| 154 void CloseFragment() { exit_ = NULL; } | 154 void CloseFragment() { exit_ = NULL; } |
| 155 intptr_t AllocateTempIndex() { return temp_index_++; } | 155 intptr_t AllocateTempIndex() { return temp_index_++; } |
| 156 | 156 |
| 157 virtual void CompiletimeStringInterpolation(const Function& interpol_func, | 157 virtual void CompiletimeStringInterpolation(const Function& interpol_func, |
| 158 const Array& literals); | 158 const Array& literals); |
| 159 | 159 |
| 160 TempVal* BuildObjectAllocation(ConstructorCallNode* node, |
| 161 int start_index); |
| 162 void BuildConstructorCall(ConstructorCallNode* node, |
| 163 int start_index, |
| 164 Value* alloc_value); |
| 165 |
| 160 private: | 166 private: |
| 161 // Specify a computation as the final result. Adds a Do instruction to | 167 // Specify a computation as the final result. Adds a Do instruction to |
| 162 // the graph, but normally overridden in subclasses. | 168 // the graph, but normally overridden in subclasses. |
| 163 virtual void ReturnComputation(Computation* computation) { | 169 virtual void ReturnComputation(Computation* computation) { |
| 164 AddInstruction(new DoInstr(computation)); | 170 AddInstruction(new DoInstr(computation)); |
| 165 } | 171 } |
| 166 | 172 |
| 167 // Shared global state. | 173 // Shared global state. |
| 168 FlowGraphBuilder* owner_; | 174 FlowGraphBuilder* owner_; |
| 169 | 175 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 289 } |
| 284 | 290 |
| 285 // Output parameters. | 291 // Output parameters. |
| 286 TargetEntryInstr** true_successor_address_; | 292 TargetEntryInstr** true_successor_address_; |
| 287 TargetEntryInstr** false_successor_address_; | 293 TargetEntryInstr** false_successor_address_; |
| 288 }; | 294 }; |
| 289 | 295 |
| 290 } // namespace dart | 296 } // namespace dart |
| 291 | 297 |
| 292 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 298 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |