| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // which parts are reachable. Afterward, the graph exit is the false | 82 // which parts are reachable. Afterward, the graph exit is the false |
| 83 // successor of the loop condition. | 83 // successor of the loop condition. |
| 84 void TieLoop(const TestGraphVisitor& test_fragment, | 84 void TieLoop(const TestGraphVisitor& test_fragment, |
| 85 const EffectGraphVisitor& body_fragment); | 85 const EffectGraphVisitor& body_fragment); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 // Implement the core part of the translation of expression node types. | 88 // Implement the core part of the translation of expression node types. |
| 89 AssertAssignableComp* TranslateAssignable(const AssignableNode& node); | 89 AssertAssignableComp* TranslateAssignable(const AssignableNode& node); |
| 90 InstanceCallComp* TranslateBinaryOp(const BinaryOpNode& node); | 90 InstanceCallComp* TranslateBinaryOp(const BinaryOpNode& node); |
| 91 InstanceCallComp* TranslateUnaryOp(const UnaryOpNode& node); | 91 InstanceCallComp* TranslateUnaryOp(const UnaryOpNode& node); |
| 92 InstanceCallComp* TranslateComparison(const ComparisonNode& node); | 92 Computation* TranslateComparison(const ComparisonNode& node); |
| 93 StoreLocalComp* TranslateStoreLocal(const StoreLocalNode& node); | 93 StoreLocalComp* TranslateStoreLocal(const StoreLocalNode& node); |
| 94 StaticCallComp* TranslateStaticCall(const StaticCallNode& node); | 94 StaticCallComp* TranslateStaticCall(const StaticCallNode& node); |
| 95 InstanceCallComp* TranslateInstanceCall(const InstanceCallNode& node); |
| 95 | 96 |
| 96 void CloseFragment() { exit_ = NULL; } | 97 void CloseFragment() { exit_ = NULL; } |
| 97 intptr_t AllocateTempIndex() { return temp_index_++; } | 98 intptr_t AllocateTempIndex() { return temp_index_++; } |
| 98 | 99 |
| 99 private: | 100 private: |
| 100 // Helper to append a Do instruction to the graph. | 101 // Helper to append a Do instruction to the graph. |
| 101 void DoComputation(Computation* computation) { | 102 void DoComputation(Computation* computation) { |
| 102 AddInstruction(new DoInstr(computation)); | 103 AddInstruction(new DoInstr(computation)); |
| 103 } | 104 } |
| 104 | 105 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 TargetEntryInstr** true_successor_address_; | 206 TargetEntryInstr** true_successor_address_; |
| 206 TargetEntryInstr** false_successor_address_; | 207 TargetEntryInstr** false_successor_address_; |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 #undef DEFINE_VISIT | 210 #undef DEFINE_VISIT |
| 210 | 211 |
| 211 | 212 |
| 212 } // namespace dart | 213 } // namespace dart |
| 213 | 214 |
| 214 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 215 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |