| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 void AddCheckClass(InstanceCallInstr* call, Value* value); | 54 void AddCheckClass(InstanceCallInstr* call, Value* value); |
| 55 | 55 |
| 56 void InsertAfter(Instruction* instr, | 56 void InsertAfter(Instruction* instr, |
| 57 Definition* defn, | 57 Definition* defn, |
| 58 Environment* env, | 58 Environment* env, |
| 59 Definition::UseKind use_kind); | 59 Definition::UseKind use_kind); |
| 60 | 60 |
| 61 void InsertConversionsFor(Definition* def); | 61 void InsertConversionsFor(Definition* def); |
| 62 | 62 |
| 63 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; |
| 64 |
| 63 FlowGraph* flow_graph_; | 65 FlowGraph* flow_graph_; |
| 64 | 66 |
| 65 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); | 67 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 | 70 |
| 69 // Analyze the generated flow graph. Currently only if it is a leaf | 71 // Analyze the generated flow graph. Currently only if it is a leaf |
| 70 // method, i.e., does not contain any calls to runtime or other Dart code. | 72 // method, i.e., does not contain any calls to runtime or other Dart code. |
| 71 class FlowGraphAnalyzer : public ValueObject { | 73 class FlowGraphAnalyzer : public ValueObject { |
| 72 public: | 74 public: |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 private: | 148 private: |
| 147 static void OptimizeRecursive( | 149 static void OptimizeRecursive( |
| 148 BlockEntryInstr* entry, | 150 BlockEntryInstr* entry, |
| 149 DirectChainedHashMap<Definition*>* map); | 151 DirectChainedHashMap<Definition*>* map); |
| 150 }; | 152 }; |
| 151 | 153 |
| 152 | 154 |
| 153 } // namespace dart | 155 } // namespace dart |
| 154 | 156 |
| 155 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 157 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |