| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 Value* BuildObjectAllocation(ConstructorCallNode* node); | 216 Value* BuildObjectAllocation(ConstructorCallNode* node); |
| 217 void BuildConstructorCall(ConstructorCallNode* node, | 217 void BuildConstructorCall(ConstructorCallNode* node, |
| 218 PushArgumentInstr* alloc_value); | 218 PushArgumentInstr* alloc_value); |
| 219 | 219 |
| 220 void BuildStoreContext(const LocalVariable& variable); | 220 void BuildStoreContext(const LocalVariable& variable); |
| 221 void BuildLoadContext(const LocalVariable& variable); | 221 void BuildLoadContext(const LocalVariable& variable); |
| 222 | 222 |
| 223 void BuildThrowNode(ThrowNode* node); | 223 void BuildThrowNode(ThrowNode* node); |
| 224 | 224 |
| 225 void BuildStaticSetter(StaticSetterNode* node, bool result_is_needed); |
| 226 |
| 225 ClosureCallComp* BuildClosureCall(ClosureCallNode* node); | 227 ClosureCallComp* BuildClosureCall(ClosureCallNode* node); |
| 226 | 228 |
| 227 Value* BuildNullValue(); | 229 Value* BuildNullValue(); |
| 228 | 230 |
| 229 private: | 231 private: |
| 230 // Specify a computation as the final result. Adds a Do instruction to | 232 // Specify a computation as the final result. Adds a Do instruction to |
| 231 // the graph, but normally overridden in subclasses. | 233 // the graph, but normally overridden in subclasses. |
| 232 virtual void ReturnComputation(Computation* computation) { | 234 virtual void ReturnComputation(Computation* computation) { |
| 233 Do(computation); | 235 Do(computation); |
| 234 } | 236 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 virtual void VisitAssignableNode(AssignableNode* node); | 268 virtual void VisitAssignableNode(AssignableNode* node); |
| 267 virtual void VisitConstructorCallNode(ConstructorCallNode* node); | 269 virtual void VisitConstructorCallNode(ConstructorCallNode* node); |
| 268 virtual void VisitBinaryOpNode(BinaryOpNode* node); | 270 virtual void VisitBinaryOpNode(BinaryOpNode* node); |
| 269 virtual void VisitConditionalExprNode(ConditionalExprNode* node); | 271 virtual void VisitConditionalExprNode(ConditionalExprNode* node); |
| 270 virtual void VisitLoadLocalNode(LoadLocalNode* node); | 272 virtual void VisitLoadLocalNode(LoadLocalNode* node); |
| 271 virtual void VisitStoreIndexedNode(StoreIndexedNode* node); | 273 virtual void VisitStoreIndexedNode(StoreIndexedNode* node); |
| 272 virtual void VisitStoreInstanceFieldNode(StoreInstanceFieldNode* node); | 274 virtual void VisitStoreInstanceFieldNode(StoreInstanceFieldNode* node); |
| 273 virtual void VisitInstanceSetterNode(InstanceSetterNode* node); | 275 virtual void VisitInstanceSetterNode(InstanceSetterNode* node); |
| 274 virtual void VisitThrowNode(ThrowNode* node); | 276 virtual void VisitThrowNode(ThrowNode* node); |
| 275 virtual void VisitClosureCallNode(ClosureCallNode* node); | 277 virtual void VisitClosureCallNode(ClosureCallNode* node); |
| 278 virtual void VisitStaticSetterNode(StaticSetterNode* node); |
| 276 | 279 |
| 277 Value* value() const { return value_; } | 280 Value* value() const { return value_; } |
| 278 | 281 |
| 279 protected: | 282 protected: |
| 280 // Output parameters. | 283 // Output parameters. |
| 281 Value* value_; | 284 Value* value_; |
| 282 | 285 |
| 283 private: | 286 private: |
| 284 // Helper to set the output state to return a Value. | 287 // Helper to set the output state to return a Value. |
| 285 virtual void ReturnValue(Value* value) { | 288 virtual void ReturnValue(Value* value) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 // Output parameters. | 355 // Output parameters. |
| 353 TargetEntryInstr** true_successor_address_; | 356 TargetEntryInstr** true_successor_address_; |
| 354 TargetEntryInstr** false_successor_address_; | 357 TargetEntryInstr** false_successor_address_; |
| 355 | 358 |
| 356 intptr_t condition_token_pos_; | 359 intptr_t condition_token_pos_; |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 } // namespace dart | 362 } // namespace dart |
| 360 | 363 |
| 361 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 364 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |