| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 template <typename T> | 182 template <typename T> |
| 183 void HandleEqualityCompare(EqualityCompareInstr* comp, | 183 void HandleEqualityCompare(EqualityCompareInstr* comp, |
| 184 T current_instruction); | 184 T current_instruction); |
| 185 | 185 |
| 186 static bool CanStrictifyEqualityCompare(EqualityCompareInstr* call); | 186 static bool CanStrictifyEqualityCompare(EqualityCompareInstr* call); |
| 187 | 187 |
| 188 template <typename T> | 188 template <typename T> |
| 189 bool StrictifyEqualityCompare(EqualityCompareInstr* compare, | 189 bool StrictifyEqualityCompare(EqualityCompareInstr* compare, |
| 190 T current_instruction) const; | 190 T current_instruction) const; |
| 191 | 191 |
| 192 template <typename T> |
| 193 bool StrictifyEqualityCompareWithICData(EqualityCompareInstr* compare, |
| 194 const ICData& unary_ic_data, |
| 195 T current_instruction); |
| 196 |
| 192 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, | 197 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, |
| 193 Definition* left_instr, | 198 Definition* left_instr, |
| 194 Definition* right_instr); | 199 Definition* right_instr); |
| 195 | 200 |
| 196 void AddToGuardedFields(const Field& field); | 201 void AddToGuardedFields(const Field& field); |
| 197 | 202 |
| 198 FlowGraph* flow_graph_; | 203 FlowGraph* flow_graph_; |
| 199 GrowableArray<const Field*>* guarded_fields_; | 204 GrowableArray<const Field*>* guarded_fields_; |
| 200 | 205 |
| 201 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); | 206 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 // Optimize spill stores inside try-blocks by identifying values that always | 378 // Optimize spill stores inside try-blocks by identifying values that always |
| 374 // contain a single known constant at catch block entry. | 379 // contain a single known constant at catch block entry. |
| 375 class TryCatchAnalyzer : public AllStatic { | 380 class TryCatchAnalyzer : public AllStatic { |
| 376 public: | 381 public: |
| 377 static void Optimize(FlowGraph* flow_graph); | 382 static void Optimize(FlowGraph* flow_graph); |
| 378 }; | 383 }; |
| 379 | 384 |
| 380 } // namespace dart | 385 } // namespace dart |
| 381 | 386 |
| 382 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 387 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |