| 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_OPTIMIZER_H_ | 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_ |
| 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ | 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void ApplyICData(); | 23 void ApplyICData(); |
| 24 | 24 |
| 25 void OptimizeComputations(); | 25 void OptimizeComputations(); |
| 26 | 26 |
| 27 virtual void VisitStaticCall(StaticCallComp* comp, BindInstr* instr); | 27 virtual void VisitStaticCall(StaticCallComp* comp, BindInstr* instr); |
| 28 virtual void VisitInstanceCall(InstanceCallComp* comp, BindInstr* instr); | 28 virtual void VisitInstanceCall(InstanceCallComp* comp, BindInstr* instr); |
| 29 virtual void VisitRelationalOp(RelationalOpComp* comp, BindInstr* instr); | 29 virtual void VisitRelationalOp(RelationalOpComp* comp, BindInstr* instr); |
| 30 virtual void VisitEqualityCompare(EqualityCompareComp* comp, | 30 virtual void VisitEqualityCompare(EqualityCompareComp* comp, |
| 31 BindInstr* instr); | 31 BindInstr* instr); |
| 32 virtual void VisitBind(BindInstr* instr); | 32 virtual void VisitBind(BindInstr* instr); |
| 33 virtual void VisitBranch(BranchInstr* instr); |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 bool TryReplaceWithArrayOp(BindInstr* instr, | 36 bool TryReplaceWithArrayOp(BindInstr* instr, |
| 36 InstanceCallComp* comp, | 37 InstanceCallComp* comp, |
| 37 Token::Kind op_kind); | 38 Token::Kind op_kind); |
| 38 bool TryReplaceWithBinaryOp(BindInstr* instr, | 39 bool TryReplaceWithBinaryOp(BindInstr* instr, |
| 39 InstanceCallComp* comp, | 40 InstanceCallComp* comp, |
| 40 Token::Kind op_kind); | 41 Token::Kind op_kind); |
| 41 bool TryReplaceWithUnaryOp(BindInstr* instr, | 42 bool TryReplaceWithUnaryOp(BindInstr* instr, |
| 42 InstanceCallComp* comp, | 43 InstanceCallComp* comp, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 private: | 130 private: |
| 130 static void OptimizeRecursive( | 131 static void OptimizeRecursive( |
| 131 BlockEntryInstr* entry, | 132 BlockEntryInstr* entry, |
| 132 DirectChainedHashMap<BindInstr*>* map); | 133 DirectChainedHashMap<BindInstr*>* map); |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 | 136 |
| 136 } // namespace dart | 137 } // namespace dart |
| 137 | 138 |
| 138 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 139 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |